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

# Workflows

> Automate Microsoft Teams channel creation, messaging, and meetings from Rootly incidents using workflow actions with mention, adaptive card, and topic support.

Workflows let you automate Microsoft Teams actions during incidents: create channels, send messages, rename or archive channels, and start video meetings. If you're unfamiliar with how Workflows work, see the [Workflows](/workflows/workflows) documentation first.

## Automation Options

<CardGroup cols={2}>
  <Card title="Smart Defaults" icon="bolt">
    Auto-create Teams channels at incident start using built-in settings
  </Card>

  <Card title="Custom Workflows" icon="diagram-project">
    Build workflows with triggers, conditions, and multiple Teams actions
  </Card>
</CardGroup>

***

## Available Actions

| Action                                      | What It Does                                                   |
| ------------------------------------------- | -------------------------------------------------------------- |
| **Create Microsoft Teams Channel**          | Creates a new channel for the incident                         |
| **Create Microsoft Teams Chat**             | Creates a group or one-on-one chat                             |
| **Add Microsoft Teams Tab**                 | Adds a tab to the incident channel                             |
| **Archive Microsoft Teams Channel**         | Archives the incident channel                                  |
| **Rename Microsoft Teams Channel**          | Changes the channel name                                       |
| **Invite Users to Microsoft Teams Channel** | Invites users to a private incident channel                    |
| **Send Microsoft Teams Message**            | Posts a message to a Teams channel                             |
| **Send Microsoft Teams Attachments**        | Sends attachments to a Teams channel                           |
| **Create Microsoft Teams Meeting**          | Starts a video meeting (requires separate Meeting integration) |

***

## Create a Workflow

<Steps>
  <Step title="Open Workflows">
    Go to **Rootly → Workflows → Create Workflow**.

    <img alt="Rootly workflows page" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-1.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=3c7392c5c43aa47cb8baccac520e9e34" width="186" height="491" data-path="images/integrations/microsoft-teams/workflows/image-1.png" />

    <img alt="Create workflow button" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-2.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=4bd3aca8a6c5ea526696fa0a6c8be8d8" width="1165" height="578" data-path="images/integrations/microsoft-teams/workflows/image-2.png" />
  </Step>

  <Step title="Choose workflow type">
    Select the workflow type that matches your use case (e.g., Incident, Retrospective, or Pulse).

    <img alt="Workflow type selection" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-3.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=1e9ad82c497ea7dbf07755686e4b47a0" width="1365" height="630" data-path="images/integrations/microsoft-teams/workflows/image-3.png" />
  </Step>

  <Step title="Configure triggers">
    Triggers define when this workflow runs.

    <img alt="Workflow trigger configuration" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-triggers.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=92ddbf0c0407c72aff142ff3199beb7a" width="621" height="305" data-path="images/integrations/microsoft-teams/workflows/image-triggers.png" />

    | Trigger                         | When It Fires                       |
    | ------------------------------- | ----------------------------------- |
    | **Incident Created**            | New incident opens                  |
    | **Incident Updated**            | Severity, status, or fields change  |
    | **Incident Status Changed**     | Incident moves to a specific status |
    | **Incident Commander Assigned** | Someone takes ownership             |
    | **Incident Resolved**           | Incident is resolved                |
    | **Manual Trigger**              | Run on demand from the UI           |
  </Step>

  <Step title="Add conditions (optional)">
    Conditions filter when the workflow should run after it's been triggered — keeping Teams activity focused on the incidents that matter.

    <img alt="Workflow conditions panel" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-condition.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=02df47496a44bd36764c3143acc9f97d" width="626" height="334" data-path="images/integrations/microsoft-teams/workflows/image-condition.png" />

    Examples:

    * Only for SEV-1 or SEV-2 incidents
    * Only for specific teams or services
    * Only for production environments
  </Step>

  <Step title="Add a Microsoft Teams action">
    Click **Add Action** and search for **Microsoft Teams** to see all available actions.

    <img alt="Add action button with Microsoft Teams search" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-4.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=c528fa2062d6553d7eb7277180e5b9d6" width="677" height="221" data-path="images/integrations/microsoft-teams/workflows/image-4.png" />
  </Step>
</Steps>

***

## Actions

<AccordionGroup>
  <Accordion title="Create Microsoft Teams Channel" icon="hashtag">
    Creates a dedicated Teams channel for the incident. Use this as your first action when an incident opens to give responders a central place to coordinate.

    <img alt="Create Microsoft Teams Channel action" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-5.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=7dc31ea4a616ac26b1fc93e8aa49593b" width="896" height="566" data-path="images/integrations/microsoft-teams/workflows/image-5.png" />

    <img alt="Channel configuration options" src="https://mintcdn.com/rootly/_CGYMlZfaYjpTtE8/images/integrations/microsoft-teams/workflows/image-6.png?fit=max&auto=format&n=_CGYMlZfaYjpTtE8&q=85&s=cdedfa6defa7ccfc1723c42336775583" width="713" height="563" data-path="images/integrations/microsoft-teams/workflows/image-6.png" />

    <ParamField body="Team" type="select">
      The Microsoft Teams workspace where the channel will be created.
    </ParamField>

    <ParamField body="Title" type="string">
      The channel name. Supports Liquid syntax (e.g., `{{ incident.title }}`).

      <Note>
        Channel names are automatically lowercased, parameterized, and truncated to 50 characters.
      </Note>
    </ParamField>

    <ParamField body="Description" type="string">
      An optional description for the channel. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Private" type="select">
      Controls channel visibility:

      * **auto** — Private for private incidents, public for non-private incidents
      * **true** — Always private
      * **false** — Always public
    </ParamField>

    <Note>
      If the incident already has a Teams channel, this action skips creation to avoid duplicates.
    </Note>
  </Accordion>

  <Accordion title="Create Microsoft Teams Chat" icon="comments">
    Creates a group or one-on-one chat for the incident. Once created, the chat ID and URL are stored on the incident for use in subsequent actions.

    <ParamField body="Chat Type" type="select">
      * **group** — Creates a group chat with multiple members and an optional topic
      * **oneOnOne** — Creates a one-on-one chat between exactly two members
    </ParamField>

    <ParamField body="Topic" type="string">
      A topic for the chat. Only used for group chats. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Members" type="string">
      A JSON array of members to add. Each member requires an `email` field. Supports Liquid syntax.

      ```json theme={null}
      [
        {"email": "alice@company.com"},
        {"email": "bob@company.com", "roles": ["guest"]}
      ]
      ```

      <Note>
        Group chats require at least three members (including the service account). One-on-one chats require exactly two.
      </Note>
    </ParamField>
  </Accordion>

  <Accordion title="Add Microsoft Teams Tab" icon="browser">
    Adds a tab to the incident Teams channel. Use this to give responders quick access to dashboards, runbooks, or the Rootly incident page directly within the channel.

    <ParamField body="Team" type="select">
      The team that contains the channel.
    </ParamField>

    <ParamField body="Channel" type="string">
      The channel to add the tab to. Use `{{ incident.microsoft_teams_channel_id }}` to target the incident's channel.
    </ParamField>

    <ParamField body="Title" type="string">
      The display name shown on the tab. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Link" type="string">
      The URL the tab should point to. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Playbook" type="select">
      Optionally select a playbook to add as a dedicated playbook tab. When a playbook is selected, the tab renders only the playbook checklist — it is a distinct tab type and does not include the Rootly incident dashboard. Leave this empty to use the Title and Link fields to add a URL-based tab, such as a link to the incident page or an external runbook.
    </ParamField>

    <Note>
      The Rootly app must be installed in the target team for this action to work.
    </Note>
  </Accordion>

  <Accordion title="Archive Microsoft Teams Channel" icon="box-archive">
    Archives the incident channel when it's no longer needed. Keeps the workspace clean while preserving conversation history.

    <ParamField body="Team" type="select">
      The team that contains the channel.
    </ParamField>

    <ParamField body="Channels" type="string">
      The channel(s) to archive. Use `{{ incident.microsoft_teams_channel_id }}` to target the incident's channel.
    </ParamField>

    **Common trigger:** Incident Status Changed to "Closed"
  </Accordion>

  <Accordion title="Rename Microsoft Teams Channel" icon="pen-to-square">
    Renames an existing Teams channel. Use this to reflect status changes — for example, prefixing resolved incidents with `[RESOLVED]`.

    <ParamField body="Team" type="select">
      The team that contains the channel.
    </ParamField>

    <ParamField body="Channel" type="string">
      The channel to rename. Use `{{ incident.microsoft_teams_channel_id }}` to target the incident's channel.
    </ParamField>

    <ParamField body="Title" type="string">
      The new channel name. Supports Liquid syntax.

      ```liquid theme={null}
      [RESOLVED] {{ incident.title }}
      ```
    </ParamField>

    **Common trigger:** Incident Resolved
  </Accordion>

  <Accordion title="Invite Users to Microsoft Teams Channel" icon="user-plus">
    Invites users to a private incident channel by email. Use this to automatically add on-call responders when they're assigned a role.

    <ParamField body="Team" type="select">
      The team that contains the channel.
    </ParamField>

    <ParamField body="Channel" type="string">
      The private channel to invite users to. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Emails" type="string">
      Comma-separated list of email addresses to invite. Supports Liquid syntax.
    </ParamField>

    <Warning>
      This action only works with **private** channels. Public channels are accessible to all team members by default.
    </Warning>

    **Common triggers:** Incident Created, Incident Commander Assigned
  </Accordion>

  <Accordion title="Send Microsoft Teams Channel Message" icon="message">
    Posts a message to a Teams channel using the Rootly bot. Use Liquid variables to include dynamic incident details in the message.

    <ParamField body="Channels" type="select">
      The channel(s) to post to. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Text" type="string">
      The message content. Supports Liquid variables.

      ```liquid theme={null}
      🚨 **Incident Update**

      **Title:** {{ incident.title }}
      **Severity:** {{ incident.severity }}
      **Status:** {{ incident.status }}
      **Commander:** {{ incident.commander.name | default: "Unassigned" }}

      {{ incident.summary }}
      ```
    </ParamField>

    <Note>
      If the message text is empty, the action will be skipped.
    </Note>

    **Common triggers:** Incident Created, Incident Updated, Status Changed
  </Accordion>

  <Accordion title="Send Microsoft Teams Attachments" icon="paperclip">
    Sends Adaptive Card attachments to one or more Teams channels. Use this to send richly formatted, interactive content such as structured incident summaries.

    <ParamField body="Channels" type="select">
      The channel(s) to send the attachments to. Supports Liquid syntax.
    </ParamField>

    <ParamField body="Attachments" type="string">
      A JSON payload defining the Adaptive Card content. Supports Liquid syntax. Follows the [Microsoft Adaptive Card schema](https://adaptivecards.io/).
    </ParamField>
  </Accordion>

  <Accordion title="Create Microsoft Teams Meeting" icon="video">
    Creates a Microsoft Teams video meeting for live incident collaboration. The meeting link is automatically stored on the incident.

    <Note>
      This action requires the **Microsoft Teams Meeting** integration to be installed separately.
    </Note>

    <ParamField body="Subject" type="string">
      The meeting title. Supports Liquid syntax (e.g., `{{ incident.title }}`).
    </ParamField>

    **Common trigger:** Incident Created (for high-severity incidents)
  </Accordion>
</AccordionGroup>

***

## Liquid Variables

<Tip>
  Use the [Liquid Variable Explorer](https://rootly.com/account/help/liquid-explorer) to test variables with real incident data.
</Tip>

### Incident Variables

| Variable                         | Description                    |
| -------------------------------- | ------------------------------ |
| `{{ incident.title }}`           | Incident title                 |
| `{{ incident.summary }}`         | Incident summary               |
| `{{ incident.severity }}`        | Severity level (e.g., "SEV1")  |
| `{{ incident.status }}`          | Current status                 |
| `{{ incident.started_at }}`      | When the incident started      |
| `{{ incident.commander.name }}`  | Incident commander name        |
| `{{ incident.commander.email }}` | Incident commander email       |
| `{{ incident.url }}`             | Link to the incident in Rootly |

### Microsoft Teams Variables

| Variable                                     | Description                           |
| -------------------------------------------- | ------------------------------------- |
| `{{ incident.microsoft_teams_channel_id }}`  | ID of the incident's Teams channel    |
| `{{ incident.microsoft_teams_channel_url }}` | URL to the Teams channel              |
| `{{ incident.microsoft_teams_chat_id }}`     | ID of the incident's Teams chat       |
| `{{ incident.microsoft_teams_meeting_url }}` | URL to the Teams meeting (if created) |
