For the complete documentation index, see llms.txt. This page is also available as Markdown.

Microsoft Teams Bot

Workflow-native Microsoft Teams bot provider for inbound webhook triggers and threaded conversational replies using Bot Framework.

Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

Connector
Authentication

Microsoft Teams Bot

Credentials

Microsoft Teams Bot

Connect a Microsoft Teams Bot Framework app to receive webhook-triggered messages and send threaded bot replies.

Set up in Microsoft Teams Bot

  1. In the Azure portal, create an Azure Bot resource (Bot Framework app) for your Teams bot.

  2. From the bot's configuration, copy its Microsoft App ID and generate a client secret (App password).

  3. Configure the bot's messaging endpoint and enable the Microsoft Teams channel so it can send and receive messages.

Set up in StackAI

  1. Open Settings → Connections, add a connection, and select Microsoft Teams Bot.

  2. Enter the credentials and connection details in the fields below.

  3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

Connection fields

StackAI field
Required
What to enter

App ID

Yes

Microsoft Teams bot App ID from the Bot Framework or Entra app registration.

Client Secret

Yes

Bot Framework client secret used to validate inbound activities.

Tenant ID

Yes

Tenant used to validate Bot Framework auth for this bot.

Provider documentation: Setup reference.

Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

Detailed setup guides

Use an action

  1. Add the required Microsoft Teams Bot action to the workflow.

  2. Select a connection when the action requests one.

  3. Complete the required fields. Use the reference picker when a value comes from another workflow step.

  4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

Actions

Reply to Message

Reply in the same Microsoft Teams conversation or thread.

Inputs

Field
Type
Required
Description

Message

textarea

Yes

Text to reply with in the current Teams conversation.

Conversation ID

string

Yes

Bot Framework conversation ID for the reply target. Map this from a Microsoft Teams bot trigger output.

Service URL

string

Yes

Bot Framework service URL for the reply target. Map this from a Microsoft Teams bot trigger output.

Reply To Activity ID

string

No

Optional parent activity ID for threaded replies. Map this from the Teams bot trigger when replying in-thread.

Outputs

Field
Type
Description

Reply ID

string

Bot Framework activity ID of the reply.

Conversation ID

string

Conversation ID that received the reply.

Send and Wait Message

Send a Microsoft Teams Adaptive Card that collects approval, text, or choice responses and pause until someone replies.

Inputs

Field
Type
Required
Description

Message Title

string

Yes

Short title shown at the top of the Teams card.

Message Body

textarea

Yes

Main instruction or request shown in the Teams card.

Response Type

select (string)

No

How the Teams user should respond. Available values: Approve / Reject, Free Text, Multiple Choice. Default: approval.

Choices

textarea

No

One choice per line when Response Type is Multiple Choice.

Allow Comment

boolean

No

Allow an optional comment field on approval cards. Default: false.

Use Manual Routing

boolean

No

Reveal raw Teams routing fields when you need to route using manual Bot Framework values. Default: false.

Chat or Channel

select (string)

No

Select a known Teams chat/channel. Channel selections post a new top-level message by default. Options load from the selected connection.

Manual Routing Mode

select (string)

No

How to resolve the Teams target when manual routing is enabled. Available values: Single Saved Install, Specific Conversation, Raw Thread Reply. Default: installation_owner.

Raw Conversation ID

string

No

Raw Bot Framework conversation ID for manual Teams routing. Do not use values copied from the Chat or Channel dropdown.

Service URL

string

No

Raw Bot Framework service URL for manual Teams routing. Required with a raw conversation ID.

Reply in Thread

boolean

No

Reply to an existing Teams message thread instead of posting a new top-level message. Default: false.

Reply To Activity ID

string

No

Parent Teams activity ID to reply to when Reply in Thread is enabled.

Authorized Responders

textarea

No

Optional responder allow-list. Accepted formats are Teams MRI IDs (29:...) and Microsoft Entra object IDs (UUIDs).

Outputs

Field
Type
Description

Activity ID

string

Bot Framework activity ID for the sent Adaptive Card.

Conversation ID

string

Conversation ID that received the Teams card.

Service URL

string

Bot Framework service URL used for the Teams card.

Resume Token

string

Signed token used to resume the paused workflow.

Resume Output

dict

The Teams response once the workflow resumes.

Result Message

string

Summary of the send-and-wait operation.

Triggers

A trigger starts a workflow when its configured event occurs. Configure the event and filters before enabling the trigger.

On New Teams Message

Fires when the Teams bot receives a new message.

Event inputs

Field
Type
Required
Description

Message Text

string

Yes

The Teams message text with bot mentions removed.

Message ID

string

Yes

The Teams activity ID for the inbound message.

Sender ID

string

Yes

The sender's Teams user ID.

Sender Name

string

No

Display name of the sender. Default: .

Sender AAD Object ID

string

No

Microsoft Entra object ID for the sender when available.

Team ID

string

No

The Microsoft Teams team ID.

Channel ID

string

No

The channel ID when the message was sent in a channel.

Conversation Scope

string

No

Conversation scope such as channel or personal.

Web URL

string

No

Optional Teams web URL for the message.

Conversation ID

string

Yes

Routing conversation ID for replies.

Service URL

string

Yes

Routing service URL for replies.

Activity ID

string

Yes

Bot Framework activity ID.

Tenant ID

string

No

Tenant ID for the bot conversation.

Reply To Activity ID

string

No

Parent activity ID for threaded replies.

Attachment Metadata

dict_array

No

Attachment metadata included with the message.

Outputs

Field
Type
Description

Message Text

string

The Teams message text with bot mentions removed.

Message ID

string

The Teams message activity ID.

Sender ID

string

The sender's Teams user ID.

Sender Name

string

Display name of the sender.

Sender AAD Object ID

string

Microsoft Entra object ID for the sender when available.

Team ID

string

Microsoft Teams team ID.

Channel ID

string

Microsoft Teams channel ID.

Conversation Scope

string

Conversation scope such as channel or personal.

Web URL

string

Optional Teams web URL.

Conversation ID

string

Bot Framework conversation ID.

Service URL

string

Bot Framework service URL.

Activity ID

string

Bot Framework activity ID.

Tenant ID

string

Bot tenant ID.

Reply To Activity ID

string

Parent activity ID for replies.

Attachment Metadata

dict_array

Raw attachment metadata from the inbound activity.

On Teams Bot Mentioned

Fires when the Teams bot is explicitly mentioned in a message.

Event inputs

Field
Type
Required
Description

Message Text

string

Yes

The Teams message text with bot mentions removed.

Message ID

string

Yes

The Teams activity ID for the inbound message.

Sender ID

string

Yes

The sender's Teams user ID.

Sender Name

string

No

Display name of the sender. Default: .

Sender AAD Object ID

string

No

Microsoft Entra object ID for the sender when available.

Team ID

string

No

The Microsoft Teams team ID.

Channel ID

string

No

The channel ID when the message was sent in a channel.

Conversation Scope

string

No

Conversation scope such as channel or personal.

Web URL

string

No

Optional Teams web URL for the message.

Conversation ID

string

Yes

Routing conversation ID for replies.

Service URL

string

Yes

Routing service URL for replies.

Activity ID

string

Yes

Bot Framework activity ID.

Tenant ID

string

No

Tenant ID for the bot conversation.

Reply To Activity ID

string

No

Parent activity ID for threaded replies.

Attachment Metadata

dict_array

No

Attachment metadata included with the message.

Outputs

Field
Type
Description

Message Text

string

The Teams message text with bot mentions removed.

Message ID

string

The Teams message activity ID.

Sender ID

string

The sender's Teams user ID.

Sender Name

string

Display name of the sender.

Sender AAD Object ID

string

Microsoft Entra object ID for the sender when available.

Team ID

string

Microsoft Teams team ID.

Channel ID

string

Microsoft Teams channel ID.

Conversation Scope

string

Conversation scope such as channel or personal.

Web URL

string

Optional Teams web URL.

Conversation ID

string

Bot Framework conversation ID.

Service URL

string

Bot Framework service URL.

Activity ID

string

Bot Framework activity ID.

Tenant ID

string

Bot tenant ID.

Reply To Activity ID

string

Parent activity ID for replies.

Attachment Metadata

dict_array

Raw attachment metadata from the inbound activity.

Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.

Last updated

Was this helpful?