The two stars worked with singer-turned actor Justin in DreamWorks’ latest animated movie, about a group of trolls who must save their friends from the invasion of large creatures known as Bergens.

While James plays troll Biggie, Zooey voices Bergen scullery maid Bridget, but both were required to share their vocals in front of the award-winning popstar, who plays troll Branch.

“I think we had a similar experience where I had to spend half a day singing in front of Justin Timberlake in a recording studio, which is terrifying. But you had to go one further; you had to rap,” James said to Zooey on Tuesday night’s (01Nov16) episode of his The Late Late Show.

While Zooey first had to sing a Lionel Richie song for her part, which she nailed thanks to her amazing voice as heard in her group She & Him, the next task was a little more daunting. When the cast were told they’d be belting out a rendition of Diana Ross’ I’m Coming Out the actress thought she’d be singing just one line.

“They’re like, ‘How do you feel about rapping?’” she recalled. “I was like, ‘Wait, um, I’m sorry I didn’t realise that the rap was supposed to be me rapping, I thought that was for somebody else.’ Of course it wouldn’t be me – I’m not a rapper, now I am... Justin Timberlake’s there, he’s like, ‘So you want to take a minute to go over it?’ I’m like, hell yes. So I go in the other room and I listened to this rap like 20,000 times and then I went in there and did it.”

Although Zooey, 36, found herself apologising to Justin, 35, for both her nerves and rapping skills, she ended up relaxing a little and joked she soon felt like a female member of Justin’s former group NSYNC.

“So did I,” James joked.

Trolls, which also features the vocals of Anna Kendrick, Russell Brand and Gwen Stefani, was released this month.