Channel Messages
Channel Messages works with the messages in Microsoft Teams channels: it posts new messages, with attachments if needed, reads the latest messages in a channel, fetches a specific message and replies to an existing one.
Use it so your flows notify the team where it already works, or so an AI agent takes part in a channel’s conversations.
When to use it
- You want to post every large incoming order in the sales channel.
- An AI agent needs to reply in the thread to the questions posted in a support channel.
- Every Friday you want to summarise what was discussed in a channel during the week.
- You want to share the report the flow generates in a channel, as an attachment.
Configuration
You need a Microsoft Teams credential, which connects by signing in with your Microsoft account. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | The Microsoft Teams credential used to post and read. Messages are posted on behalf of that account. |
| Operation (required) | What the component does. See Operations. By default, Send Message Channel. |
| Team ID | The team, picked by name. |
| Channel ID | The team’s channel, picked by name. |
| Message Text | The text of the message or the reply. It accepts simple HTML formatting, such as bold text or links. In Send Message Channel and Reply Message. |
| Message ID | The identifier of the message you read or reply to. You get it with Get Channel Messages or from Teams Webhook. In Get Message from Channel and Reply Message. |
| Message Count | How many messages are read. By default, 20. Only in Get Channel Messages. |
| Attachments | The files attached to the message. Connect the output of a component that delivers files, or type a file’s web address. Only in Send Message Channel. |
Operations
| Operation | What it does |
|---|---|
Send Message Channel | Posts a new message in the channel, with attachments if there are any. |
Get Channel Messages | Returns the latest messages in the channel. |
Get Message from Channel | Returns a specific message, with its content, its author and its date. |
Reply Message | Replies in the thread of an existing message. |
Output
The Data output returns one item for each message read, or a single item with the result: the message or reply posted, with its identifier and date.
You can connect the result to an agent so it reads the conversation, or to another component that stores the messages. The component can also be connected to an Agent as a tool, so the agent decides when to post or read in the channel. See Tool Mode.
Example
A distributor’s sales team wants to hear in Teams about every order over 5,000 euros.
- The flow receives the online shop’s orders and filters those above that amount.
- Add Channel Messages with the
Send Message Channeloperation and the sales team’s Microsoft Teams credential. - In Team ID, pick the
Salesteam, and in Channel ID, theOrderschannel. - In Message Text, write the notice with the client and the order amount.
Good practices
- If the flow also listens to that channel with Teams Webhook, turn on Ignore Own Messages there so it does not react to its own messages.
- To reply in the same thread instead of starting a new one, use
Reply Messagewith the original message’s identifier.
Related components
- Channel: look up teams and channels.
- Chat Messages: send messages in chats.
- Teams Webhook: start a flow when a message is posted.