Songwriter and producer Savan Kotecha is the man behind such hits such as Ariana Grande’s “Break Free” and “No Tears Left to Cry,”  Demi Lovato’s “Cool for the Summer” and The Weeknd’s “Can’t Feel My Face.” His music is about go global again this weekend with the release of Netflix’s “Eurovision: The Story of Fire Saga,” for which Kotecha wrote all the original songs.

Will Ferrell, Rachel McAdams and Dan Stevens play performers vying for the top spot and dreaming of Eurovision glory, but only one act can take the crown. Ferrell and McAdams are Lars and Sigrit, the Icelandic duo called Fire Saga who belt out hits like “Volcano Man.”

When director David Dobkin needed music, he turned to hitmaker Kotecha who was well versed in the actual contest having lived in Sweden and having a Swedish wife. He was the perfect candidate to deliver the right flavor of tunes Dobkin needed for the film.

Variety talks to Kotecha about the songwriting process and how he got Demi Lovato’s cameo appearance in the film.

What did the Eurovision Song Contest mean to you before the film?

I lived in Sweden for fifteen years and my wife is Swedish so I was introduced to it when I was in my twenties. As a songwriter in Stockholm, I was the American guy and sensitive to what I was watching and listening to. When you don’t have English around you for a long period, your own English can get lazy so I spent my time reading American magazines and watching American shows.

The city suddenly shuts down one night and I got invited to this restaurant for a Eurovision party. I was watching everyone go crazy for these lyrics. I learned that everything shut down not just for the local Swedish festival (the Melodifestivalen that determines who is going to represent the country in the Eurovision), but also it shuts down for the main contest. My wife said, ‘You have to watch this.’ I didn’t get it but I started to appreciate it as the years went by.

I appreciated the culture and politics and how certain countries won’t vote for others. It was fascinating to see the scope of it. As an arrogant American, I realized it was bigger than anything we had in the USA.

You have a track like “Volcano Man,” the first song that tells us the vibe of the film, talk about putting that together.

I found two young writers from Sweden Gustav Holter and Christian Persson and told them that we needed an opening number. We needed something where Will’s character sings, ‘Oh, oh, oh, oh’ and they totally got it. They understood the culture and they sent in “Volcano Man” and they nailed it.

The most important thing that I stressed was in Eurovision, the melodies are really good. If you took the lyrics away, the melody had to be fantastic. And those guys just delivered.

“Lion of Love” is everything Eurovision. It’s fantastic, fun and so risque. How did that come about?

It was about knowing who the character was. So much about the music was understanding who the character was and that’s what I do when I work with any artist, I try to understand who they are.

With this song, he’s this overly macho guy and that was so much fun. We tried to put some Russian influence in the melody. Lyrically, we went over the top. For me, writing some of the lyrics felt like they were put into Google translate for English. It’s not really how you would say it and that was very much the idea for that one.

What about collaborating with Demi Lovato again?

We’ve worked together since 2010. When they were talking about a pop star, I suggested Demi and she said yes immediately. We were trying to write that song and we called Jörgen Elofsson, who wrote for Britney Spears (“Sometimes”) and “What Doesn’t Kill You Makes You Stronger” for Kelly Clarkson. I said, “There’s one character you could be perfect for.” He sent in a demo for “In the Mirror” and it was just the perfect blend because it matched her voice. It was what she needed to sing as that character. She’s so good in the movie.