5 Best Options to Switch from Desk.com If you’re currently using Desk.com for your help desk, you have a decision to make. As of...
Building a Drift App: Part 1 – Receive Your 1st Drift Event In Under 5 MinutesTristan Rubadeau
Building a Drift App: Part 1 – Receive Your 1st Drift Event In Under 5 Minutes
As soon as Drift announced their brand spanking new developer platform, we saw the opportunity to build a Zendesk integration that compliments our existing 2-way sync between Zendesk and Slack. We’re big fans of Drift, we use it on our landing page to quickly answer questions from sales prospects and convert them to paying customers. After prospects become customers, we noticed that support and feature requests often come through Drift. For us and many other Drift customers, that information needs to be stored in Zendesk tickets to be effectively tracked, managed, and answered.
Our core mission is to streamline workflows around real-time messaging, which aligns well with Drift and their goal to put an end to forms. So we decided to dive in headfirst and start building.
Since Drift’s platform is so new, we thought it would be useful to share what we learn along the way. The first step is receiving an event from Drift. Here’s a quick walkthrough of how to do that in less time than it takes to make a cup of coffee.
Let’s Get This Show On The Road:
Head over to https://dev.drift.com/apps and Create New App:
Copy your Client ID, Secret ID, and Verification Token (You’ll need em later).
On the OAuth & Scopes tab you can skip setting OAuth redirect for now, but do select conversation_read from the dropdown:
Head over and install ngrok. You’ll need this to have a publicly reachable endpoint that Drift can send Events to that is bound to your localhost. Follow their docs for install and config. We run our ngrok with shell command:
ngrok http 3000 -subdomain=bubbleiqdev
What this does is map this domain to our localhost:
https://bubbleiqdev.ngrok.io -> localhost:3000
On the Events tab you will need to enter this fresh new url into the Request URL form and also subscribe to new_message event:
On the Display Information tab give your bot a name and logo.
Alright! You’re ready to Install to Drift. Click the green button and copy down the API Token it gives you. This token does not expire and is linked to your Drift Org only.
OK! Now you’re ready to set up a very simple Node App. See example GitHub Repo:
You can simply clone the repo, then run
To start the server, run:
With your program running, send a new message in Drift:
Back in your terminal you should be able to see Your Very First Event output:
We’ll continue adding example code and blog posts as we explore the API, add Slash Commands, Buttons, etc.