# Intercom
URL: /reference/blocks/intercom
Type: reference
Description: Work with Intercom contacts, conversations, tickets, and admins
Keywords: intercom, integrations, block, workflow builder
`intercom` — Work with Intercom contacts, conversations, tickets, and admins.

Where it appears [#where-it-appears]

The **Intercom** block lives in the **Integrations** group of the Workflow Builder. Connect the Intercom integration before adding it.

Fields [#fields]

| Field                  | Type                                   | Required | Default   | Description                                                                                                                                                                   |
| ---------------------- | -------------------------------------- | -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `resource`             | select                                 | Yes      | `contact` | Which Intercom resource to work with. Options: `contact`, `conversation`, `ticket`, `admin`.                                                                                  |
| `operation`            | select                                 | Yes      | —         | Which action to perform on the selected resource.                                                                                                                             |
| `role`                 | select                                 | No       | `user`    | Intercom contact role: User (an identified, signed-up person) or Lead (an unidentified prospect). Defaults to User. Options: `user`, `lead`.                                  |
| `email`                | text (supports references)             | No       | —         | Email address for the Intercom contact. Accepts literal text or \<StepName.field> to reference a value from a previous step.                                                  |
| `name`                 | text (supports references)             | No       | —         | Display name for the Intercom contact. Accepts literal text or \<StepName.field>.                                                                                             |
| `phone`                | text (supports references)             | No       | —         | Optional phone number for the contact, in E.164 format. Accepts literal text or \<StepName.field>.                                                                            |
| `customAttributesJson` | code                                   | No       | —         | Optional JSON object of custom data attributes to set on the contact (e.g. `&#123;"plan":"pro"&#125;`). Keys must match custom attributes defined in your Intercom workspace. |
| `contactId`            | text (supports references)             | Yes      | —         | Intercom contact ID to act on. Use a literal ID or \<StepName.field> to reference an ID from a previous step.                                                                 |
| `perPage`              | number                                 | No       | `50`      | Number of contacts to return per page from Intercom. Defaults to 50.                                                                                                          |
| `queryJson`            | code                                   | Yes      | —         | Intercom Search Contacts API request body as JSON, using a `query` object with `field`, `operator`, and `value` (and optional nested AND/OR groups).                          |
| `conversationId`       | text (supports references)             | Yes      | —         | Intercom conversation ID to act on. Use a literal ID or \<StepName.field> to reference an ID from a previous step.                                                            |
| `message`              | text (multi-line, supports references) | Yes      | —         | Reply text to post to the Intercom conversation. Use literal text or \<StepName.field> to reference upstream content such as a generated reply.                               |
| `ticketJson`           | code                                   | Yes      | —         | Intercom Create Ticket API request body as JSON, including `ticket_type_id`, the associated `contacts`, and ticket attributes such as `title`.                                |
| `ticketId`             | text (supports references)             | Yes      | —         | Intercom ticket ID to fetch. Use a literal ID or \<StepName.field> to reference an ID from a previous step.                                                                   |

Inputs and outputs [#inputs-and-outputs]

Inputs are the configurable fields above. The block produces these outputs:

**Outputs**

Reference an output downstream with `<Intercom.field>`.

| Name           | Type    | Description             |
| -------------- | ------- | ----------------------- |
| `success`      | boolean | Operation succeeded     |
| `contact`      | json    | Created contact         |
| `error`        | string  | Error message if failed |
| `contacts`     | json    | List of contacts        |
| `pages`        | json    | Pagination info         |
| `results`      | json    | Search results          |
| `deleted`      | boolean | Contact was deleted     |
| `conversation` | json    | Conversation data       |
| `ticket`       | json    | Created ticket          |
| `admins`       | json    | List of admins          |

Example [#example]

A minimal configuration for this block:

```json
{
  "type": "intercom",
  "config": {
    "resource": "contact",
    "operation": "...",
    "role": "user",
    "contactId": "<PreviousStep.field>",
    "perPage": 50,
    "queryJson": "...",
    "conversationId": "<PreviousStep.field>",
    "message": "<PreviousStep.field>",
    "ticketJson": "...",
    "ticketId": "<PreviousStep.field>"
  }
}
```

Limits and failure modes [#limits-and-failure-modes]

* Requires a connected Intercom integration. Calls fail if that integration is disconnected or its authorization has expired.
* Required fields (`resource`, `operation`, `contactId`, `queryJson`, `conversationId`, `message`, `ticketJson`, `ticketId`) must be set, or the block fails validation before it runs.
* On failure the `error` output is populated; downstream blocks that reference other outputs may not receive values.

Related [#related]

* [All workflow blocks](/reference/blocks)
* [Workflow Builder overview](/workflow-builder-overview)
* [Integrations](/integrations)