# Microsoft Teams

> Post test plan execution notifications to a Teams channel using a Workflows webhook.

Microsoft Teams integration delivers test plan execution notifications to a Teams channel in real time. The webhook comes from the Workflows app in Teams, powered by Power Automate.

## Prerequisites

- Owner or admin access to the target channel, plus **Power Automate**.
- An existing [test plan](https://testsigma.com/docs/v2/run-tests/test-plan/).

## Create a webhook in Microsoft Teams

1. **Open Workflows**: In Microsoft Teams, go to **Apps**, then search for and select **Workflows**.

2. **Pick the template**: From the list of templates, select **Notifications > Send webhook alerts to a channel**.

3. **Configure the workflow**: In the **Workflows** dialog, wait for the details to load and click **Next**. Select the **Team** and **Channel** where Testsigma notifications should be posted, then click **Add workflow**. Teams generates a unique **Webhook URL**.

4. **Copy the URL**: Copy the **Webhook URL**.

Save the webhook URL in a safe location. The URL is unique to the Team and Channel combination you selected and cannot be recovered from the Teams UI later without reopening the workflow.

## Configure the webhook in Testsigma

Your Testsigma account needs permission to manage **Settings > Integrations**.

1. **Open integrations**: From the left navigation bar, go to **Settings > Integrations > Collaborations > Microsoft Teams**.

2. **Enable the integration**: Turn on the toggle.

3. **Enter the details**: In the **MS Teams details** dialog, enter a **Name** and paste the webhook URL you copied from Microsoft Teams.

4. **Save**: Click **Save & Enable**.

## Enable notifications in a test plan

1. **Open plan settings**: On the **Create Test Plan** or **Edit Test Plan** page, click **Test Plan Settings**.

2. **Turn on notifications**: Enable the **Send Notification** toggle.

3. **Pick the statuses**: Under **Notify On**, select the statuses for which you want to be notified.

4. **Pick the destination**: Under the **Also send messages to** dropdown, select **MS Teams**. If an older webhook was configured earlier, replace it with the webhook you created in this guide.

5. **Save the test plan**: Save, then run the test plan and confirm the notification is posted to the selected Teams channel.

![A Testsigma test plan result posted as a card in an MS Teams channel](https://s3.amazonaws.com/static-docs.testsigma.com/new/projects/applications/Notification_in_MS_Teams.png)

## Troubleshooting

### Notifications are not posted even though the webhook URL is valid

If the **Team** and **Channel** fields in the auto-generated workflow hold a stale or default reference, notifications may fail to post. Re-select both fields in Power Automate to bind the flow to the correct destination.

1. **Open the channel**: In Microsoft Teams, open the channel you selected while creating the webhook.

2. **Open the workflow**: Click the **more options menu** in the channel header, then select **Workflows**. Locate the workflow you created and select **Edit in Power Automate**.

3. **Open the post action**: In the flow editor, expand the section containing **Attachments** and open the **Post card in a chat or channel** action.

4. **Re-select the destination**: In the **Team** and **Channel** fields, remove the existing values and re-select the same Team and Channel you used when creating the webhook.

5. **Save the flow**: Click **Save** at the top of the Power Automate page.
