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

# Intercom

> Create, update, and look up Intercom contacts from inside an agent workflow.

Intercom actions let an agent manage contacts directly in a flow. An agent can create, update, retrieve, delete, and list contacts, then pass the results to later steps.

## Supported actions

| Group       | Actions                           |
| ----------- | --------------------------------- |
| **Contact** | Create, Update, Get, Delete, List |

## Prerequisites

<AccordionGroup>
  <Accordion title="Create an Intercom credential" icon="key">
    Store an Intercom access token as an **Intercom** credential in [Credential Management](/admin-hub/account_settings/credential-management), then select it on every Intercom action.
  </Accordion>
</AccordionGroup>

## How to use these actions

* **Map text inputs from earlier steps.** Inputs such as **Email**, **Name**, and **Contact ID** accept a value mapped from a previous step.
* **Fixed value inputs.** The **Per Page** count and the **Unsubscribed From Emails** toggle are set to fixed values.
* **Identifying a user contact.** When creating a contact with the `user` role, provide either an **Email** or an **External ID**.
* **List results page with a cursor.** To page through more contacts, pass the cursor from the previous response into **Starting After** on the next call.

## Actions

### Contact

#### Intercom Contact Create

Creates a new contact.

| Input           | Required    | Description                                                                                  |
| --------------- | ----------- | -------------------------------------------------------------------------------------------- |
| **Role**        | Yes         | The contact role, either `user` or `lead`. Defaults to `user`.                               |
| **Email**       | Conditional | The contact's email address. Required for a `user` role contact when External ID is not set. |
| **External ID** | Conditional | A unique ID from your own system. Required for a `user` role contact when Email is not set.  |
| **Name**        | No          | The contact's name.                                                                          |
| **Phone**       | No          | The contact's phone number.                                                                  |
| **Avatar**      | No          | A URL to an avatar image.                                                                    |

<Note>A `user` role contact requires an **Email** or an **External ID**. A `lead` does not.</Note>

#### Intercom Contact Update

Updates an existing contact.

| Input                        | Required | Description                                              |
| ---------------------------- | -------- | -------------------------------------------------------- |
| **Contact ID**               | Yes      | The unique identifier of the contact to update.          |
| **Email**                    | No       | The contact's email address.                             |
| **External ID**              | No       | A unique ID from your own system.                        |
| **Name**                     | No       | The contact's name.                                      |
| **Phone**                    | No       | The contact's phone number.                              |
| **Avatar**                   | No       | A URL to an avatar image.                                |
| **Unsubscribed From Emails** | No       | Toggle. Whether the contact is unsubscribed from emails. |

#### Intercom Contact Get

Retrieves a contact by ID.

| Input          | Required | Description                                       |
| -------------- | -------- | ------------------------------------------------- |
| **Contact ID** | Yes      | The unique identifier of the contact to retrieve. |

#### Intercom Contact Delete

Deletes a contact.

| Input          | Required | Description                                     |
| -------------- | -------- | ----------------------------------------------- |
| **Contact ID** | Yes      | The unique identifier of the contact to delete. |

#### Intercom Contact List

Lists contacts.

| Input              | Required | Description                                                 |
| ------------------ | -------- | ----------------------------------------------------------- |
| **Email**          | No       | Filter results to contacts with this email address.         |
| **Per Page**       | No       | Number of contacts per page, from 1 to 150. Defaults to 50. |
| **Starting After** | No       | Pagination cursor from a previous response.                 |

## Example

An agent that keeps a contact record in sync after a support chat:

<Steps>
  <Step title="Look up the contact">
    An **Intercom Contact List** action filters by the customer's **Email** to find an existing record.
  </Step>

  <Step title="Create if missing">
    A branch runs **Intercom Contact Create** with **Role** set to `user` and the customer's **Email** when no match was found.
  </Step>

  <Step title="Update details">
    An **Intercom Contact Update** action maps **Contact ID** to the matched or newly created contact and sets the **Name** and **Phone** gathered during the chat.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="A user contact requires an email or external ID" icon="triangle-exclamation">
    A `user` role contact must include either an **Email** or an **External ID**. Supply at least one, or set **Role** to `lead`.
  </Accordion>

  <Accordion title="Authentication failed" icon="lock">
    The access token is missing, expired, or revoked. Confirm the credential holds a valid Intercom access token and reconnect if needed.
  </Accordion>

  <Accordion title="Contact not found" icon="circle-question">
    The **Contact ID** does not exist in this workspace. Confirm the ID with a **List** action and that the token belongs to the right Intercom workspace.
  </Accordion>

  <Accordion title="Contact already exists" icon="user-plus">
    A contact with the same email or external ID is already present. Use **Contact List** to find it, then **Contact Update** instead of creating a duplicate.
  </Accordion>
</AccordionGroup>

For issues common to every vendor, see the [Actions overview](/building-and-deploying-agents/agent-basics/actions/overview#troubleshooting).
