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

# Microsoft Teams

> Post NervesHub device, error and deployment workflow notifications to a Microsoft Teams channel through a Workflows webhook.

Your organization can post its device notifications to Microsoft Teams channels. Each channel gets them through a Workflows webhook that you make in that channel. NervesHub only calls out to Teams, so nothing in Teams can act on NervesHub.

## Requirements

* NervesHub 2.5.0 or later.
* `SECRETS_ENCRYPTION_KEY` set on the instance. NervesHub encrypts each channel's webhook URL with it, and saving a channel fails without it. See [Feature prerequisites](https://docs.nerves-hub.org/hosting/feature-prerequisites.md#secrets-encryption-key).
* The built-in **Manage** or **Admin** role, or a custom role with the Teams and Discord channel permissions. See [Roles](https://docs.nerves-hub.org/access/roles.md).
* A Workflows webhook. Office 365 connector URLs (on `webhook.office.com`) are refused. Microsoft retired them in 2026.

## Add a channel

**1. Make a Workflows webhook in Teams**

In Teams, open the channel's **More options** menu and choose **Workflows**. Pick the **Send webhook alerts to a channel** template, check the team and channel, and add the workflow. Copy the URL Teams shows.

**2. Add the channel in NervesHub**

Open your organization and select the **Integrations** tab. Click **Add integration**, then **Microsoft Teams channel**. While the organization has no integrations, click **Add Teams channel** instead.

**3. Fill in the form**

Paste the URL. Enter a **Name** for the channel. Choose the products and events, then click **Add channel**.

**4. Check that it works**

Open the channel's row menu and choose **Send test message**. NervesHub posts a card to the channel straight away, saying what the channel will get.

Teams does not tell NervesHub a channel's name, so the name is whatever you type.

The URL is the only thing needed to post to the channel. NervesHub stores it encrypted and never shows it again. When you edit a channel, leave the URL empty to keep the current one, or paste a new one to replace it.

Only URLs on Power Automate's hosts (`*.logic.azure.com` and `*.api.powerplatform.com`) are accepted, and only over `https://`.

Every member of the organization sees each channel's name, events, products and state. An organization can have up to 20 Teams channels.

## What is posted

| Event | Posted when |
| - | - |
| Health status changed | A device's [health status](https://docs.nerves-hub.org/management/health-monitoring.md) moves, such as from healthy to warning. |
| Update failed | A device's update fails, stops reporting progress, or ends with the device back on its old firmware. |
| Update succeeded | A device finishes updating. |
| New error | A device reports an error not seen before in its product. |
| Error reopened | An error that was marked resolved happens again. |
| Workflow step started | A [deployment group](https://docs.nerves-hub.org/setup/deployments.md)'s [workflow](https://docs.nerves-hub.org/concepts/deployment-workflows.md) begins a step, or begins it again after somebody retries it. |
| Workflow waiting for approval | A workflow reaches a step that holds the rollout until somebody approves it. |
| Workflow step completed | Every device a step covers is on the release's firmware, or somebody approved an approval step. |
| Workflow step failed | Too many of a step's devices fail to update, and the rollout stops there. |
| Workflow step skipped | Somebody skips a step. |
| Product notifications | NervesHub adds something to a product's [Notifications](https://docs.nerves-hub.org/management/notifications.md) page. |

These events have the same prerequisites as the matching [webhook events](https://docs.nerves-hub.org/outbound/webhooks.md#events).

NervesHub holds events for 15 seconds, then posts one Adaptive Card per kind of event. A single event gets a card of its own. A burst gets a count and the first ten devices. Device names, errors and deployment groups link to their pages in NervesHub. A card about one device or deployment group has an **Open in NervesHub** button.

Anything a device sent is shown as plain text. It cannot become a link or formatting.

## Limits

A Workflows webhook only posts. Its cards cannot carry buttons that act, so there is no Reboot, Approve or Retry as there is in [Slack](https://docs.nerves-hub.org/outbound/slack.md). A card cannot be changed once posted. Approve a waiting workflow on the deployment group's page, which the card links to.

## When posting fails

* If Teams refuses the webhook, because the workflow was deleted or turned off or its URL no longer works, NervesHub turns the channel off. Each product it was getting events for gets a product notification saying why. Fix the workflow, then choose **Turn on** from the row menu, or edit the channel and paste the workflow's new URL.
* If Power Automate asks NervesHub to slow down, NervesHub waits as long as it is told.
* Any other failure is retried after 10 seconds, 1 minute and 5 minutes.
* Events held for more than an hour are dropped.

## Related pages

* [Slack](https://docs.nerves-hub.org/outbound/slack.md)
* [Discord](https://docs.nerves-hub.org/outbound/discord.md)
* [Webhooks](https://docs.nerves-hub.org/outbound/webhooks.md)
* [Product notifications](https://docs.nerves-hub.org/management/notifications.md)
* [Secrets encryption key prerequisite](https://docs.nerves-hub.org/hosting/feature-prerequisites.md#secrets-encryption-key)


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