Microsoft Teams and Graph
Choose Graph or Workflows, prepare typed messages and handle notifications without confusing delivery guarantees.
Microsoft Teams has two distinct outbound paths: Microsoft Graph messages and cards sent through an existing Teams Workflows flow. Choose the transport first. A message request built for Graph is not the object envelope expected by Workflows.
Account and permission setup#
Store a valid authorized token under GRAPH_ACCESS_TOKEN, or set another accessTokenSecret name. These Graph nodes do not acquire consent or refresh OAuth tokens. The token's principal and scopes must match the selected team/channel/chat; ONF access does not grant Microsoft permissions.
Joined-team/channel/chat discovery and reading use their documented resource permissions. /me operations require delegated context. Ordinary channel sends/replies require delegated ChannelMessage.Send; chat sends require ChatMessage.Send. Migration-only application permissions are not an ordinary publish mechanism. Provider permissions can change, so verify the operation's linked official contract when configuring a new tenant.
Build without sending#
For a pure fixture, feed title/text/facts into Teams Build Summary Card, then use Teams Card To Graph Message or Teams Card To Workflow Payload. Inspect the matching request codec. Graph card attachments contain serialized JSON text; a Workflows payload carries a different envelope. This preparation needs no real token or message send.
Use Teams Build Message for a plain Graph request and keep the exact team/channel or chat address explicit. Start connectivity proof with an authorized bounded read rather than posting a message. List outputs expose items, nextLink, complete and pages. A bounded successful page can report complete:false; continuation must remain on the same resource. Channel-message listing does not include separately fetched replies.
Sending and acceptance#
Send/reply actions require confirmWrites:true and runtime $retries:0. If transport fails after submission, inspect the destination before repeating. Provider writes and workflow-level retries are separate; retrying the node repeats the entire message operation.
Teams Publish Workflow Card targets an existing flow's secret-stored URL, default TEAMS_WORKFLOW_URL, with optional workflowTokenSecret when its trigger requires authorization. Maintain the flow owner/co-owner and Teams connections. An accepted HTTP request does not prove the downstream Teams post succeeded: inspect that flow's own run history.
Inbound Graph notifications#
The notification trigger is a keyed HTTP decoder/validator. It checks every clientState against a named secret and removes the secret from emitted output. It neither creates Graph subscriptions nor renews them. A suitable public HTTPS relay must answer Graph's validationToken challenge and forward notification JSON to the authorized ONF callback. Native JSON callback handling alone does not satisfy the challenge. Encrypted rich notifications require separate certificate/decryption support and are rejected by this trigger.
Operations#
- Teams Build Message: Build a message payload without publishing.
- Teams Build Summary Card: Build a reusable readable summary Adaptive Card; facts retain arbitrary provider values.
- Teams Card To Graph Message: Convert card object into the Graph-specific string attachment payload.
- Teams Card To Workflow Payload: Convert an Adaptive Card into the Workflows webhook envelope without sending.
- Teams List Channel Messages: Read channel messages with bounded @odata.nextLink paging; replies are separate. Safe reads retry only 429/502/503/504 up to readRetries and honor bounded Retry-After.
- Teams Get Channel Message: Read one message using its exact resource address.
- Teams Send Channel Message: Deliberate external send. Requires delegated ChannelMessage.Send access token. No blanket write retry or server idempotency guarantee; $retries must be zero. A failed/lost response may follow successful delivery; reconcile before re-running
- Teams List Chat Messages: Read chat messages with bounded @odata.nextLink paging; replies are separate. Safe reads retry only 429/502/503/504 up to readRetries and honor bounded Retry-After.
- Teams Get Chat Message: Read one message using its exact resource address.
- Teams Send Chat Message: Deliberate external send. Requires delegated ChatMessage.Send access token. No blanket write retry or server idempotency guarantee; $retries must be zero. A failed/lost response may follow successful delivery; reconcile before re-running.
- Teams List Channel Replies: Read replies to a channel root message with bounded paging.
- Teams Reply To Channel Message: Deliberate reply to a channel root. Requires delegated ChannelMessage.Send; no automatic retry. Lost response is uncertain.
- Teams List Joined Teams: Discover real provider IDs through delegated Graph reads; directory remainder is preserved. top is used for chats only; joinedTeams/channels do not support that parameter.
- Teams List Channels: Discover real provider IDs through delegated Graph reads; directory remainder is preserved. top is used for chats only; joinedTeams/channels do not support that parameter.
- Teams List My Chats: Discover real provider IDs through delegated Graph reads; directory remainder is preserved. top is used for chats only; joinedTeams/channels do not support that parameter.
- Teams Publish Workflow Card: Send card through an existing Teams Workflows URL kept entirely in the secret store. Optional workflowTokenSecret supports a tenant-authenticated trigger; the URL does not grant Graph permissions. 2xx is acceptance only. Owner/co-owner and
- Teams Receive Graph Notifications: Webhook branch validates clientState for every notification and removes it from outputs. ONF accepts keyed JSON callbacks; Graph requires public HTTPS validationToken challenge response, lifecycle renewal and an ingress relay that forwards
Diagnosis and evidence#
For 401/403, inspect principal, tenant, scopes and target access. For an absent post after acceptance, examine downstream Workflows history. For missing optional fields, inspect the pinned type and connect only the outputs present. Pure builders and local fixture success do not establish tenant consent or message delivery.
Source provenance
Reviewed against maintained source and topic documentation on 23 October 2026. This is a source snapshot; installed versions and provider access may differ.
../OpenNodeFlow-Library/work/teams-hubspot/SETUP.md../OpenNodeFlow-Library/docs/INTEGRATIONS.mddocs/INTEGRATIONS-TEAMS-HUBSPOT.md