text: night out ( the office ) " night out " is the fifteenth episode of the fourth season of the american comedy television series the office , and the show 's sixty - eighth episode overall . the episode was written by mindy kaling and directed by ken whittingham . it first aired in the united states on april 24 , 2008 on nbc . " night out " was viewed by a measured audience of over 7 . 5 million people , bringing in the lowest number of estimated viewers that the office received among 12 episodes . " night out " received mixed reviews from critics . in the episode , michael and dwight travel to new york city to party with ryan . ryan starts acting erratically , and it is revealed that he is under the influence of drugs . meanwhile , the remaining employees are going to be forced to work on a saturday . jim proposes that they work late on friday , so they do not have to come in the next day . once jim and his co - workers finish working , they find that they are locked in , and everyone quickly places the blame on jim . plot ryan howard ( b. j. novak ) arrives at the scranton , pennsylvania branch of the dunder mifflin paper company and is noticeably friendlier than on his previous visits . the employees , by now fed up with ryan 's new website , angrily ask him questions about the website and their clients . ryan shows the staff at the branch the new dunder mifflin website , " dunder mifflin infinity 2 . 0 " , the previous version of which was shut down because sexual predators had invaded the social networking component of the site . as ryan leaves , he tells michael scott ( steve carell ) of the women he meets in clubs in new york city . michael and dwight schrute ( rainn wilson ) subsequently decide to go to new york , locate ryan , attend parties with him , and try to meet women while doing so . in new york , michael and dwight locate ryan after discovering which club ryan frequents ; ryan is thrilled to see them but appears to be under the influence of drugs though michael and dwight do not notice . later , michael , dwight , ryan and ryan 's colleague , troy ( noel petok ) ( who dwight is certain is a hobbit due to his short stature ) wait outside another club , but fail to get in because they do not have dates . dwight comes to the rescue when he manages to pair each of them with members of a women 's basketball team , who are also waiting in line . inside the club , ryan 's dancing becomes erratic and aggressive , and he accidentally hits a girl , prompting her friends to attack ryan . dwight and michael escort him out of the club , and after troy advises them not to take ryan to a hospital , he runs off . michael and dwight bring ryan back to his apartment , where he tells them that he thinks his " friend troy " has a drug problem , and asks what he should do about it . michael , oblivious to the fact that ryan is obviously referring to his own drug addiction , gives him hypothetical advice involving a wiretap and snitching on a drug dealer . he then tells the camera that he has been watching the wire but does not understand what is going on in the show . back in scranton , the rest of the employees are going to be forced to work on a saturday to record their own sales as the website 's sales , which is , according to ryan , " a temporary procedure to increase the legitimacy of the website . " with no one eager to participate , jim halpert ( john krasinski ) decides to ask everyone to stay in the office late instead of coming in for the saturday . they all agree to the plan , and after working until 9 : 00 pm , they are shocked to find the parking lot gates locked . jim had forgotten to tell the security guard that they were staying late . they are unable to return to the office because pam beesly ( jenna fischer ) locked the door from the inside , and dwight , miles away in new york , has both the spare and master keys . jim repeatedly calls hank the security guard ( hugh dane ) . pam accidentally injures meredith by hitting her head with a football that was found in the parking lot . sitting in the lobby area waiting for the security guard to arrive , the employees are clearly frustrated with jim , and even vote by a show of hands that andy and angela are a better couple than jim and pam . during a moment of levity , toby flenderson ( paul lieberstein ) affectionately places his hand on pam 's knee . after an awkward silence , toby proclaims that he is moving to costa rica ; he then hops the parking lot fence and runs away . the cleaning staff arrives and lets the group out ( with help from oscar , who speaks spanish ) . at the end of the episode , hank finally shows up but is upset because everyone but the cleaning staff is gone . production " night out " was the seventh episode of the series directed by ken whittingham . it was written by mindy kaling , who also acts in the show as customer - service representative kelly kapoor . the episode was the eighth of the series to be written by kaling . " night out " was the third new episode of the office to be broadcast since the episode " the deposition " on november 15 , 2007 , due to the effects of the 2007 – 2008 writers guild of america strike . filming of the office immediately halted on that date , because many members of the cast including carell , novak , kaling , and lieberstein are members of the wga and refused to cross wga picket lines . if not for the writers ' strike , this episode would have most likely been filmed in november 2007 . most of " night out " was shot during the night . the scene that has toby putting his hand on pam 's knee was shot at 2 : 30 am on a friday . the scene was shot about eight times because according to kaling , " everyone kept breaking because toby was so vulnerable and awkward . " kate flannery did her stunts in the scene where pam throws a football and hits customer and supplier relations worker meredith palmer ( flannery ) in the face . flannery had a stunt double on the set , but she was never needed for the scene . kate recalls that she " didn 't get a scratch in all 14 takes that we shot . " lieberstein on the other hand used a stunt double for the scene in which toby climbs over the fence . although lieberstein offered to do the stunt himself , executive producer and show runner greg daniels decided against it . when casting " tall girl # 1 " ( the woman who would kiss with dwight ) , the show was looking for a girl 6 ' 1' ' or taller . actress cassie fliegel , who is 5 ' 11 ' ' , auditioned for the part anyway . after getting a callback , fliegel went to a gym to work out , attempting to gain muscle to look more like a basketball player . on the day of the callbacks , fliegel remembers being next to a girl who was 6 ' ' . despite her size , fliegel , a former basketball player herself , was cast for the part . initially , she did not know that her character was going to make out with dwight . fliegel recalls that when she first heard about kissing dwight she " was like , i don 't think so " . however , after finding out that she had her own trailer , fliegel warmed up to the idea . the music in the club was chosen by novak , kaling 's then - boyfriend benjamin nugent , and daniel chun . when filming ryan dancing in the club , the girl that ryan hit was actually a stunt woman . pads had been placed on the floor so novak could fall down safely . the german lullaby that dwight sang to ryan was script supervisor veda semarne 's idea . semarne 's austrian grandmother sang the same song to her when she was a child . reception " night out " received 4 . 0 / 10 in the ages 18 – 49 demographic in the nielsen ratings . this means that four percent of all households with an 18- to 49 - year - old living in it watched the episode , and ten percent had their televisions tuned to the channel at any point . the episode was watched by 7 . 56 million viewers . " night out " did not do as well as " chair model " did the week before , losing 20 percent of the previous episode 's viewers . some attribute the loss of viewers to a lack of grey 's anatomy and a repeat of csi the previous week . with 7 . 69 million , " night out " had fewer viewers than any other episode of the office from the fourth season , except for " job fair " , which garnered only 7 . 16 million viewers . reviews for " night out " were mixed . zap2it 's rick porter thought that although it wasn 't " as sublime in its needy michael - ness as last week 's ( episode ) " and " in some ways , though , it was maybe even a little sadder " , " night out " was " still pretty darn funny " . porter went on to praise the acting work of both b.j. novak and paul lieberstein , as well as the writing of mindy kaling . tv squad 's jay black said that michael summed up " night out " perfectly when he said " best . night . ever . " black went on to praise both of the storylines , and the ability of the show to achieve success both in as well as out of the dunder mifflin scranton building . similar to black 's statements , gretchen hansen of entertainment weekly stated that " ' best . night . ever . ' oh , so true , michael . " she also stated that " i guess i knew it was going to be a good episode of the office when i had two pages of scribbled notes before the first commercial break . " hansen went on to praise both the acting and the writing of the episode as points that contributed to the success of the episode . rachel cericola , of tv fodder , praised the writing of the episode by mindy kaling . she also praised the storyline of the episode that didn 't involve michael and dwight , saying " the second plotline was its usual funny filler . however , it was toby 's revelation that made it all worthwhile . " travis fickett of ign said that the episode was " still satisfying , even when it 's not one of the show 's funnier episodes " , but " it 's a bit of a shame this episode wasn 't a home run , because having dwight and michael hit the clubs is a funny idea . " fickett went on to praise the episode 's awkward moment between toby and pam , when toby placed his hand on pam 's leg , and toby 's subsequent escape by hopping the fence . fickett stated that , for toby 's growing love of pam , and growing jealousy of jim , " this is pretty great pay off " . claire zulkey , a writer for the los angeles times , was not as pleased with the episode . zulkey wrote " that when it 's at its zaniest , the office is at its worst " , and the episode was " just too silly to be funny " . zulkey did say that " it was hilarious to see him ( toby ) let his hand more - than - linger on her knee and then abruptly flee the premises by jumping over the fence and running home . " in a poll done by office fansite officetally.com , viewers ranked " night out " as the 13th - most popular episode out of the 14 episodes of season four .