Microsoft Teams Trend Alerts via Webhook (2026 Guide)
Build 2026-ready Microsoft Teams trend alerts via webhook: create the Workflows trigger, send Adaptive Card JSON, and pull rising topics from TrendsAGI.

To send Microsoft Teams trend alerts via webhook in 2026, you no longer use the old connector-based Incoming Webhook. Office 365 Connectors in Teams, including connector-based Incoming Webhooks, were retired in May 2026 according to Microsoft Learn, so Teams now expects webhook requests to arrive through the Workflows app using the "When a Teams webhook request is received" trigger. In practice: build a workflow, copy its endpoint URL, and POST JSON to it from your trend source.
This guide walks that exact path end to end: creating the Workflows webhook, choosing an Adaptive Card payload, pulling rising topics from the TrendsAGI REST API or Python SDK, posting them to Teams, verifying delivery, and handling ownership and failure modes. It also covers what Teams webhooks cannot do, so you can design alerts that keep working after the connector retirement.
What changed: connector Incoming Webhooks are retired
Microsoft Learn states that Office 365 Connectors in Teams, including connector-based Incoming Webhooks, were retired in May 2026, and webhook requests must now be received via the Workflows app. Microsoft describes Workflows as the scalable and secure approach to transmit data programmatically into and out of Teams for organizations that built Office 365 Connectors. Posting to a chat or channel on webhook receipt is done with predefined Workflow templates or a workflow built on the "When a Teams webhook request is received" trigger.
If you are migrating, treat any saved connector URL as dead. Per Microsoft Learn, an example connector Teams webhook URL used the format https://YOUR_URL.webhook.office.com/webhook2/<secret-token>/IncomingWebhook/<secret-token>. Your replacement endpoint comes from the Workflows app, not from the channel's Connectors tab, and the exact URL format is generated for you, so copy it rather than constructing it.
Step 1: Create the Teams Workflows webhook
- In Microsoft Teams, open the Workflows app and start from a template that posts to a chat or channel, or build a flow on the "When a Teams webhook request is received" trigger as described on Microsoft Learn.
- Choose the destination team and channel. Workflows webhooks support private channels, configurable through the Power Automate portal or the Workflows app in Teams, per Microsoft Learn.
- Save the flow and copy the HTTP endpoint URL the trigger provides. This URL is the secret your sender app will POST to.
- Add at least one co-owner. Microsoft Learn notes workflows are linked to specific users as owners rather than to a Teams team or channel, and can become orphan flows if no owner or co-owner remains.
This workflow-first pattern matches what integration vendors document: Uptrends describes creating a workflow in Teams and pasting the resulting webhook URL into the alerting product.
Step 2: Choose Adaptive Card or MessageCard
Workflows webhooks support Adaptive Card and MessageCard payloads, but MessageCard payloads do not support interactive HTTP POST action buttons; interactive cards should use Adaptive Cards, per Microsoft Learn. For a trend alert, use Adaptive Card. Keep it read-only unless you have a specific reason to add actions.
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{
"type": "TextBlock",
"text": "Rising topic: ${topic}",
"weight": "Bolder",
"size": "Medium"
},
{
"type": "FactSet",
"facts": [
{ "title": "Category", "value": "${category}" },
{ "title": "Velocity (posts/hour)", "value": "${velocity}" },
{ "title": "Growth", "value": "${growth}" },
{ "title": "Detected", "value": "${timestamp}" }
]
},
{
"type": "TextBlock",
"text": "${summary}",
"wrap": true
}
]
}
}
]
}
The bracketed ${...} tokens are placeholders. Fill them from live data and keep the values strings. The exact response codes and payload size limits of the Teams trigger are not specified in what Microsoft has published, so validate against your own flow.
Step 3: Fetch live trend data from TrendsAGI
TrendsAGI detects topics gaining attention, measures their velocity as posts per hour from stored snapshots, and explains them with AI insights. Velocity is a measured snapshot rate, not a forecast or a unique-user count. The REST API base URL is https://api.trendsagi.com and keys are created in the account profile. List trends sorted by velocity:
curl "https://api.trendsagi.com/api/trends?category=Technology&sort_by=velocity&limit=5" \
-H "X-API-Key: $TRENDSAGI_API_KEY"
Or use the Python SDK, version 0.12.0 or later:
pip install trendsagi
import os
from trendsagi import TrendsAGIClient
client = TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"])
trends = client.get_trends(category="Technology", sort_by="velocity", limit=5)
for t in trends:
print(t)
# AI insights for one trend (summary, themes, sentiment, audience, angles)
insights = client.get_ai_insights(trend_id)
# 7-day analytics for one trend
analytics = client.get_trend_analytics(trend_id, period="7d")
For higher-stakes alerts, fetch recommendations and filter by priority before posting:
recs = client.get_recommendations(limit=10, priority="high")
for r in recs:
print(r)
Step 4: Post the trend alert to your Teams workflow URL
Wrap the API call and the Teams POST in one small sender so the flow is reproducible. Read both secrets from environment variables.
import os
import json
import requests
from datetime import datetime, timezone
from trendsagi import TrendsAGIClient
TEAMS_WEBHOOK_URL = os.environ["TEAMS_WORKFLOW_URL"]
client = TrendsAGIClient(api_key=os.environ["TRENDSAGI_API_KEY"])
def build_card(trend):
return {
"type": "message",
"attachments": [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"body": [
{"type": "TextBlock", "text": f"Rising topic: {trend['name']}", "weight": "Bolder", "size": "Medium"},
{"type": "FactSet", "facts": [
{"title": "Category", "value": str(trend.get("category", ""))},
{"title": "Volume", "value": str(trend.get("volume", ""))},
{"title": "Detected", "value": datetime.now(timezone.utc).isoformat()},
]},
],
},
}],
}
def post_trend(trend):
resp = requests.post(TEAMS_WEBHOOK_URL, json=build_card(trend), timeout=10)
resp.raise_for_status()
if __name__ == "__main__":
for trend in client.get_trends(category="Technology", sort_by="velocity", limit=5):
post_trend(trend)
Keep a small local set of already-posted trend IDs and skip duplicates. Also cap posts per run; a crude counter is better than flooding a channel.
Step 5: Trigger on a schedule or on an event
Two patterns work. For a schedule, run the sender from a cron job or scheduled task. For events, subscribe to TrendsAGI webhooks and forward the payload to Teams. TrendsAGI supports signed outbound webhooks via POST /api/integrations/webhooks with trigger_type trend_velocity or trend_category and delivery_mode threshold or instant_stream; trend_category requires instant_stream. The response returns a one-time signing_secret. New subscriptions start paused, so send POST /api/integrations/webhooks/{id}/test, then PATCH /api/integrations/webhooks/{id} with {"is_active": true}. Verify each delivery by computing the lowercase hex HMAC-SHA256 of the exact raw request body with the signing secret and comparing it in constant time.
The delivery body's field list is not documented here. Send a test delivery and map fields from what actually arrives rather than guessing names.
import hashlib
import hmac
def verify_signature(raw_body, secret, signature_header):
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature_header)
Migration checklist from retired connector webhooks
- Inventory every saved URL containing webhook.office.com and mark it for replacement.
- Create a Workflows webhook for each destination channel, including private channels where needed.
- Assign two owners per flow so it does not become an orphan flow.
- Port MessageCard templates to Adaptive Cards if you use action buttons; interactive HTTP POST buttons do not work in MessageCard.
- Re-run a test delivery from each sender and confirm rendering.
- Delete the old connector configuration once the new path is green.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Collection error or 404 on POST | Posting to a retired connector-style webhook.office.com URL | Replace it with the Workflows endpoint URL and resend |
| 401 or 403 from the workflow URL | Wrong or truncated URL, or the flow is turned off | Re-copy the trigger URL; confirm the flow is enabled; do not add your own Authorization header unless your flow expects it |
| 400 on POST | Malformed JSON or a card type the trigger cannot parse | Validate JSON, switch to an Adaptive Card, and log the response body |
| Message renders as raw text or fails on buttons | Interactive HTTP POST action buttons inside a MessageCard | Use Adaptive Cards for interactive elements, per Microsoft Learn |
| Flow stopped without warning | Owner left the organization | Add a co-owner so the workflow is not orphaned |
| No message on updated content | Connectors cannot update messages or send messages as responses to existing messages | Send a fresh alert for each new trend |
Environment and platform limits
Microsoft Learn states that webhooks and connectors are available only in Government Community Cloud (GCC) and are not available in GCC High, DoD, or Teams operated by 21Vianet; only the Incoming Webhook connector type is available in GCC High and admins must manually upload it. Confirm your tenant type before designing the integration. Separately, for Outgoing Webhooks, users @mention the webhook in a channel and the service must respond within 10 seconds with text or a card. Microsoft recommends building notification bots or sending activity feed notifications via Microsoft Graph API for a more customizable experience than Incoming Webhooks.
Practical use cases
- Marketing and comms: a scheduled or webhook-triggered Adaptive Card drops rising topics into a public channel so nobody has to check a dashboard.
- Engineering and DevOps: extend an existing Teams alert channel with market and trend signals alongside uptime monitoring.
- Product and analyst: a low-effort Teams-native trend feed for a private channel, using Workflows webhooks that support private channels.
- Agency or newsroom: route different categories to different channels by creating one workflow per channel and filtering in the sender.
- Migration project: replace retired connector Incoming Webhooks with the Workflows trigger and a tested Adaptive Card template.
Frequently asked questions
Do Teams Incoming Webhooks still work in 2026, and what replaced Office 365 Connectors?
No. Per Microsoft Learn, Office 365 Connectors in Teams, including connector-based Incoming Webhooks, were retired in May 2026. The replacement is the Workflows app, using the "When a Teams webhook request is received" trigger.
How do I create a Teams webhook using the Workflows app and get the endpoint URL?
Open the Workflows app in Teams, start from a "post to a chat or channel" template or the webhook-request trigger, pick the destination, and save the flow. Copy the endpoint URL the trigger generates and use that as your POST target.
What JSON payload should I send — MessageCard or Adaptive Card — and what are the differences and limits?
Workflows webhooks accept both Adaptive Card and MessageCard payloads. Use Adaptive Card when you need interactive HTTP POST action buttons, because MessageCard does not support them, per Microsoft Learn. The trigger's exact response codes and payload size limits are not documented in the material available here.
How do I trigger a Teams trend alert from my own system or API on a schedule or event?
Run a sender on a schedule (cron or a scheduled task) that fetches rising topics from the TrendsAGI API and POSTs an Adaptive Card to your workflow URL, or forward event-driven TrendsAGI signed webhooks into Teams after verifying the HMAC signature.
Which Teams environments and plans support webhooks and connectors?
Per Microsoft Learn, webhooks and connectors are available only in GCC; they are not available in GCC High, DoD, or Teams operated by 21Vianet. In GCC High, only the Incoming Webhook connector type is available and admins must upload it manually.
How do I keep the workflow from breaking?
Assign at least one co-owner to every flow, since workflows belong to individual owners rather than the team or channel and can become orphan flows. Also confirm the flow is enabled and re-copy the trigger URL after any change.
How we researched this
Prepared by TrendsAGI Research. Facts checked on 4 November 2026 against the sources listed below.
We read the official Microsoft Teams documentation listed below. The TrendsAGI steps and code use its documented REST API and Python SDK; confirm the Microsoft Teams side against its current documentation, since third-party products change.
| Claim | Applies to | Source |
|---|---|---|
| Office 365 Connectors in Teams, including connector-based Incoming Webhooks, were retired in May 2026, and webhook requests must now be received via the Workflows app. | All plans | learn.microsoft.com |
| Posting to a chat or channel on webhook receipt is done with predefined Workflow templates or a workflow built on the 'When a Teams webhook request is received' trigger. | All plans | learn.microsoft.com |
| Workflows webhooks support Adaptive Card and MessageCard payloads, but MessageCard payloads do not support interactive HTTP POST action buttons; interactive cards should use Adaptive Cards. | All plans | learn.microsoft.com |
| Workflows webhooks support private channels, configurable through the Power Automate portal or the Workflows app in Teams. | Workflows webhooks | learn.microsoft.com |
| Workflows are linked to specific users as owners rather than to a Teams team or channel, and can become orphan flows if no owner or co-owner remains. | Workflows | learn.microsoft.com |
| Webhooks and connectors are available only in Government Community Cloud (GCC) and are not available in GCC High, DoD, or Teams operated by 21Vianet; only Incoming Webhook connector type is available in GCC High and admins must manually upload it. | GCC | learn.microsoft.com |
| With Outgoing Webhooks, users @mention the webhook in a channel and the service must respond within 10 seconds with text or a card. | Outgoing Webhooks | learn.microsoft.com |
| Connectors cannot update messages or send messages as responses to existing messages. | Connectors | learn.microsoft.com |
| Microsoft recommends building notification bots or sending activity feed notifications via Microsoft Graph API for a more customizable experience than Incoming Webhooks. | All plans | learn.microsoft.com |
| Workflows are described as the scalable and secure approach to transmit data programmatically into and out of Teams for organizations that built Office 365 Connectors. | All plans | learn.microsoft.com |
| Integration guides for sending alerts to Teams commonly require creating a workflow in Teams and pasting the resulting webhook URL into the alerting product. | All plans | uptrends.fr |
| An example Teams webhook URL from a connector uses the format https://YOUR_URL.webhook.office.com/webhook2/<secret-token>/IncomingWebhook/<secret-token>. | All plans | docs.legacy.lenses.io |
We re-research and rewrite this page at least every four months; the updated date only changes when the facts are re-checked.
Sources
- Build webhooks and connectors (Microsoft Learn) — learn.microsoft.com
- Microsoft Teams統合を使用したアラートの設定 (Meltwater Community) — community.meltwater.com
- Recevoir des alertes de surveillance dans Microsoft Teams (Uptrends) — uptrends.fr
- Webhooks (MS Teams) (lenses.io) — docs.legacy.lenses.io