> For the complete documentation index, see [llms.txt](https://docs.softwaresecured.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.softwaresecured.com/account/integrations/microsoft-teams.md).

# Microsoft Teams

{% stepper %}
{% step %}

### Open Workflows

1. In Microsoft Teams, find the channel you want to receive notifications in
2. Hover over the channel name and click the **•••** (three dots) that appear
3. Select **Workflows** from the menu
   {% endstep %}

{% step %}

### Create a New Workflow

1. In the Workflows panel, click **Workflows Home** in the lower-right corner
2. Click **Build from scratch** in the upper-right corner
   {% endstep %}

{% step %}

### Select a Trigger

1. Click **Select a trigger**
2. Click **Build with Power Automate** to see all available triggers
3. Select the **Built-in** tab
4. Select **Microsoft Teams** from the list
5. Choose **When a Teams webhook request is received**
6. For **Who can trigger the flow?**, select **Anyone**
7. Leave the **HTTP POST URL** field blank. It will be auto-generated when you save
   {% endstep %}

{% step %}

### Add an Action

1. Click the **+ New Step** button
2. Search for and select **Microsoft Teams**
3. Search for and select **Post message in a chat or channel**
4. Configure the following options:
   * **Post as** → Flow bot
   * **Post in** → Channel
   * **Team** → Select your team name
   * **Channel** → Select your channel name
     {% endstep %}

{% step %}

### Configure the Message

1. Click on the **Message** text area
2. In the popup that appears, select **Expression**
3. Type exactly the following and press **OK**:

   ```
   triggerBody()?['text']
   ```
4. Click **Save** (and wait for it to save)
5. You can now close the Workflows panel
   {% endstep %}

{% step %}

### Copy Your Webhook URL

1. Hover over your channel and click **•••** again
2. Select **Workflows**
3. Scroll down to **Your workflows** and click on the workflow you just created
4. Find the **Copy webhook link** button and click it - the URL is now in your clipboard
   {% endstep %}

{% step %}

### Connect to Portal

1. Go to **Portal → Integrations → Microsoft Teams**
2. Paste the copied URL into the **Webhook URL** field
3. Enter the name of the channel you connected (e.g. `alerts`)
4. Click **Connect Teams**

You're all set - your channel will now receive notifications from Portal.
{% endstep %}
{% endstepper %}
