Drift is a chat bot app like Intercom.

In this tutorial, you will learn how to connect the Drift API to Google Sheets in 5 steps:

  1. Install the Apipheny Add-on
  2. Create a Drift API App
  3. Choose your Drift API Endpoint URL
  4. Enter Drift API Request into Apipheny
  5. Run the Drift API Endpoint Request

Step 1.) Install and open the Apipheny Add-on in Google Sheets

To pull data from the Drift API to Google Sheets easily and without writing any code, first install and open the Apipheny Google Sheets add-on.

Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs (including the Drift API), save API requests, schedule API requests, and more. Click here if you want to learn more about Apipheny.

1. Install Apipheny by clicking the Install button on this page.

Install Apipheny add-on
Install Apipheny add-on

2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons option in the top menu. In the add-ons menu, you should see Apipheny.

Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets.

Open Apipheny add-on

Step 2.) Create a Drift App

To get started with the Drift API, first log in to your Drift account. Then go to dev.drift.com and create a new app by clicking the Build Your App button under Your Apps:

Click "Build Your App"
Click “Build Your App”

On the create an app page, you can add information like name, description, and icon under the Display Information section:

Enter Drift API app information
Enter Drift API app information

Go to the bottom of the OAuth & Permissions page, add the redirect URL and give your application the scopes of access that it needs to perform its purpose:

Drift API OAuth and Scopes
Drift app scopes
Drift app scopes

Under the Activate Your App section, install your app to your Drift account. This will generate a special non-expiring access token. You can now authenticate your requests by including the header Authorization: Bearer <YOUR_TOKEN>

Install app to Drift
Install app to Drift
Drift OAuth access token
Drift OAuth access token

After you get your Drift OAuth access token, copy and paste it somewhere safe because you’re going to need it later to authenticate your API requests.

Step 3.) Obtain a Drift Endpoint URL

In this section, we’ll show you how to browse the Drift API documentation to find a Drift API endpoint that retrieves the information you need. If you already know your Drift API URL, or you want to use the same example URL as us, just skip to Step 4.

To browse available endpoints, first open the Drift API documentation page: https://devdocs.drift.com/docs

The menu on the left contains a list of tutorials for the Drift API and a list of related APIs, each with its own endpoints:

Drift API Documentation
Drift API Documentation

An example endpoint is the Listing Conversations endpoint, from the Conversations and Messages API, which returns the conversations in your account:

https://driftapi.com/conversations/list

The documentation for this endpoint contains a short description of the endpoint’s purpose, the HTTP method used (GET), the request URL, a table describing the accepted parameters, and a few example requests:

Drift Listing Conversations API Endpoint Documentation
Drift Listing Conversations API Endpoint Documentation

All API calls to the Drift API should be made to the https://driftapi.com/ base domain.

Drift API base domain/root URL:
https://driftapi.com/

Step 4.) Enter the Drift API Request Into Apipheny

To call the Drift API in your Google Sheets, go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import Tab open, enter these details into the add-on:

Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your API endpoint. For this example, we are using the GET method.

API URL: In Step 3, we explained how you can find the Drift API endpoint that you need. Now copy the complete URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query.

For this example, we are using the Listing Users endpoint that returns a list of users in your organization. The corresponding URL for this endpoint is:

https://driftapi.com/users/list

In the Headers section in the Apipheny add-on, add 1 row with the following key and value:

Header:
Key:
Authorization
Value: Bearer <your_token>

Where <your_token> value is the token you obtained earlier, in Step 2. There should be a space between “Bearer” and your token. Do not include the carrots “<>” around your token.

Drift API request entered into the Apipheny add-on
Drift API request entered into the Apipheny add-on

Step 5.) Run the Drift API Endpoint Request

Lastly, click the Run button at the bottom of the Apipheny add-on and then your Drift API data will be imported into your Google Sheet, like so:

Drift API data in Google Sheets
Drift API data in Google Sheets

After making a successful request to the Drift API, try querying a different Drift API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as:

  • Save and schedule your Drift API request in the add-on
  • Make a POST request to the Drift API using the add-on (if available)
  • Use the custom =APIPHENY() function to call the Drift API request inside your Google Sheet
  • Create a Drift API request by referencing the value of a cell in the API URL with three curly braces eg. {{{Sheet1!A1}}}

If you want to connect the Drift app to Google Data Studio, just follow the same steps above and then connect your Google Sheet to your Google Data Studio Report.

Apipheny Demo – Pull API Data into Google Sheets

Related articles:

Related Posts

Leave a Comment