Animated GIFs Inside Your Inbox

Want to bring a smile to your face? Try sending yourself an animated GIF. Once a sign of Web 1.0, these graphics are now such a form of expression that there’s a startup just to search them. In this post, I’ll show you how to use an API to find GIFs and the SendGrid Inbound Parse Webhook to request specific search terms. The end result, of course, are animated GIFs inside your inbox.

The demo application uses Giphy to search for animated GIFs. Before I show the technology behind the application, try it out using either the email or web interface:

The application is built on Node.js and hosted on Nodejitsu. Below are some details you can use to run your own copy.

Run Your Own Copy

You can use the hosted versions of GimmeGIF as much as you want to bring an animated smile to your inbox. However, if you’d like to see how to use the Parse Webhook in step with Node.js and/or Nodejitsu, this sample app can be a great way to learn.

The code for GimmeGIF is open source and hosted on GitHub. Assuming you have git and node installed, perform the following steps:

Edit the contents of .env, changing the variables SENDGRID_USER and SENDGRID_PASSWORD to your SendGrid credentials. The GIPHY_API_KEY is a public key they have available over at their repository. They have instructions for getting a private key for production in there.

After that, create a Nodejitsu account, install the jitsu CLI and log in. For the SendGrid email to be sent back, after the user requests it through the Inbound Parse Webhook, you need to set the env variables inside nodejitsu: