Send a Microsoft Teams Message

Octopus.SendTeamsMessage exported 2026-10-18 by Octopus Deploy belongs to ‘Other’ category.

Posts a message to one or more Microsoft Teams channels, through the Octopus app installed in your tenant, through incoming webhooks, or both. The app cannot post to a private channel, so a webhook is the only way to reach one.

Parameters

When this step is included in a project’s deployment process, the parameters below can be set.

Channels

Octopus.Action.Teams.Channels (required)

Every channel the step posts to, as a JSON array of keys in posting order. Each key’s own properties describe it, and a step needs at least one key here. Both kinds can appear in the same step.

Example: ["ch-a1b2c3","wh-d4e5f6"]

Channel type

Octopus.Action.Teams.Channel[<key>].Type (required)

Which kind of target the key describes: ‘AppChannel’ for a channel reached through the Octopus app, or ‘Webhook’ for one reached through an incoming webhook URL. Stored rather than guessed from the other properties, so a webhook missing its URL reports that rather than looking like an app channel missing its ID.

Example: Webhook

Display name

Octopus.Action.Teams.Channel[<key>].Name (required)

The name shown for the channel in the step editor and the task log, so neither has to show a URL. Filled in from the picker for an app channel; required for a webhook.

Example: Deployments

Webhook URL

Octopus.Action.Teams.Channel[<key>].WebhookUrl

One channel’s incoming webhook URL, created in Teams via the channel’s Workflows menu. Set only on Webhook entries, and required for each of them. Stored as a sensitive value because anyone holding the URL can post to that channel. May be bound to an Octopus variable instead.

Channel ID

Octopus.Action.Teams.Channel[<key>].ChannelId

One channel’s Teams thread ID, which doubles as its conversation ID. Starts with ‘19:’ and ends with ‘@thread.tacv2’. Set only on AppChannel entries, and required for each of them. The channel is confirmed to still be reachable each time the step runs.

Example: 19:n4Ebt62BtFRpOgcmA@thread.tacv2

Team ID

Octopus.Action.Teams.Channel[<key>].TeamId

The ID of the team the channel belongs to. Octopus only posts to teams on the integration’s allowed list, and confirms the channel really belongs to this team before sending.

Example: 7722bbe6-7cfc-4173-ba5e-82a0daf18621

Team name

Octopus.Action.Teams.Channel[<key>].TeamName

The team’s display name, stored so task logs can tell apart channels sharing a name across teams. Display only.

Example: Platform Engineering

Message

Octopus.Action.Teams.Message

The message to post, required when the message format is ‘PlainText’. Plain text, with Octopus variable substitution.

Title

Octopus.Action.Teams.Title

An optional heading shown in bold above the message or card. Without one, a channel reached through the Octopus app keeps its ‘Octopus Deploy’ heading and a webhook post has no heading. Supports Octopus variable substitution.

Example: Deployment blocked

Message format

Octopus.Action.Teams.MessageFormat

Whether the body is plain text or an Adaptive Card. Absent means ‘PlainText’.

Allowed values: PlainText, AdaptiveCard

Example: PlainText

Adaptive Card

Octopus.Action.Teams.Card

An Adaptive Card, used instead of Message when the message format is ‘AdaptiveCard’. Accepts a whole card or just the array of elements for its body; Octopus sets the card’s type, schema and version and supplies the envelope Teams requires, and keeps everything else including any actions. Buttons must be Action.OpenUrl, because the Octopus app never receives activities back from Teams. Supports Octopus variable substitution; pipe variables that can contain quotes or newlines through JsonEscape.

Example: {"type":"AdaptiveCard","body":[{"type":"TextBlock","text":"Hello"}]}

Page updated on Sunday, October 18, 2026