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

# New Teams chat message trigger

> Run a Workflow automatically when a message is posted in a Microsoft Teams chat.

Use the **New Teams Chat Message** trigger to start a [Workflow](https://docs.cassidyai.com/workflows/overview.md) whenever a new message is posted in a specific Microsoft Teams chat. This works with both individual and group chats.

## Set up the trigger

**1. Add the trigger**

Create a new Workflow with the **New Teams Chat Message** trigger, or change an existing Workflow's trigger type to **New Teams Chat Message**.

![Selecting the New Teams Chat Message trigger](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-teams-chat-message-trigger-img-0.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=b69b02884656726811a74f24e597bb73)

**2. Connect your Microsoft Teams account**

If you haven't already, connect your Microsoft Teams account to Cassidy.

![Adding a Microsoft Teams connection](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-teams-chat-message-trigger-img-1.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=ca6401cd48483631a9f1c5c136b3c3f8)

> [!WARNING]
>
> The Microsoft Teams connection requires admin approval. Either have an admin check the **Consent on behalf of your organization** checkbox during the connection process, or follow the [admin consent workflow process](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/configure-admin-consent-workflow) outlined in Microsoft's documentation.

**3. Select the chat**

Choose the specific Teams chat you want to monitor. This can be an individual or group chat. You can also click the pencil icon to input a chat ID directly.

![Selecting a Teams chat to monitor](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-teams-chat-message-trigger-img-2.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=38271f7561abd3a76fcab96dba9b3200)

**4. Reference the trigger variables**

In subsequent Workflow steps, you can reference the following variables:

* **Message Sender** — the person who sent the message
* **Message Contents** — the text content of the message
* **Message ID** — the unique identifier of the message
* **Chat ID** — the unique identifier of the chat
* **Attachments** — any attachments on the message

![Available Teams chat message trigger variables](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-teams-chat-message-trigger-img-3.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=9fb3d328a75ef6a2192d3934d1bbe84d)

**5. Activate the trigger**

In the trigger block, click the toggle switch to turn it on.

![Activating the Teams chat message trigger toggle](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-teams-chat-message-trigger-img-4.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=ad4a0dbec3e9c8975cd49cb1bd42fe3c)

## Related

> [card] [Send chat message](https://docs.cassidyai.com/integrations/microsoft-365/teams/send-chat-message.md)
>
> Send a message to a Teams chat from a Workflow.

> [card] [New channel message trigger](https://docs.cassidyai.com/integrations/microsoft-365/teams/new-channel-message-trigger.md)
>
> Trigger a Workflow from a Teams channel message.


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