Kaling joined the sitcom as a member of the writing staff, but soon found her ditzy, romance-obsessed office worker Kelly Kapoor becoming a fan favorite. In 2010, she was nominated for an Emmy for writing âNiagara,â the episode where Jim and Pam get married.