When Michael asks Dwight why he has a diary, Dwight tells him it's "to keep secrets from my computer." This is a callback to Launch Party (2007), when Jim and Pam pull a prank on Dwight, making him believe the Dunder Mifflin website had achieved sentience through his computer.
One of the excuses Michael gives Pam to use as a reason he can't come to the phone is "I'm trapped in a oil painting." This is something that happens in "The Witches," a book by Roald Dahl who also authored "Charlie And The Chocolate Factory."
This is the episode featuring the ever so popular Steve Carell 'Thank You' GIF that became viral.
After disposing of his Willy Wonka costume, Michael wears Andy's blazer for the remainder of the day.