Courteney Cox has revealed that she met her boyfriend, musician Johnny McDaid, with the help of her celebrity friends, including Ed Sheeran, Harry Styles, Sacha Baron Cohen and Isla Fisher.

During her guesting on Howard Stern's SiriusXM show Wednesday, the 57-year-old actress shared that it was her group of friends who made an effort to set her up with the Snow Patrol member.

"Ed said, 'can I have some friends over this week?' and I said of course," Cox recalled. "He invited Johnny, Gary Lightbody, both of them from Snow Patrol, Taylor Swift… some great musicians and they all came over."

"I had a fun group anyway: Sacha Baron Cohen, Isla Fisher, Jennifer [Aniston] was there, it was just one of these fun weekends," she added.

The actress went on to reveal that everyone was exchanging numbers with each other except her, who was hosting the house party.

"This is worse than not getting nominated [for an Emmy for 'Friends']," she explained her feelings at that time. "And I remember seeing Johnny and going, 'Oh wow, he's really intense, he's got those eyes and he was playing the piano and I thought, 'he's really, really handsome.'"

Cox went on to share that during the screening of the movie "Just Before I Go," which she directed in 2013, she overheard Fisher encouraging a mutual friend to try her luck with the singer.

"And I went, 'whoa, whoa, whoa, Isla what are you doing? If anybody's gonna try to flirt with Johnny – what's wrong with me?'" she said.

Fisher then told Cohen that Cox was interested in the singer, after which the "Borat" star went up to Snow Patrol members and said, "Hey, Courteney wants to f--k one of you from Snow Patrol and it's not you, Gary."

Cox also recalled that Styles overheard their conversation and told McDaid to take things forward with Cox.

"'If you don't ask her out…' I think he threatened to do something crazy like… I don't remember but it was pretty bad," the actress said.

Cox and McDaid had their first date in September 2013, only a week later. And the rest is history.

Prior to dating McDaid, Cox was married to actor David Arquette from 1999 to 2013. They share a 17-year-old daughter.

On the work front, Cox will be next seen in the TV series "Shining Vale" and "Last Chance U."

Courteney Cox
Actress Courteney Cox poses for photographers upon arrival at the Ivor Novello awards in central London on May 19, 2016. Getty Images/ Justin Tallis