> ## Documentation Index
> Fetch the complete documentation index at: https://help.nextmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate with Intercom

> Bring company or contact information from Intercom into your workflow

If you start the workflow with a [webhook trigger](/docs/webhook-triggers) (for example, a workflow starts when a customer contacts you), you can use one of these templates to extract more data from Intercom and feed it into the workflow.

## Before you begin

* Get an Intercom API key. For details, see [Intercom documentation](https://developers.intercom.com/docs/build-an-integration/learn-more/authentication/).

* Verify the version of the Intercom API you're using. You'll need to provide the version in the call header. For details on the version, see [Intercom documentation](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/update-your-api-version/).

## Get the company details from Intercom

1. In Next Matter select the workflow that should integrate with Intercom, and add a new integration step to get deal details.

2. Click **Settings** and enter the following details:

   <Info>
     This call will return all the company details stored in Intercom such as the company's profile or activity.
   </Info>

   **Tip**: Get an Intercom Company\_ID. You can find the ID by going to Intercom and clicking the company link in **Contacts > Companies**.

   * **Headers**: Content-Type: application/json

   * **Headers**: Authorization: `Bearer INTERCOM_API_KEY`

   * **Headers**: Intercom-Version: `2.10`

   - **Method**: GET

   - **URL**: [`https://api.intercom.io/companies/COMPANY_ID`](https://api.intercom.io/companies/COMPANY_ID)

3. Create a variable for the company name with the value of: `$.name`.

4. Save your changes.

## Get the details of a contact into the workflow

1. In Next Matter select the workflow that should integrate with Intercom, and add a new integration step to get deal details.

2. Click **Settings** and enter the following details:

   <Info>
     This call will return all the user details stored in Intercom.
   </Info>

   **Tip**: Get an Intercom CONTACT\_ID (user\_ID). You can find the ID by going to Intercom and clicking the person's link in **Contacts > People**.

   * **Headers**: Content-Type: application/json

   * **Headers**: Authorization: `Bearer INTERCOM_API_KEY`

   * **Headers**: Intercom-Version: `2.10`

   - **Method**: GET

   - **URL**: [`https://api.intercom.io/companies/CONTACT_ID`](https://api.intercom.io/companies/CONTACT_ID)

3. Create a variable for the following: company ID with the value of: `$.companies.data[0].id`, custom attributes with the value of `$.custom_attributes` (if you want to get a list of all attribute values) or a CUSTOM ATTRIBUTE with the value of `$.custom_attributes.['CUSTOM ATTRIBUTE']`, when you want a specific attribute. In this case, enter the name of the CUSTOM ATTRIBUTE as used in Intercom.

4. Save your changes.
