> ## 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: Inputs, Cost & CLI Example

> Create a message. Intercom Intercom Create Message docs include request fields, response shape, pricing notes, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=intercom_create_message:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                                                | Type                  | Required | Default | Description                                                                                                                           |
| --------------------------------------------------- | --------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.message_type`                              | `"in_app" \| "email"` | No       |         | The kind of message being created. Values: `in_app` or `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. |

### Allowed values

| Field                  | Allowed values    |
| ---------------------- | ----------------- |
| `payload.message_type` | `in_app`, `email` |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "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 Schema

| Name          | Type     | Required | Default | Description                                                                                                                   |
| ------------- | -------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `result.data` | `object` | Yes      |         | Message are how you reach out to contacts in Intercom. They are created when an admin sends an outbound message to a contact. |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging).                                                                                |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "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>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute intercom_create_message --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

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