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

# Communication Triggers

> Triggers that fire in response to incoming emails, the end of an Odin-recorded meeting, or a Telegram bot message.

Communication triggers fire in response to incoming emails, the conclusion of an Odin-recorded meeting, or a message received by a Telegram bot.

## Email

Polls a Gmail or Office 365 inbox and fires the workflow when a matching email is found. You can filter by sender address, subject line keywords, and read status. Attachments can optionally be included and passed to downstream nodes.

**When to use it**

* You want a workflow to react automatically when a specific email arrives.
* You are building an email-to-action pipeline (e.g., receive an invoice by email → extract data → create a record in a CRM).
* You need to process email attachments programmatically.

**Configuration**

<Tabs>
  <Tab title="Gmail">
    | Setting                       | Type    | Description                                                     |
    | ----------------------------- | ------- | --------------------------------------------------------------- |
    | `email_provider`              | String  | Set to `gmail`.                                                 |
    | `poll_interval`               | Integer | How frequently the inbox is checked, in seconds.                |
    | `filters.unread_only`         | Boolean | When `true`, only unread emails trigger the workflow.           |
    | `filters.from_email`          | String  | Only trigger on emails from this sender address.                |
    | `filters.subject_contains`    | String  | Only trigger when the subject contains this keyword or phrase.  |
    | `options.include_attachments` | Boolean | When `true`, attachment data is included in the trigger output. |

    <Note>
      A Gmail OAuth connection must be configured on the project before using this trigger.
    </Note>
  </Tab>

  <Tab title="Office 365">
    | Setting                       | Type    | Description                                                     |
    | ----------------------------- | ------- | --------------------------------------------------------------- |
    | `email_provider`              | String  | Set to `office365`.                                             |
    | `poll_interval`               | Integer | How frequently the inbox is checked, in seconds.                |
    | `filters.unread_only`         | Boolean | When `true`, only unread emails trigger the workflow.           |
    | `filters.from_email`          | String  | Only trigger on emails from this sender address.                |
    | `filters.subject_contains`    | String  | Only trigger when the subject contains this keyword or phrase.  |
    | `options.include_attachments` | Boolean | When `true`, attachment data is included in the trigger output. |

    <Note>
      An Office 365 OAuth connection must be configured on the project before using this trigger.
    </Note>
  </Tab>
</Tabs>

**Output variables**

| Variable                    | Description                                                                                                          |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `trigger.email.from`        | The sender's email address.                                                                                          |
| `trigger.email.to`          | The recipient email address.                                                                                         |
| `trigger.email.subject`     | The subject line of the email.                                                                                       |
| `trigger.email.body`        | The plain text body of the email.                                                                                    |
| `trigger.email.attachments` | An array of attachment objects (filename, MIME type, content). Only populated when `include_attachments` is enabled. |
| `trigger.email.date`        | The timestamp when the email was received, in ISO 8601 format.                                                       |

<AccordionGroup>
  <Accordion title="Notes">
    * Filters are cumulative. If both `from_email` and `subject_contains` are set, both conditions must be met for the trigger to fire.
    * Set `unread_only` to `true` in production workflows to avoid reprocessing emails that have already been handled.
    * Use `trigger.email.attachments` with a Loop node to process multiple attachments from a single email.
  </Accordion>
</AccordionGroup>

## Odin Meeting End

Fires automatically when an Odin-recorded meeting ends and notes or action items are generated. Use it to build post-meeting automation workflows — such as distributing summaries, creating follow-up tasks, or logging meeting insights to a CRM or project management tool.

**When to use it**

* You want to automatically process meeting notes or action items as soon as a meeting ends.
* You are building a post-meeting pipeline (e.g., meeting ends → extract action items → create tasks in a project management tool).
* You need to log meeting summaries to a knowledge base or CRM record automatically.

**Configuration**

| Setting                   | Type    | Description                                                                                |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------ |
| `Tool Description`        | String  | A description of the tool shown on the Tools page.                                         |
| `Require Confirmation`    | Boolean | When enabled, the user must confirm before the workflow executes.                          |
| `Open Workflow Panel`     | Boolean | When enabled, shows the workflow preview panel when this flow runs from chat.              |
| `API Key`                 | String  | Your OdinAI API key for authentication.                                                    |
| `API Secret`              | String  | Your OdinAI API secret for authentication.                                                 |
| `Project ID`              | String  | Your OdinAI project ID.                                                                    |
| `Enable for all meetings` | Boolean | When enabled, the trigger fires regardless of which meeting (that you are a part of) ends. |
| `Event Type`              | String  | The meeting event that fires the trigger. Default is `Meeting Done`.                       |
| `Action Type`             | String  | The type of data to receive when the meeting ends. Options are `Notes` and `Action Items`. |

**Available variables**

| Variable                    | Description                              |
| --------------------------- | ---------------------------------------- |
| `{{trigger.meeting.title}}` | The title of the meeting that ended.     |
| `{{trigger.meeting.notes}}` | The AI-generated notes from the meeting. |

<AccordionGroup>
  <Accordion title="Notes">
    * Requires OdinAI API credentials (API Key, API Secret, and Project ID) to authenticate.
    * When **Enable for all meetings** is on, the trigger fires for any meeting you are a part of. Disable it to restrict triggering to specific meetings.
    * The **Action Type** determines whether the trigger provides meeting notes or action items to downstream nodes.
    * Meeting data is accessible via `{{trigger.meeting.title}}`, `{{trigger.meeting.notes}}`, and other fields in the meeting payload.
  </Accordion>
</AccordionGroup>

## Telegram: New Message

Fires when the Telegram bot receives a new message. The trigger uses a webhook that Telegram POSTs updates to, starting the workflow each time a message is received.

**When to use it**

* You want to build a Telegram bot that responds to user messages with an automated workflow.
* You are routing incoming Telegram messages to an AI agent or processing pipeline.
* You need to capture and act on messages sent to your Telegram bot in real time.

**Configuration**

| Setting                | Type    | Description                                                                                                    |
| ---------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| `Tool Description`     | String  | A description of the tool shown on the Tools page.                                                             |
| `Require Confirmation` | Boolean | When enabled, the user must confirm before the workflow executes.                                              |
| `Open Workflow Panel`  | Boolean | When enabled, shows the workflow preview panel when this flow runs from chat.                                  |
| `Allowed HTTP Method`  | String  | The HTTP method accepted by the webhook. Default is `POST`.                                                    |
| `Authentication`       | String  | Authentication method for incoming webhook requests. Default is `None`.                                        |
| `Response Mode`        | String  | How the webhook responds to incoming requests. **Respond Immediately** returns a `200 OK` response right away. |

**Setting up the webhook**

<Steps>
  <Step title="Publish the tool">
    Publish the workflow to activate the webhook endpoint and generate the Live URL.
  </Step>

  <Step title="Register the webhook with Telegram">
    Copy the **Live URL** and register it with your Telegram bot using the `telegram_set_webhook` tool or the following curl command:

    ```bash theme={null}
    curl -X POST "https://api.telegram.org/bot<TOKEN>/setWebhook" \
      -H "Content-Type: application/json" \
      -d '{"url":"<WEBHOOK_URL>","allowed_updates":["message"]}'
    ```
  </Step>

  <Step title="Send a message to your bot">
    Send a message to your Telegram bot. Telegram will POST the update to the webhook URL and start the workflow.
  </Step>
</Steps>

**Capture sample data (optional)**

To save a real payload for test runs without executing the workflow, send the following command to your bot:

```
/generate_test_message Hello world
```

Click **Refresh** to load the captured payload.

**Available variables**

| Variable                           | Description                                                |
| ---------------------------------- | ---------------------------------------------------------- |
| `{{trigger.body}}`                 | Request body (JSON parsed).                                |
| `{{trigger.headers}}`              | Request headers.                                           |
| `{{trigger.query}}`                | Query parameters.                                          |
| `{{trigger.method}}`               | HTTP method.                                               |
| `{{trigger.body.message.text}}`    | The text content of the incoming Telegram message.         |
| `{{trigger.body.message.chat.id}}` | The chat ID of the conversation the message was sent from. |

<AccordionGroup>
  <Accordion title="Notes">
    * The **Test URL** (`/test` appended to the Live URL) generates sample data without executing the workflow.
    * Message data is accessible via `{{trigger.body.message.text}}`, `{{trigger.body.message.chat.id}}`, and other fields in the Telegram update payload.
    * External services send HTTP requests to your webhook URL; each request triggers a new workflow execution.
    * Publish the tool to activate the webhook endpoint before registering it with Telegram.
  </Accordion>
</AccordionGroup>
