M365 Agent icon

M365 Agent

Send messages, cards, thread replies, and invoke responses through Microsoft 365 Agents (Teams / Copilot / WebChat).

Actions28

Receipt Card → Send

AI-generated

Summary

Send a receipt card to a conversation using M365 Agent SDK.

Inputs

  • authKind — Authentication method: Classic Bot (Azure Bot Service + Entra App Registration) or Agent 365 (Entra Agent Identity). Default: classicBot.
  • conversationSource — Where conversation routing info comes from. 'From Envelope' uses conversationReference from the current item (automatic for replies/updates/deletes). 'Specify Manually' requires filling conversation reference fields for proactive sends. Default: envelope.
  • serviceUrl (required) — Bot Connector service URL for the target channel. Required when conversationSource is 'Manual'. Default: empty string.
  • conversationId (required) — The conversation ID. For Teams channels this looks like 19:xxx@thread.tacv2. Required when conversationSource is 'Manual'. Leave empty for envelope-sourced flows. Default: empty string.
  • channelId — Azure Bot Service channel the conversation belongs to. Options: Direct Line, Emulator, Microsoft 365 Copilot, Microsoft Teams, Web Chat. Default: msteams.
  • activityId — Required only for Reply / Update / Delete operations against a specific activity. Leave empty for proactive sends. Default: empty string.
  • cardContent (required) — Full ReceiptCard object — title, facts, items, total, tax, vat, tap, buttons. See MS Learn cards reference. Default: ={}.
  • options — Optional configuration for the card send. Default: {}. Contains fallbackText (string) and rawActivityOverride (string, raw JSON activity override).
  • identityMode — Determines how the agent authenticates. 'Autonomous' acts as its Blueprint app identity. 'Agent User Account' acts as its own M365 user (requires E5 + Teams Enterprise + Agent 365 license on the agentic user account). Default: autonomous. Only shown when authKind is 'agent365'.
  • userSelectorMode — Selects the agentic user by UPN or Object ID. Only applicable when identityMode is 'agentUser'. Options: By UPN, By Object ID. Default: byUpn. Only shown when authKind is 'agent365' and identityMode is 'agentUser'.
  • agentUsername — UPN of the agentic user. Defaults to credential's Default Agent Username. Only shown when authKind is 'agent365', identityMode is 'agentUser', and userSelectorMode is 'byUpn'. Default: ={{ $credentials.defaultAgentUsername || '' }}, placeholder: agent@contoso.com.
  • agentUserId — Object ID of the agentic user. Only shown when authKind is 'agent365', identityMode is 'agentUser', and userSelectorMode is 'byObjectId'. Default: empty string, placeholder: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Output shape

The sent activity item is returned as the n8n workflow item, per standard n8n node execute behavior. Specific return shape is not declared in the source or properties; the node passes the constructed activity forward in the bundle.

Conversation routing uses the item's conversationReference when conversationSource is 'envelope'. When 'manual', provide serviceUrl and conversationId; channelId defaults to Microsoft Teams. The options.collection rawActivityOverride allows substituting the entire Activity payload for advanced protocol fields not exposed in the UI.

Links

Discussion