> ## 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](/workflows/overview) whenever a new message is posted in a specific Microsoft Teams chat. This works with both individual and group chats.

## Set up the trigger

<Steps>
  <Step title="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**.

    <Frame>
      <img src="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" alt="Selecting the New Teams Chat Message trigger" width="898" height="340" data-path="images/reference/new-teams-chat-message-trigger-img-0.png" />
    </Frame>
  </Step>

  <Step title="Connect your Microsoft Teams account">
    If you haven't already, connect your Microsoft Teams account to Cassidy.

    <Frame>
      <img src="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" alt="Adding a Microsoft Teams connection" width="1020" height="1188" data-path="images/reference/new-teams-chat-message-trigger-img-1.png" />
    </Frame>

    <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.</Warning>
  </Step>

  <Step title="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.

    <Frame>
      <img src="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" alt="Selecting a Teams chat to monitor" width="1020" height="236" data-path="images/reference/new-teams-chat-message-trigger-img-2.png" />
    </Frame>
  </Step>

  <Step title="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

    <Frame>
      <img src="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" alt="Available Teams chat message trigger variables" width="1496" height="776" data-path="images/reference/new-teams-chat-message-trigger-img-3.png" />
    </Frame>
  </Step>

  <Step title="Activate the trigger">
    In the trigger block, click the toggle switch to turn it on.

    <Frame>
      <img src="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" alt="Activating the Teams chat message trigger toggle" width="886" height="312" data-path="images/reference/new-teams-chat-message-trigger-img-4.png" />
    </Frame>
  </Step>
</Steps>

## Related

<CardGroup cols={2}>
  <Card title="Send chat message" icon="paper-plane" href="/integrations/microsoft-365/teams/send-chat-message">
    Send a message to a Teams chat from a Workflow.
  </Card>

  <Card title="New channel message trigger" icon="hashtag" href="/integrations/microsoft-365/teams/new-channel-message-trigger">
    Trigger a Workflow from a Teams channel message.
  </Card>
</CardGroup>
