"The Secret" was written in roughly 26 hours and was the fastest episode written for the series at the time. The title for the episode is purposely vague and refers to Jim's hidden feelings for Pam, Dwight and Angela's relationship, and Oscar's homosexuality. "The Secret" is also the first episode where many of the actors not credited in the opening sequence are credited directly afterwards instead of as guest appearances. The scenes at the Hooters restaurant were filmed relatively early in the day, and a majority of the scenes were improvised by Carell. "The Secret" received largely positive reviews from television critics and was watched by 8.7 million viewers, ranking as the forty-fourth most-watched television episode of the week.