Microsoft Teams¶
Audience: Everyone · Tags:
teams,microsoft,connector,oauth
Post messages to a Microsoft Teams channel from a flow. connectorKey is
teams, action type send_message, authType is oauth, category
communication.
Early access. This connector's code makes real calls to the Microsoft Graph API — there's no separate sandbox or mock Teams behind it. It's been validated end-to-end in SnapLink's automated tests using fake/injected HTTP responses (so tests don't need a live Teams tenant), and the install → configure → certify → activate lifecycle, the action's request shape, and error handling all work as documented below. It just hasn't been exercised against a real Teams channel yet — that additionally requires your administrator to register a real Microsoft Entra ID (Azure AD) app with SnapLink. Until that's done, the connector installs and activates normally, but a live send returns error code
auth.
Fields¶
| Field | Required | Type | Notes |
|---|---|---|---|
teamId |
Yes | string | The Microsoft Teams team ID. |
channelId |
Yes | string | The channel ID within that team. |
text |
Yes | string | The message text. |
Output: id — the created message's id.
The text you write is sent exactly as written each time — SnapLink doesn't insert data from the incoming webhook into it.
Install and activate (marketplace walkthrough)¶
# 1. Install into your workspace
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/marketplace/installed" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"workspaceId":"ws_abc123","connectorKey":"teams"}'
# → 201 { "data": { "state": "installed", ... } }
# 2. Configure
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/marketplace/installed/transition" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"workspaceId":"ws_abc123","connectorKey":"teams","action":"configure"}'
# 3. Certify (runs a health check; must pass to advance)
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/marketplace/installed/transition" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"workspaceId":"ws_abc123","connectorKey":"teams","action":"certify"}'
# 4. Activate
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/marketplace/installed/transition" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"workspaceId":"ws_abc123","connectorKey":"teams","action":"activate"}'
/connections API with
credentialType: "oauth_access" for direct wiring.
Worked example¶
Flow: webhook trigger → Teams: Send Message
{
"trigger": { "key": "t", "connectorKey": "webhook", "triggerType": "webhook" },
"actions": [
{
"key": "a1",
"connectorKey": "teams",
"actionType": "send_message",
"input": { "teamId": "<team-id>", "channelId": "<channel-id>", "text": "New event received" }
}
]
}
1. Create the flow and draft:
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/flows/flow_abc123/drafts" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"definition": { "trigger": {"key":"t","connectorKey":"webhook","triggerType":"webhook"}, "actions": [{"key":"a1","connectorKey":"teams","actionType":"send_message","input":{"teamId":"<team-id>","channelId":"<channel-id>","text":"New event received"}}] }}'
2. Promote it to activate (the flow won't validate until Teams is
active in the workspace, per the lifecycle above):
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/drafts/draft_xyz/promote" \
-H "Authorization: Bearer $TOKEN"
3. Trigger it (see webhook.md):
curl -X POST "https://api.snaplink.cloudsolutionaccelerators.com/api/v1/webhooks/flow_abc123/<secret>" \
-H "Content-Type: application/json" -d '{}'
{ "ok": true, "data": { "runId": "run_01HF...", "status": "queued" } }
4. Check the run in Execution History. If
a real Microsoft access token is connected, the message posts to the given
team/channel; otherwise the step fails with auth.
Limitations¶
- Microsoft Graph throttles requests; SnapLink maps throttling to
rate_limitand can retry with backoff. - Plain text messages only — adaptive/rich cards are Planned.
- 1:1 chat messages aren't supported — channel messages only.
If something goes wrong¶
| Symptom | Cause | Fix |
|---|---|---|
Run fails auth |
No real Microsoft app registered yet, admin consent missing, or the token expired | Ask your admin to complete Microsoft OAuth setup / grant admin consent (Authentication errors) |
bad_request |
Wrong teamId/channelId |
Copy the correct IDs from the Teams admin center or the channel link |
rate_limit |
Sending too fast | Add backoff — see Rate limiting |
See Connector failed for the general failure-diagnosis path.
Related: Connector Catalog · Webhook trigger · Authentication errors