Unbeknownst to many, Lea Michele met “Glee” creator Ryan Murphy a year before she auditioned for the FOX musical dramedy.

“I met Ryan in 2007,” Michele told the Philippine Daily Inquirer in a recent interview. “I was visiting Los Angeles with a friend (Jonathan Groff) who was working on a show (‘The Normal Heart’) with him.”

“I went to dinner at Chateau Marmont,” recalled the 30-year-old singer-actress from New York. “I was thinking I would never be cool or pretty enough to ever be in this town. There I was in a shiny purple silk dress with ruffles down the chest. Little did I know that I was more Rachel Berry [for Ryan] than I realized.”

Michele ended up playing the role of Rachel Berry on “Glee,” but it was only after the audition process when she found out that the character was actually created for her in the first place.

“The minute I read the [‘Glee’] script, already being a fan of Ryan Murphy, I was so excited to get the opportunity to audition,” Michele told Backstage back in 2009. “I immediately started fighting and making sure that I was able to get in. … Being a singer and a performer, I really wanted to have the opportunity to be part of a show that I felt was tailor-made for my background. I had one audition, and then I went for studio and network. I found out later that Ryan Murphy — I had met him a year prior through a friend — had written the role for me. So I kind of wish I would’ve known that before I went through all the nervous parts of auditioning.”

Michele admitted that she was worried that people were going to see her in a different light after “Glee” ended its six-season run in 2015. “Then, Ryan wrote the [role of Hester on ‘Scream Queens’] for me,” she told the Philippine Daily Inquirer.

Although Murphy has been Michele’s “boss” for several years now, the actress said that the four-time Emmy winner has also been a “good friend.” For instance, Murphy helped Michele recover from the death of her boyfriend Cory Monteith, who also starred on “Glee.”

“When I found out [Cory had died], Ryan was one of the first people I called,” Michele told Entertainment Weekly last month. “When Cory was alive, Ryan was very helpful in trying to get him well and healthy, but when that day did come, Ryan did take charge, and he helped me more than I can ever explain.”

“He completely cared for me,” she continued. “He made sure I was okay every single day, whether it was coming over to his house and having dinner prepared for me, or making sure I was okay at work.”

Catch Michele on “Scream Queens” every Tuesday at 8 p.m. on FOX.