Writing and filming drew upon her own cultural background to write the episode. "Diwali" was written by
Mindy Kaling and directed by
Miguel Arteta. While the episode is partly set at West Scranton High School, filming actually took place at
Grant High School in Los Angeles, the same building where
Freaks and Geeks was shot. That series' co-creator,
Paul Feig, has directed several episodes of
The Office, including "
Email Surveillance". The following year, while discussing the possible creation of a Halloween episode, she and executive producer
Greg Daniels agreed to instead create one that was Diwali-themed, as the two holidays fall near each other. When it came time to write the episode however, Kaling had to perform a
Google search, as she had forgotten many details. She explained, "I was a little embarrassed with how little I knew about it. I'm
Hindu, but I'm not really a practicing Hindu, so I had to do a lot of research." The series writers have since joked that they should do a Diwali-themed episode every year in the same vein as the Christmas specials. In her weekly blog for
TV Guide, actress
Kate Flannery wrote that "Mindy shares that B.J. Novak talent of being able to write an incredibly funny episode ("
Hot Girl," "
The Injury") and be in it. Diwali is the Indian festival of lights. So this week Dunder-Mifflin gets a spicy taste of Indian culture in a hurry. Michael decides the office needs an outing to the local high school for the annual Indian Diwali party." Kaling was proud of their acting, though she admitted that their presence on set was at first "mortifying". She commented, "Of course I sort of lapsed back into that pre-teen attitude of every single thing my parents do embarrasses me. But they were great about it. They were such pros – they had all these scenes with Steve Carell and they were completely unafraid. They got along effortlessly." Other guest stars included Creed Bratton as
Creed Bratton,
Charles Esten as Josh Porter,
Ed Helms as Andy Bernard, and
Rashida Jones as Karen Filippelli. ==Reception==