Skip to content
CSS JavaScript HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Procfile Update README Mar 9, 2015



This is a demo application that allows the user to search for GIFs, built with Node.js, that uses both Giphy and the SendGrid API. You can use the website to search for GIFs, or you can email with a query in the subject, to get an email response back with the GIF and also have that appear in the application using the SendGrid Inbound Parse API.

Live Example

Head over to to see the app running. You can search inside the app for a GIF, or by sending an email to . Anyone with the web page open will see the GIF that was requested.


Create a free SendGrid account.

Clone the repository by running:

git clone

Create your local copy of the .env.example file by running:

cp .env.example .env

We're using the dotenv library to handle env variables. 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 making the changes, to test the app just run:

npm install
node server.js

Testing locally with azk

If you have azk installed, just run:

$ azk start

And that will also setup ngrok for you. ;)

SendGrid Inbound Parse Webhook

Follow this tutorial by scottmotte for help setting up the SendGrid Inbound Parse Webhook. What you'll have to do is basically:

You'll have to change the applicationReplyUrl variable inside server.js for the user to receive back the email with the GIF.

var applicationReplyUrl = "";

You can easily test the inbound webhook using ngrok by running:

node server.js

Open a new terminal window and run:

ngrok 3000

ngrok should give you a url similar to this:

That's the URL you should set up inside your SendGrid parse API settings.


You can easily deploy the app by using Nodejitsu.

First of all, open package.json and change the domains and subdomains to the URL you want to use.

"subdomain": "yoururl",
"domains": [

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:

jitsu env set SENDGRID_USER your_sendgrid_username
jitsu env set SENDGRID_USER your_sendgrid_password
jitsu env set GIPHY_API_KEY your_giphy_api_key

And finally run:

jitsu deploy
Something went wrong with that request. Please try again.