Jennifer Garner has been a superfan of "The Barefoot Contessa" star Ina Garten for years, but their friendship almost didn’t happen.

In an excerpt from her memoir, "Be Ready When the Luck Happens," shared by People, Garten recalled the near miss.

"People who didn’t understand that the guests on my show were my friends in real life often wrote to see if they could cook with me," Garten wrote. "[My assistant] Barbara handled my correspondence and always sent polite letters explaining how the show worked." 

She continued, "One day, she’d offhandedly dismissed a letter from Jennifer Garner because she apparently didn’t realize who she was."

MARTHA STEWART SAYS INA GARTEN 'STOPPED TALKING' TO HER AFTER STEWART WENT TO PRISON

Jennifer Garner and Ina Garten posing in a kitchen together

Ina Garten, Jennifer Garner and Jennifer Garner's Pizza Crackers, as seen on "Be My Guest with Ina Garten," Season 4. (Warner Bros. Discovery)

But according to Garten, she "had an instinct about her."

Garten thought the "Alias" star "seemed smart, funny and so grounded, very un-Hollywood. I thought she was someone I could have fun with." 

While in Los Angeles shooting an episode, they "made a date to cook together, and, as we both suspected, felt an instant connection. We’ve been friends ever since."

APP USERS CLICK HERE TO VIEW POST

Ina Garten smiles in a bright blue shirt while holding a spoon up on camera

Ina Garten said Jennifer Garner sounded like "someone I could have fun with." (Nathan Congleton/NBCU Photo Bank/NBCUniversal via Getty Images)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

The Food Network star said their first meeting was around the time of Garner’s 40th birthday in 2012, and Garner invited her to celebrate.

"She very sweetly invited me to her birthday party, which was amazing," Garten told People. "And I loved it because it was 40 women that were invited in their sweat clothes and they were instructed not to have their hair done or anything, hair in a ponytail, sweat, clothes and sneakers. And they were wonderful, wonderful women and it was a very good time."

Garner has proven her deep love for cooking on social media, thanks to her occasional "Pretend Cooking Show" on Instagram.

"She seemed smart, funny and so grounded, very un-Hollywood. I thought she was someone I could have fun with." 

— Ina Garten on Jennifer Garner
Jennifer Garner in a sleveless red dress soft smiles on the carpet

Jennifer Garner invited Ina Garten to her 40th birthday party. (Gilbert Flores/Variety via Getty Images)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

But the mom of three has no intention of going pro like Garten.

"People ask me if I want a cookbook. I don’t want to make a cookbook. I love cookbooks too much," Garner told "Today." "I don’t cook without one, so I don’t come up with recipes. I mean, there’s some things that I’ve messed with enough, I get that’s my own recipe now, but that’s fine. We don’t need that."

Jennifer Garner wears pink at an event

Jennifer Garner has said she isn't interested in hosting her own cooking show. (Getty Images)

APP USERS CLICK HERE TO VIEW POST

CLICK HERE TO GET THE FOX NEWS APP

"They ask if I want to make the pretend cooking show into a real show, but it’s not. It’s a pretend cooking show," she continued, adding that she does feel lucky to do something "silly" that people enjoy.