Shawn Mendes and Fifth Harmony's Camila Cabello both took to social media on Tuesday to share details about their upcoming musical collaboration.

After releasing an unannounced teaser on Monday, Mendes and Cabello confirmed the release of their upcoming single on Twitter and revealed details about the song, set to be released on Nov. 18, reported Billboard.

Mendes, whose single "Stitches" just hit the No. 1 spot on the Billboard Pop Songs chart, told his fans that he and Cabello have been secretly working on the collaboration for months.

"Have a new single coming next week! Been working on this song for months now and am so excited about it! #IKWYDLS," Mendes tweeted. "It's a secret song from Handwritten Revisited that I co-wrote with @camilacabello97."

The song will be featured on Mendes' re-release of his debut album "Handwritten," due out on Nov. 20. The new version of the album will feature 16 tracks, including five live versions of his songs and four new ones.

Cabello revealed that the duet was actually written backstage at one of Taylor Swift's 1989 World Tour shows. Mendes was a part of the tour for several shows, and Cabello was a special guest with Fifth Harmony on one of the tour stops.

The 18-year-old Latina also explained that releasing the single was special for her because she has been writing songs in hotels for years and is finally getting to share some of that talent with her fans.

"Oh my God I'm so nervous/excited for you guys to hear it im going to pop a gasket!!" Cabello tweeted.

Check out the teaser for the upcoming duet below.