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

# Intercom: Create Message

> Send an in-app or email message from an Intercom admin to a contact. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Send an in-app or email message from an Intercom admin to a contact.

> [!NOTE]
>
> Tool ID: `intercom_create_message`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'intercom_create_message',
  {
    "message_type": "in_app",
    "subject": "Introduction",
    "body": "Example message"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute intercom_create_message --input '{
  "message_type": "in_app",
  "subject": "Introduction",
  "body": "Example message"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "type": "example",
    "id": "id_123",
    "created_at": 123,
    "body": "Example message",
    "message_type": "email"
  }
}
```

Use `deepline describe intercom_create_message --json` for the latest machine-readable contract.

## Input reference

You can create a message

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.message_type` | `"in_app" \| "email"` | No | — | The kind of message being created. Values: `in_app` or `email`. Allowed: `in_app`, `email`. |
| `payload.subject` | `string` | No | — | The title of the email. |
| `payload.body` | `string` | No | — | The content of the message. HTML and plaintext are supported. |
| `payload.template` | `string` | No | — | The style of the outgoing message. Possible values `plain` or `personal`. |
| `payload.from` | `object` | No | — | The sender of the message. If not provided, the default sender will be used. |
| `payload.to` | `object` | No | — | — |
| `payload.cc` | `object` | No | — | — |
| `payload.bcc` | `object` | No | — | — |
| `payload.created_at` | `integer` | No | — | The time the message was created. If not provided, the current time will be used. |
| `payload.create_conversation_without_contact_reply` | `boolean` | No | `false` | Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "You can create a message",
    "properties": {
      "message_type": {
        "type": "string",
        "description": "The kind of message being created. Values: `in_app` or `email`.",
        "enum": [
          "in_app",
          "email"
        ]
      },
      "subject": {
        "type": "string",
        "description": "The title of the email."
      },
      "body": {
        "type": "string",
        "description": "The content of the message. HTML and plaintext are supported."
      },
      "template": {
        "type": "string",
        "description": "The style of the outgoing message. Possible values `plain` or `personal`."
      },
      "from": {
        "type": "object",
        "description": "The sender of the message. If not provided, the default sender will be used.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Always `admin`.",
            "enum": [
              "admin"
            ]
          },
          "id": {
            "type": "integer",
            "description": "The identifier for the admin which is given by Intercom."
          }
        },
        "required": [
          "type",
          "id"
        ],
        "additionalProperties": false
      },
      "to": {
        "type": "object",
        "additionalProperties": true
      },
      "cc": {
        "type": "object",
        "additionalProperties": true
      },
      "bcc": {
        "type": "object",
        "additionalProperties": true
      },
      "created_at": {
        "type": "integer",
        "description": "The time the message was created. If not provided, the current time will be used."
      },
      "create_conversation_without_contact_reply": {
        "type": "boolean",
        "description": "Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided.",
        "default": false
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Message are how you contact contacts in Intercom. They are created when an admin sends an outbound message to a contact. |
| `result.data.type` | `string` | Yes | — | The type of the message |
| `result.data.id` | `string` | Yes | — | The id representing the message. |
| `result.data.created_at` | `integer` | Yes | — | The time the conversation was created. Format: `date-time`. |
| `result.data.subject` | `string` | No | — | The subject of the message. Only present if message\_type: email. |
| `result.data.body` | `string` | Yes | — | The message body, which may contain HTML. |
| `result.data.message_type` | `"email" \| "inapp" \| "facebook" \| "twitter"` | Yes | — | The type of message that was sent. Can be email, inapp, facebook or twitter. Allowed: `email`, `inapp`, `facebook`, `twitter`. |
| `result.data.conversation_id` | `string` | No | — | The associated conversation\_id |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Message are how you reach out to contacts in Intercom. They are created when an admin sends an outbound message to a contact.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of the message"
          },
          "id": {
            "type": "string",
            "description": "The id representing the message."
          },
          "created_at": {
            "type": "integer",
            "description": "The time the conversation was created.",
            "format": "date-time"
          },
          "subject": {
            "type": "string",
            "description": "The subject of the message. Only present if message_type: email."
          },
          "body": {
            "type": "string",
            "description": "The message body, which may contain HTML."
          },
          "message_type": {
            "type": "string",
            "description": "The type of message that was sent. Can be email, inapp, facebook or twitter.",
            "enum": [
              "email",
              "inapp",
              "facebook",
              "twitter"
            ]
          },
          "conversation_id": {
            "type": "string",
            "description": "The associated conversation_id"
          }
        },
        "required": [
          "type",
          "id",
          "created_at",
          "body",
          "message_type"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Intercom provider guide](https://deepline.com/docs/providers/intercom/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.