Intercom is an American software company that produces a messaging platform which allows businesses to communicate with prospective and existing customers within their app, on their website, through social media, or via email.
We can use the Intercom API to import data from Intercom into Google Sheets. In this tutorial, I’ll show you how to connect the Intercom API to Google Sheets in 5 steps:
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
After logging into your Intercom developer account, click the Your apps tab, then click the New app button:
Complete the required fields then click the Create app button:
Your app will then be created and the access token will be displayed on the screen. Copy and paste your token to a safe location, because you’ll need it in the next steps:
In this section, we’ll show you how to browse the Intercom API documentation to find the API URL and endpoint that retrieves the information you need from your Intercom account. If you already know your URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Intercom API documentation page: https://developers.intercom.com/intercom-api-reference/reference
The menu on the left contains sections: Introduction, Choose Version, Common Structures, Users, Leads, Contacts, Visitors, Companies, Data Attributes, Data Events, Tags, Notes, Segments, Conversations, Messages, Admins, Teams, Counts, Articles, Help Center, Webhooks and Errors
The Users, Leads, Contacts, Visitors, Companies, Data Attributes, Data Events, Tags, Notes, Segments, Conversations, Messages, Admins, Teams, Counts, Articles and Help Center sections are the ones containing the API’s endpoints.
An example endpoint is the List all contacts from the Contacts section, which fetches a list of all contacts. The complete URL for this endpoint is:
https://api.intercom.io/contacts
The endpoint’s documentation contains a short description of the endpoint’s purpose, the cURL request and an example response. The default HTTP method is GET and it’s not specified in the documentation. If an endpoint uses any other method than GET, then this is specified in that endpoint’s documentation.
All API calls to the Intercom API should be made with this base domain/URL: https://api.intercom.io/
All endpoints should be appended to this base URL.
Now 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) required by your API endpoint. For this example, we are using the POST method.
API URL: In Step 3, we explained how you can find the Intercom API endpoint that you need. Now copy and paste your complete Intercom API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).
For this example, we are using the Create or update a company endpoint, which creates or updates a company. This is what the whole URL looks like:
https://api.intercom.io/companies
Headers: In the Headers section of Apipheny, add three rows with the following keys and values:
Headers Key 1: Authorization Value 1: Bearer your_access_token Key 2: Accept Value 2: application/json Key 3: Content-Type Value 3: application/json
Replace your_ access_token with the value of the token you generated previously, in Step 2. There should be a space between “Bearer” and your token.
In the POST Body section in Apipheny, add the following code:
{ "name": "your_company_name", "plan": "your_company_plan", "company_id": "your_company_id", "remote_created_at": timestamp, "size": 750, "website": "your_company_website", "industry": "your_company_industry" }
Don’t forget to replace your_company_name, your_company_plan, your_company_id, timestamp, your_company_website and your_company_industry with real values.
Example POST Body: { "name": "Apipheny Company", "plan": "Paid", "company_id": "7", "remote_created_at": 1394531170, "size": 750, "website": "https://apipheny.com", "industry": "Manufacturing" }
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Intercom API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
That’s it! You’ve successfully connected your Intercom account to Google Sheets using the Intercom API, Google Sheets API, and the Apipheny add-on.
After making a successful request to the Intercom API, try querying a different Intercom API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API tutorials and more:
Sponsored by Zink Virtual Tip Jar & Rewording.io Paraphrasing Tool
Accept donations on Twitch | Accept donations on Discord | Accept donations on YouTube | Accept donations on Telegram | Accept donations on Twitter | Accept donations on TikTok | Accept donations on Instagram | Accept donations on LinkedIn | Accept donations on Facebook | Accept donations on your Website