"Send Channel Message" node
The Send Channel Message node lets you create a workflow for sending notifications to your team members in a Microsoft Teams channel. For example, you may send notifications immediately after a deviation occurs in your workspace.
Prerequisites
- Go to Power Automate to create a workflow from a channel in Teams. Save workflow to generate incoming webhook URL.
- Edit the created workflow by filling out the TeamId and ChannelId fields. These values will be suggested. If not:
- To get the value of TeamId, go to the MS Teams application and retrieve a link to the team. TeamId is the part of generated URL groupId=XXXX.
- To get the value of ChannelId, go to the MS Teams application and retrieve a link to the channel. ChannelId is a part of generated URL channel/XXXXXXXX.
- Save the changes in the workflow.
- If you want to send an interactive message (such message can contain links, simple surveys, sections), prepare it in AdaptiveCard.
Recommended
Optionally, you can test the integration by posting a request to the webhook URL generated as a part of prerequisites. Body of the request must be as follows:
{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": { // your AdaptiveCard goes here
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.3" // webhook integrations support only 1.3 version!
}
}
]
}
Node configuration
-
Click the node.
-
On the pop-up, click Create connection.
-
In the Incoming webhook URL field, enter the webhook you created earlier.
-
Click Next.
-
In the Connection name field, enter the name for the connection you created.
-
Click Apply.
Result: A connection is created and selected. -
From the Type of message dropdown list, select the type of the message you want to create:
- Simple text message - Choosing this option lets you write a plain text.
- Interactive message (JSON) - Choosing this option lets you build messages with sections, buttons, links, simple surveys.
-
Follow the scenario according to the message type you selected:
- If you selected the Simple message option:
- In the Text of message field, enter the text you want to include in the message.
- If you selected the Interactive message (JSON) option:
- In the JSON body of message field, enter the structure of the message you have prepared in AdaptiveCard as a part of prerequisites.
- If you selected the Simple message option:
-
Confirm by clicking Apply.
Example of use
For example of use, refer to our Send an alert to Microsoft Teams channel use case.