Import Intercom Data to Google Sheets
In this guide, we’ll walk through how to pull data from the Intercom API directly into Google Sheets, using the API Connector add-on for Google Sheets. We’ll first get an API key from Intercom, and then set up a request to pull in contact and conversation data to your spreadsheet.
- Part 1: Get your Intercom API Key
- Part 2: Create your API Request URL
- Part 3: Pull Intercom API Data into Sheets
- Part 4: More Example API URLs
- Part 5: Handle Pagination
PART 1: GET YOUR INTERCOM API KEY
- While logged into your Intercom account, navigate to the Developer Hub and click New App.
- A modal will appear, prompting you for details about your app. You can name it anything, but for this example we’ll name it ‘Google Sheets’. Leave the ‘internal integration’ radio button selected, and click Create App.
- You’ll now see a page containing your Access Token. Copy this to your clipboard as you’ll need it in a moment. That’s it, you now have access to the Intercom API!
PART 2: CREATE YOUR API REQUEST URL
We’ll follow the Intercom documentation to access a list of users.
- API root: https://api.intercom.io
- Endpoint: /contacts
Putting it together, we get the full API Request URL:
PART 3: PULL INTERCOM API DATA INTO SHEETS
We can now enter our values into API Connector and import Intercom API data into Google Sheets.
- Open up Google Sheets and click Add-ons > API Connector > Open.
- In the Create screen, enter the Request URL we just created
- Under Headers, enter two sets of key-value pairs, like this:
Replace YOUR_API_KEY with the key provided above in part 1.
Authorization Bearer YOUR_API_KEY Accept application/json
- Create a new tab and click ‘Set current’ to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see a list of contacts in your Google Sheet:
PART 4: MORE EXAMPLE API URLS
Experiment with endpoints and query strings as described in the documentation to see other types of Intercom data. For example, you can try the following URLs:
- Admins (view other users in your workspace):
- Companies (list companies):
- Conversations (List conversations you have with users on your system):
- Counts (counts of users and companies by segment):
- Data Attributes (attributes used to describe your customer and company models):
- Events (events belonging to a specific user. Substitute in the data » id retrieved from the /contacts endpoint):
- Notes (view notes about users):
- Segments (view your workspace segments):
- Teams (view teams in your workspace):
Some Intercom endpoints will return a limited set of data, generally just 10 or 20 records at one time. To retrieve additional data, you can first try appending
?per_page=50 to the end of your URL to bump that up to 50 records (different endpoints have different limits).
To get more than that, you’ll need to follow the pagination links located in the
pages » next field, as described here. With API Connector, you can run these as separate requests, or loop through pages automatically using pagination handling (paid feature), like this: