Connecting Microsoft Teams to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Microsoft Teams.
- Click Connect.
- Use Microsoft to authenticate the account.
You must use a service account when connecting to Microsoft Teams because it uses User Scopes. Authenticating with a personal account won't work properly.
The following scopes are required:
ChannelMessage.Send,Chat.ReadWrite,ChannelMessage.Read.All,User.ReadBasic.All,User.Read.All,offline_access.Note: All external actions performed by an action flow are attributed to the user who connected the external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Microsoft Teams.
Using Microsoft Teams actions in action flows
Microsoft Teams action steps can be used to send updates and notifications from Zendesk to Microsoft Teams. This allows for automated actions, such as posting messages to channels or individuals and adding reactions to messages. Automating interactions in Microsoft Teams can streamline collaboration and keep teams aligned without needing to leave their primary workspace.
Adding a reaction to a channel message
Use the Add reaction to channel message action to add an emoji reaction to a message in a channel.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id, team_id,
channel_id, message_id,
reaction
|
| Output | none |
Adding a reaction to a direct message
Use the Add reaction to direct message action to add an emoji reaction to a direct message.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id, message_id,
reaction
|
| Output | none |
Looking up a thread
Use the Look up thread action to retrieve a thread of messages from a channel or direct message.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id, team_id,
channel_id,
message_id
|
| Output | messages |
Looking up a user
Use the Look up user to retrieve data about a user in Microsoft Teams for further use in the action flow.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id,
user_id
|
| Output |
display_name, email,
real_name, user_id
|
Posting a message to a channel
Use the Post message to channel action to send a message to a specific channel in Microsoft Teams.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id, team_id,
channel_id,
message
|
| Output | id |
Sending a direct message
Use the Post direct message action to send a message to a specified user in Microsoft Teams.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs |
external_id,
message
|
| Output | id |