# Intercom

> Manage Intercom contacts, companies and tags, send messages, create tickets, and reply to, assign and close conversations.

App · Help Desk · 20 actions. Web page: https://docs.lodol.com/docs/integrations/intercom

## Actions

### Add a note to an Intercom contact

Add an internal note to a contact's profile.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Note (`body`, text, required): The note text. Basic HTML is allowed.
- Author (`admin_id`, text): The teammate shown as the note's author.

**Outputs**

- `author` (object)
- `body` (text)
- `contact` (object)
- `created_at` (number)
- `id` (text)
- `type` (text)

**Example output**

```json
{
  "author": {
    "email": "jordan@example.com",
    "id": "991267645",
    "name": "Jordan Avery",
    "type": "admin"
  },
  "body": "<p>Called about renewal.</p>",
  "contact": {
    "id": "6657ab1c2d3e4f5a6b7c8d9e",
    "type": "contact"
  },
  "created_at": 1734537243,
  "id": "34",
  "type": "note"
}
```

### Attach an Intercom contact to a company

Link a contact to a company.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Company (Intercom id) (`intercom_company_id`, text, required): The company's Intercom id (the 'id' returned by Create or update company), not your own Company ID.

**Outputs**

- `app_id` (text)
- `company_id` (text)
- `created_at` (number)
- `custom_attributes` (object)
- `id` (text)
- `industry` (text)
- `last_request_at` (number)
- `monthly_spend` (number)
- `name` (text)
- `plan` (object)
- `remote_created_at` (number)
- `session_count` (number)
- `size` (number)
- `tags` (object)
- `type` (text)
- `updated_at` (number)
- `user_count` (number)
- `website` (text)

**Example output**

```json
{
  "app_id": "abc123de",
  "company_id": "acme-001",
  "created_at": 1734537243,
  "custom_attributes": {},
  "id": "6762f0761bb69f9f2193bbd1",
  "industry": "Software",
  "monthly_spend": 1200,
  "name": "Acme Inc",
  "plan": {
    "id": "269315",
    "name": "Pro",
    "type": "plan"
  },
  "remote_created_at": 1734537243,
  "session_count": 0,
  "size": 50,
  "tags": {
    "tags": [],
    "type": "tag.list"
  },
  "type": "company",
  "updated_at": 1734537243,
  "user_count": 1,
  "website": "https://acme.example.com"
}
```

### Close, snooze, reopen or assign an Intercom conversation

Change a conversation's state or assignee. Needs an active Intercom subscription or a development workspace.

**Inputs**

- Conversation ID (`conversation_id`, text, required): The conversation's id (all digits), or its URL from the Intercom inbox.
- Action (`operation`, text, required): What to do with the conversation. One of: `close`, `snooze`, `open` (Reopen), `assign`.
- Teammate (`admin_id`, text, required): The teammate performing this action.
- Snooze until (`snoozed_until`, date and time): Snooze only: when the conversation reopens.
- Assign to teammate (`assign_to_admin_id`, text): Assign only: the teammate to assign. Or pick a team.
- Assign to team (`assign_to_team_id`, text): Assign only: the team to assign. Or pick a teammate.
- Message (`body`, text): Close or assign only: an optional message to post.

**Outputs**

- `admin_assignee_id` (number)
- `contacts` (object)
- `conversation_parts` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `id` (text)
- `open` (true/false)
- `priority` (text)
- `read` (true/false)
- `sla_applied` (object)
- `snoozed_until` (number)
- `source` (object)
- `state` (text)
- `tags` (object)
- `team_assignee_id` (number)
- `teammates` (object)
- `title` (text)
- `type` (text)
- `updated_at` (number)
- `waiting_since` (number)

**Example output**

```json
{
  "admin_assignee_id": 0,
  "contacts": {
    "contacts": [
      {
        "external_id": "customer-1042",
        "id": "6657ab1c2d3e4f5a6b7c8d9e",
        "type": "contact"
      }
    ],
    "type": "contact.list"
  },
  "conversation_parts": {
    "conversation_parts": [],
    "total_count": 0,
    "type": "conversation_part.list"
  },
  "created_at": 1734537243,
  "id": "215469619658613",
  "open": false,
  "priority": "none",
  "read": false,
  "snoozed_until": null,
  "source": {
    "author": {
      "email": "sam.lee@example.com",
      "id": "6657ab1c2d3e4f5a6b7c8d9e",
      "name": "Sam Lee",
      "type": "user"
    },
    "body": "<p>Hi, I need help with my order.</p>",
    "delivered_as": "customer_initiated",
    "id": "403918330",
    "subject": "",
    "type": "conversation"
  },
  "state": "closed",
  "tags": {
    "tags": [],
    "type": "tag.list"
  },
  "team_assignee_id": 0,
  "title": null,
  "type": "conversation",
  "updated_at": 1734537300,
  "waiting_since": 1734537243
}
```

### Create an Intercom contact

Create a user or lead. A user needs an email or an external id.

**Inputs**

- Role (`role`, text): A user (a known customer) or a lead. One of: `user`, `lead`. Default: `user`.
- Email (`email`, text): The contact's email address.
- External ID (`external_id`, text): Your own id for this person, unique in the workspace.
- Name (`name`, text): The contact's full name.
- Phone (`phone`, text): The contact's phone number.
- Avatar URL (`avatar`, text): A public image URL for the contact's avatar.
- Signed up at (`signed_up_at`, date and time): When the person signed up for your product.
- Last seen at (`last_seen_at`, date and time): When the person was last seen using your product.
- Owner (`owner_id`, text): The teammate who owns this contact.
- Unsubscribed from emails (`unsubscribed_from_emails`, true/false): Whether the contact has opted out of email.
- Email verified (`email_verified`, true/false): Mark the email as verified. Needs Email filled in in this step.
- Custom attributes (`custom_attributes`, object): Custom data attributes to set, as keys and values. Each key must already exist as a data attribute in Intercom Settings.

**Outputs**

- `avatar` (object)
- `browser` (text)
- `companies` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `email` (text)
- `email_domain` (text)
- `external_id` (text)
- `has_hard_bounced` (true/false)
- `id` (text)
- `language_override` (text)
- `last_contacted_at` (number)
- `last_email_clicked_at` (number)
- `last_email_opened_at` (number)
- `last_replied_at` (number)
- `last_seen_at` (number)
- `location` (object)
- `marked_email_as_spam` (true/false)
- `merge_history` (list)
- `name` (text)
- `notes` (object)
- `os` (text)
- `owner_id` (text)
- `phone` (text)
- `role` (text)
- `signed_up_at` (number)
- `social_profiles` (object)
- `tags` (object)
- `type` (text)
- `unsubscribed_from_emails` (true/false)
- `updated_at` (number)
- `workspace_id` (text)

**Example output**

```json
{
  "companies": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "created_at": 1734537243,
  "custom_attributes": {},
  "email": "sam.lee@example.com",
  "email_domain": "example.com",
  "external_id": "customer-1042",
  "has_hard_bounced": false,
  "id": "6657ab1c2d3e4f5a6b7c8d9e",
  "last_seen_at": null,
  "location": {
    "city": null,
    "country": null,
    "region": null,
    "type": "location"
  },
  "marked_email_as_spam": false,
  "name": "Sam Lee",
  "notes": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "owner_id": null,
  "phone": null,
  "role": "user",
  "signed_up_at": null,
  "tags": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "type": "contact",
  "unsubscribed_from_emails": false,
  "updated_at": 1734537243,
  "workspace_id": "abc123de"
}
```

### Create an Intercom tag

Create a tag, or return the existing one with that name (names are not case-sensitive). Pick a tag to rename it instead.

**Inputs**

- Name (`name`, text, required): The tag's name.
- Tag to rename (`tag_id`, text): Optional. Choose a tag to rename it to Name.

**Outputs**

- `applied_at` (number)
- `applied_by` (object)
- `id` (text)
- `name` (text)
- `type` (text)

**Example output**

```json
{
  "id": "81",
  "name": "VIP",
  "type": "tag"
}
```

### Create an Intercom ticket

Create a ticket for one contact. Any other attributes the ticket type requires go in Other attributes.

**Inputs**

- Ticket type (`ticket_type_id`, text, required): The kind of ticket to create.
- Title (`title`, text, required): The ticket's title.
- Description (`description`, text): The ticket's description.
- Contact ID (`contact_id`, text): The contact's Intercom id. Fill in this or Contact email.
- Contact email (`contact_email`, text): The contact's email. Fill in this or Contact ID.
- Other attributes (`ticket_attributes`, object): Other ticket attributes, keyed by attribute name. For a list attribute, use the list option's id.
- Company (Intercom id) (`intercom_company_id`, text): Optional. The company this ticket is for.
- Link to conversation (`conversation_to_link_id`, text): Optional. A conversation id to link the ticket to.
- Assign to teammate (`admin_assignee_id`, text): Optional.
- Assign to team (`team_assignee_id`, text): Optional.
- Skip notifications (`skip_notifications`, true/false): Do not notify the contact or teammates.

**Outputs**

- `admin_assignee_id` (number)
- `category` (text)
- `contacts` (object)
- `created_at` (number)
- `id` (text)
- `is_shared` (true/false)
- `open` (true/false)
- `snoozed_until` (number)
- `team_assignee_id` (number)
- `ticket_attributes` (object)
- `ticket_id` (text)
- `ticket_state` (object)
- `ticket_type` (object)
- `type` (text)
- `updated_at` (number)

**Example output**

```json
{
  "admin_assignee_id": 0,
  "category": "Customer",
  "contacts": {
    "contacts": [
      {
        "id": "6657ab1c2d3e4f5a6b7c8d9e",
        "type": "contact"
      }
    ],
    "type": "contact.list"
  },
  "created_at": 1734537243,
  "id": "494",
  "is_shared": true,
  "open": true,
  "snoozed_until": null,
  "team_assignee_id": 0,
  "ticket_attributes": {
    "_default_description_": "Card is declined.",
    "_default_title_": "Checkout fails"
  },
  "ticket_id": "48",
  "ticket_state": {
    "category": "submitted",
    "external_label": "Submitted",
    "id": "8173",
    "internal_label": "Submitted",
    "type": "ticket_state"
  },
  "ticket_type": {
    "archived": false,
    "category": "Customer",
    "created_at": 1734537243,
    "description": "A bug a customer has reported.",
    "icon": "\ud83d\udc1e",
    "id": "1295",
    "name": "Bug report",
    "type": "ticket_type",
    "updated_at": 1734537243,
    "workspace_id": "abc123de"
  },
  "type": "ticket",
  "updated_at": 1734537243
}
```

### Create or update an Intercom company

Create a company, or update the one with the same Company ID. Intercom only shows a company once a contact is attached.

**Inputs**

- Company ID (`company_id`, text, required): Your own id for the company. An existing company with this id is updated.
- Name (`name`, text): The company's name.
- Plan (`plan`, text): The name of the plan the company is on.
- Employees (`size`, number): The number of employees. At least 0.
- Website (`website`, text): The company's website URL.
- Industry (`industry`, text): The company's industry.
- Monthly spend (`monthly_spend`, number): How much the company pays you each month, in whole units. At least 0.
- Created in your system at (`remote_created_at`, date and time): When the company was created in your own system.
- Mark as active now (`update_last_request_at`, true/false): Set the company's last-request time to now.
- Custom attributes (`custom_attributes`, object): Custom data attributes to set, as keys and values. Each key must already exist as a data attribute in Intercom Settings.

**Outputs**

- `app_id` (text)
- `company_id` (text)
- `created_at` (number)
- `custom_attributes` (object)
- `id` (text)
- `industry` (text)
- `last_request_at` (number)
- `monthly_spend` (number)
- `name` (text)
- `plan` (object)
- `remote_created_at` (number)
- `session_count` (number)
- `size` (number)
- `tags` (object)
- `type` (text)
- `updated_at` (number)
- `user_count` (number)
- `website` (text)

**Example output**

```json
{
  "app_id": "abc123de",
  "company_id": "acme-001",
  "created_at": 1734537243,
  "custom_attributes": {},
  "id": "6762f0761bb69f9f2193bbd1",
  "industry": "Software",
  "monthly_spend": 1200,
  "name": "Acme Inc",
  "plan": {
    "id": "269315",
    "name": "Pro",
    "type": "plan"
  },
  "remote_created_at": 1734537243,
  "session_count": 0,
  "size": 50,
  "tags": {
    "tags": [],
    "type": "tag.list"
  },
  "type": "company",
  "updated_at": 1734537243,
  "user_count": 1,
  "website": "https://acme.example.com"
}
```

### Delete an Intercom contact

Permanently delete a contact.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.

**Outputs**

- `deleted` (true/false)
- `external_id` (text)
- `id` (text)
- `type` (text)

**Example output**

```json
{
  "deleted": true,
  "external_id": "customer-1042",
  "id": "6657ab1c2d3e4f5a6b7c8d9e",
  "type": "contact"
}
```

### Get an Intercom contact

Fetch one contact by id.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Include merge history (`include_merge_history`, true/false): Also return the contacts merged into this one.

**Outputs**

- `avatar` (object)
- `browser` (text)
- `companies` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `email` (text)
- `email_domain` (text)
- `external_id` (text)
- `has_hard_bounced` (true/false)
- `id` (text)
- `language_override` (text)
- `last_contacted_at` (number)
- `last_email_clicked_at` (number)
- `last_email_opened_at` (number)
- `last_replied_at` (number)
- `last_seen_at` (number)
- `location` (object)
- `marked_email_as_spam` (true/false)
- `merge_history` (list)
- `name` (text)
- `notes` (object)
- `os` (text)
- `owner_id` (text)
- `phone` (text)
- `role` (text)
- `signed_up_at` (number)
- `social_profiles` (object)
- `tags` (object)
- `type` (text)
- `unsubscribed_from_emails` (true/false)
- `updated_at` (number)
- `workspace_id` (text)

**Example output**

```json
{
  "companies": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "created_at": 1734537243,
  "custom_attributes": {},
  "email": "sam.lee@example.com",
  "email_domain": "example.com",
  "external_id": "customer-1042",
  "has_hard_bounced": false,
  "id": "6657ab1c2d3e4f5a6b7c8d9e",
  "last_seen_at": null,
  "location": {
    "city": null,
    "country": null,
    "region": null,
    "type": "location"
  },
  "marked_email_as_spam": false,
  "name": "Sam Lee",
  "notes": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "owner_id": null,
  "phone": null,
  "role": "user",
  "signed_up_at": null,
  "tags": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "type": "contact",
  "unsubscribed_from_emails": false,
  "updated_at": 1734537243,
  "workspace_id": "abc123de"
}
```

### Get an Intercom conversation

Fetch a conversation with up to its 500 most recent parts.

**Inputs**

- Conversation ID (`conversation_id`, text, required): The conversation's id (all digits), or its URL from the Intercom inbox.
- Plain text (`plaintext`, true/false): Return message bodies as plain text instead of HTML.

**Outputs**

- `admin_assignee_id` (number)
- `contacts` (object)
- `conversation_parts` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `id` (text)
- `open` (true/false)
- `priority` (text)
- `read` (true/false)
- `sla_applied` (object)
- `snoozed_until` (number)
- `source` (object)
- `state` (text)
- `tags` (object)
- `team_assignee_id` (number)
- `teammates` (object)
- `title` (text)
- `type` (text)
- `updated_at` (number)
- `waiting_since` (number)

**Example output**

```json
{
  "admin_assignee_id": 0,
  "contacts": {
    "contacts": [
      {
        "external_id": "customer-1042",
        "id": "6657ab1c2d3e4f5a6b7c8d9e",
        "type": "contact"
      }
    ],
    "type": "contact.list"
  },
  "conversation_parts": {
    "conversation_parts": [],
    "total_count": 0,
    "type": "conversation_part.list"
  },
  "created_at": 1734537243,
  "id": "215469619658613",
  "open": true,
  "priority": "none",
  "read": false,
  "snoozed_until": null,
  "source": {
    "author": {
      "email": "sam.lee@example.com",
      "id": "6657ab1c2d3e4f5a6b7c8d9e",
      "name": "Sam Lee",
      "type": "user"
    },
    "body": "<p>Hi, I need help with my order.</p>",
    "delivered_as": "customer_initiated",
    "id": "403918330",
    "subject": "",
    "type": "conversation"
  },
  "state": "open",
  "tags": {
    "tags": [],
    "type": "tag.list"
  },
  "team_assignee_id": 0,
  "title": null,
  "type": "conversation",
  "updated_at": 1734537300,
  "waiting_since": 1734537243
}
```

### Get the connected Intercom teammate

Return the teammate the access token belongs to, with the workspace's name, region and timezone.

**Inputs**: None.

**Outputs**

- `app` (object)
- `avatar` (object)
- `away_mode_enabled` (true/false)
- `away_mode_reassign` (true/false)
- `email` (text)
- `email_verified` (true/false)
- `has_inbox_seat` (true/false)
- `id` (text)
- `job_title` (text)
- `name` (text)
- `team_ids` (list)
- `type` (text)

**Example output**

```json
{
  "app": {
    "created_at": 1717022390,
    "id_code": "abc123de",
    "identity_verification": false,
    "name": "Example Co",
    "region": "US",
    "timezone": "America/New_York",
    "type": "app"
  },
  "away_mode_enabled": false,
  "away_mode_reassign": false,
  "email": "jordan@example.com",
  "email_verified": true,
  "has_inbox_seat": true,
  "id": "991267645",
  "job_title": "Support Lead",
  "name": "Jordan Avery",
  "team_ids": [
    814865
  ],
  "type": "admin"
}
```

### List Intercom tags

List every tag in the workspace.

**Inputs**: None.

**Outputs**

- `data` (list)
- `total_count` (number)

**Example output**

```json
{
  "data": [
    {
      "applied_at": 1734537243,
      "applied_by": {
        "id": "991267645",
        "type": "admin"
      },
      "id": "81",
      "name": "VIP",
      "type": "tag"
    }
  ],
  "total_count": 1
}
```

### List Intercom ticket types

List the workspace's ticket types, leaving out archived ones.

**Inputs**

- Category (`category`, text): Only ticket types in this category. One of: `Customer`, `Back-office`, `Tracker`.
- Include archived (`include_archived`, true/false): Also return archived ticket types.

**Outputs**

- `data` (list)
- `total_count` (number)

**Example output**

```json
{
  "data": [
    {
      "archived": false,
      "category": "Customer",
      "created_at": 1734537243,
      "description": "A bug a customer has reported.",
      "icon": "\ud83d\udc1e",
      "id": "1295",
      "name": "Bug report",
      "type": "ticket_type",
      "updated_at": 1734537243,
      "workspace_id": "abc123de"
    }
  ],
  "total_count": 1
}
```

### Reply to an Intercom conversation

Reply as a teammate, add an internal note, or reply as the contact.

**Inputs**

- Conversation ID (`conversation_id`, text, required): The conversation's id (all digits), or its URL from the Intercom inbox.
- Reply as (`reply_type`, text): Who the reply is from, and who can see it. One of: `comment` (Reply as teammate (visible to the contact)), `note` (Internal note (teammates only)), `contact` (Reply as the contact). Default: `comment`.
- Teammate (`admin_id`, text): The teammate shown as the author. Required unless replying as the contact.
- Contact ID (`contact_id`, text): Required only when replying as the contact.
- Message (`body`, text, required): The reply text. Notes accept basic HTML.
- Attachment URLs (`attachment_urls`, list): Up to 10 public image URLs to attach.
- Skip notifications (`skip_notifications`, true/false): Teammate replies only: do not send notifications.

**Outputs**

- `admin_assignee_id` (number)
- `contacts` (object)
- `conversation_parts` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `id` (text)
- `open` (true/false)
- `priority` (text)
- `read` (true/false)
- `sla_applied` (object)
- `snoozed_until` (number)
- `source` (object)
- `state` (text)
- `tags` (object)
- `team_assignee_id` (number)
- `teammates` (object)
- `title` (text)
- `type` (text)
- `updated_at` (number)
- `waiting_since` (number)

**Example output**

```json
{
  "admin_assignee_id": 0,
  "contacts": {
    "contacts": [
      {
        "external_id": "customer-1042",
        "id": "6657ab1c2d3e4f5a6b7c8d9e",
        "type": "contact"
      }
    ],
    "type": "contact.list"
  },
  "conversation_parts": {
    "conversation_parts": [],
    "total_count": 0,
    "type": "conversation_part.list"
  },
  "created_at": 1734537243,
  "id": "215469619658613",
  "open": true,
  "priority": "none",
  "read": false,
  "snoozed_until": null,
  "source": {
    "author": {
      "email": "sam.lee@example.com",
      "id": "6657ab1c2d3e4f5a6b7c8d9e",
      "name": "Sam Lee",
      "type": "user"
    },
    "body": "<p>Hi, I need help with my order.</p>",
    "delivered_as": "customer_initiated",
    "id": "403918330",
    "subject": "",
    "type": "conversation"
  },
  "state": "open",
  "tags": {
    "tags": [],
    "type": "tag.list"
  },
  "team_assignee_id": 0,
  "title": null,
  "type": "conversation",
  "updated_at": 1734537300,
  "waiting_since": 1734537243
}
```

### Search Intercom contacts

Find contacts by one field, or by a full Intercom query. A contact created in the last few minutes may not be searchable yet.

**Inputs**

- Search on (`field`, text): The contact field to match. One of: `email`, `name`, `role` (Role (user or lead)), `external_id` (External ID), `id` (Intercom contact ID), `phone`, `email_domain` (Email domain), `owner_id` (Owner (teammate ID)), `tag_id` (Tag ID), `segment_id` (Segment ID), and 9 more. Default: `email`.
- Match (`operator`, text): How to compare. Date fields allow only equals, before and after. One of: `=` (equals), `!=` (does not equal), `IN` (is one of (comma-separated)), `NIN` (is none of (comma-separated)), `<` (less than / before), `<=` (less than or equal), `>` (greater than / after), `>=` (greater than or equal), `~` (contains), `!~` (does not contain), `^` (starts with), `$` (ends with). Default: `=`.
- Value (`value`, text): What to match. For a date field use a date such as 2026-09-01; for 'is one of', separate values with commas.
- Advanced query (`query`, object): Optional. A full Intercom search query, used instead of the fields above, e.g. {"operator": "AND", "value": [{"field": "role", "operator": "=", "value": "user"}]}.
- Sort by (`sort_field`, text): Order the results by this field. One of: `created_at` (Created), `updated_at` (Updated), `last_seen_at` (Last seen), `signed_up_at` (Signed up), `name`, `email`.
- Sort order (`sort_order`, text): Direction of the sort. One of: `ascending`, `descending`. Default: `descending`.
- Results per page (`per_page`, number): How many results to return, 1-150. From 1 to 150.
- Next page cursor (`starting_after`, text): To get the next page, paste next_starting_after from the previous search. Leave blank for the first page.

**Outputs**

- `data` (list)
- `next_starting_after` (text)
- `pages` (object)
- `total_count` (number)

**Example output**

```json
{
  "data": [
    {
      "companies": {
        "data": [],
        "has_more": false,
        "total_count": 0,
        "url": ""
      },
      "created_at": 1734537243,
      "custom_attributes": {},
      "email": "sam.lee@example.com",
      "email_domain": "example.com",
      "external_id": "customer-1042",
      "has_hard_bounced": false,
      "id": "6657ab1c2d3e4f5a6b7c8d9e",
      "last_seen_at": null,
      "location": {
        "city": null,
        "country": null,
        "region": null,
        "type": "location"
      },
      "marked_email_as_spam": false,
      "name": "Sam Lee",
      "notes": {
        "data": [],
        "has_more": false,
        "total_count": 0,
        "url": ""
      },
      "owner_id": null,
      "phone": null,
      "role": "user",
      "signed_up_at": null,
      "tags": {
        "data": [],
        "has_more": false,
        "total_count": 0,
        "url": ""
      },
      "type": "contact",
      "unsubscribed_from_emails": false,
      "updated_at": 1734537243,
      "workspace_id": "abc123de"
    }
  ],
  "next_starting_after": null,
  "pages": {
    "page": 1,
    "per_page": 50,
    "total_pages": 1,
    "type": "pages"
  },
  "total_count": 1
}
```

### Search Intercom conversations

Find conversations by state, contact, assignee and created date. Filters you fill in are combined; leave all blank to list every conversation.

**Inputs**

- State (`state`, text): Only conversations in this state. One of: `open`, `closed`, `snoozed`.
- Contact ID (`contact_id`, text): Only conversations with this contact.
- Assigned teammate (`admin_assignee_id`, text): Only conversations assigned to this teammate.
- Assigned team (`team_assignee_id`, text): Only conversations assigned to this team.
- Created on or after (`created_on_or_after`, date): Only conversations started on or after this day.
- Created on or before (`created_on_or_before`, date): Only conversations started on or before this day.
- Advanced query (`query`, object): Optional. An extra Intercom search filter, combined with the ones above, e.g. {"field": "source.author.email", "operator": "=", "value": "sam@example.com"}.
- Results per page (`per_page`, number): How many results to return, 1-150. From 1 to 150.
- Next page cursor (`starting_after`, text): To get the next page, paste next_starting_after from the previous search. Leave blank for the first page.

**Outputs**

- `conversations` (list)
- `next_starting_after` (text)
- `pages` (object)
- `total_count` (number)

**Example output**

```json
{
  "conversations": [
    {
      "admin_assignee_id": 0,
      "contacts": {
        "contacts": [
          {
            "external_id": "customer-1042",
            "id": "6657ab1c2d3e4f5a6b7c8d9e",
            "type": "contact"
          }
        ],
        "type": "contact.list"
      },
      "created_at": 1734537243,
      "id": "215469619658613",
      "open": true,
      "priority": "none",
      "read": false,
      "snoozed_until": null,
      "source": {
        "author": {
          "email": "sam.lee@example.com",
          "id": "6657ab1c2d3e4f5a6b7c8d9e",
          "name": "Sam Lee",
          "type": "user"
        },
        "body": "<p>Hi, I need help with my order.</p>",
        "delivered_as": "customer_initiated",
        "id": "403918330",
        "subject": "",
        "type": "conversation"
      },
      "state": "open",
      "tags": {
        "tags": [],
        "type": "tag.list"
      },
      "team_assignee_id": 0,
      "title": null,
      "type": "conversation",
      "updated_at": 1734537300,
      "waiting_since": 1734537243
    }
  ],
  "next_starting_after": null,
  "pages": {
    "page": 1,
    "per_page": 20,
    "total_pages": 1,
    "type": "pages"
  },
  "total_count": 1
}
```

### Send an Intercom message

Send an in-app message or an email from a teammate to a contact. Needs an active Intercom subscription or a development workspace.

**Inputs**

- Send as (`message_type`, text): In-app message or email. One of: `in_app` (In-app message), `email`. Default: `in_app`.
- From teammate (`from_admin_id`, text, required): The teammate the message is sent from.
- To contact ID (`to_contact_id`, text, required): The recipient's Intercom contact id.
- Recipient is a (`to_contact_role`, text): Whether the recipient is a user or a lead. One of: `user`, `lead`. Default: `user`.
- Subject (`subject`, text): Required for email.
- Message (`body`, text, required): The message body. Basic HTML is allowed.
- Email style (`template`, text): For email only. One of: `plain`, `personal` (Personal (with teammate avatar)). Default: `plain`.
- Open a conversation now (`create_conversation_without_contact_reply`, true/false): Create the conversation straight away instead of waiting for the contact to reply.

**Outputs**

- `body` (text)
- `conversation_id` (text)
- `created_at` (number)
- `id` (text)
- `message_type` (text)
- `subject` (text)
- `type` (text)

**Example output**

```json
{
  "body": "Hi, I need help with my order.",
  "conversation_id": "215469619658613",
  "created_at": 1734537243,
  "id": "403918330",
  "message_type": "inapp",
  "subject": "",
  "type": "admin_message"
}
```

### Start an Intercom conversation

Start an in-app conversation as if the contact wrote in. Use the returned conversation_id in later steps. Needs an active Intercom subscription or a development workspace.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Contact is a (`contact_role`, text): Whether the contact is a user or a lead. One of: `user`, `lead`. Default: `user`.
- Message (`body`, text, required): What the contact says.
- Subject (`subject`, text): Optional.
- Attachment URLs (`attachment_urls`, list): Up to 10 public image URLs to attach.

**Outputs**

- `body` (text)
- `conversation_id` (text)
- `created_at` (number)
- `id` (text)
- `message_type` (text)
- `subject` (text)
- `type` (text)

**Example output**

```json
{
  "body": "Hi, I need help with my order.",
  "conversation_id": "215469619658613",
  "created_at": 1734537243,
  "id": "403918330",
  "message_type": "inapp",
  "subject": "",
  "type": "user_message"
}
```

### Tag an Intercom contact

Apply an existing tag to a contact.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Tag (`tag_id`, text, required): The tag to apply.

**Outputs**

- `applied_at` (number)
- `applied_by` (object)
- `id` (text)
- `name` (text)
- `type` (text)

**Example output**

```json
{
  "applied_at": 1734537243,
  "applied_by": {
    "id": "991267645",
    "type": "admin"
  },
  "id": "81",
  "name": "VIP",
  "type": "tag"
}
```

### Update an Intercom contact

Change a contact. Fields left blank are not changed.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's Intercom id (such as 6657ab1c2d3e4f5a6b7c8d9e), or the contact's page URL from Intercom.
- Role (`role`, text): Change the contact to a user or a lead. One of: `user`, `lead`.
- Email (`email`, text): The contact's email address.
- External ID (`external_id`, text): Your own id for this person, unique in the workspace.
- Name (`name`, text): The contact's full name.
- Phone (`phone`, text): The contact's phone number.
- Avatar URL (`avatar`, text): A public image URL for the contact's avatar.
- Signed up at (`signed_up_at`, date and time): When the person signed up for your product.
- Last seen at (`last_seen_at`, date and time): When the person was last seen using your product.
- Owner (`owner_id`, text): The teammate who owns this contact.
- Unsubscribed from emails (`unsubscribed_from_emails`, true/false): Whether the contact has opted out of email.
- Email verified (`email_verified`, true/false): Mark the email as verified. Needs Email filled in in this step.
- Custom attributes (`custom_attributes`, object): Custom data attributes to set, as keys and values. Each key must already exist as a data attribute in Intercom Settings.

**Outputs**

- `avatar` (object)
- `browser` (text)
- `companies` (object)
- `created_at` (number)
- `custom_attributes` (object)
- `email` (text)
- `email_domain` (text)
- `external_id` (text)
- `has_hard_bounced` (true/false)
- `id` (text)
- `language_override` (text)
- `last_contacted_at` (number)
- `last_email_clicked_at` (number)
- `last_email_opened_at` (number)
- `last_replied_at` (number)
- `last_seen_at` (number)
- `location` (object)
- `marked_email_as_spam` (true/false)
- `merge_history` (list)
- `name` (text)
- `notes` (object)
- `os` (text)
- `owner_id` (text)
- `phone` (text)
- `role` (text)
- `signed_up_at` (number)
- `social_profiles` (object)
- `tags` (object)
- `type` (text)
- `unsubscribed_from_emails` (true/false)
- `updated_at` (number)
- `workspace_id` (text)

**Example output**

```json
{
  "companies": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "created_at": 1734537243,
  "custom_attributes": {},
  "email": "sam.lee@example.com",
  "email_domain": "example.com",
  "external_id": "customer-1042",
  "has_hard_bounced": false,
  "id": "6657ab1c2d3e4f5a6b7c8d9e",
  "last_seen_at": null,
  "location": {
    "city": null,
    "country": null,
    "region": null,
    "type": "location"
  },
  "marked_email_as_spam": false,
  "name": "Sam Lee",
  "notes": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "owner_id": null,
  "phone": null,
  "role": "user",
  "signed_up_at": null,
  "tags": {
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": ""
  },
  "type": "contact",
  "unsubscribed_from_emails": false,
  "updated_at": 1734537243,
  "workspace_id": "abc123de"
}
```
