Messages
Messages connects your flow to your Slack workspace to work with the messages of a channel: send a message now or at a given time, read the channel’s messages or search by text, edit or delete a message, get its permanent link, add, look up or remove emoji reactions, and see the files shared in the channel.
It is useful to let your processes notify the team in Slack without manual work, or to let an agent read what is said in a channel and act on it.
When to use it
- Notify the sales channel every time a large order comes in.
- Schedule the weekly meeting reminder for 9:00.
- Read the messages of a support channel so an agent can prepare a daily summary.
- Mark messages that have been handled with a reaction, for example
white_check_mark. - Correct a notice you already sent when the data changes.
Configuration
You need a Slack bot API credential with your Slack app’s token, which you get in Slack’s app dashboard. The app must be a member of the channel and have permissions to read and write messages. See Credentials.
| Field | What it does |
|---|---|
| Credential (required) | Your app’s Slack bot API credential. |
| Operation (required) | What the component does. See Operations. Default: Send Message. |
| Channel Selection Method | How you point to the channel: Manual ID shows Channel ID to type its ID; Channel List shows Channel Name to pick it from a list. Default: Manual ID. |
| Channel ID | With Manual ID, required. The channel’s ID, for example C123456. |
| Channel Name | With Channel List. The channel, picked from the list of channels in your workspace. The list loads when you pick the credential. |
| Message | In Send Message and Scheduled message, where it is required. The message text. |
| New Message | Only in Update Message, where it is required. The text that replaces the message’s text. |
| Message Timestamp (TS) | The message’s ID in Slack, a number such as 1712345678.123456. You find it in the ts field of the Send Message or Get Messages result. Required in Delete Message, Get Permalink Message, Update Message and the three reaction operations. |
| Hours / Minutes | Only in Scheduled message, required. The hour (0 to 23) and minute (0 to 59) at which the message will be sent. If that time has already passed today, it is sent tomorrow. |
| Reaction Name | In Add Reaction Message and Remove Reaction Message, required. The emoji name without the colons, for example thumbsup or eyes. |
| Return All | In Get Messages and List Files Message. Turn it on to return every possible result; when it is on, Limit disappears. |
| Limit | In Get Messages and List Files Message. The maximum number of results to return. Default: 10. |
| User Name or ID | Only in List Files Message. Returns only that person’s files, given by their username, full name or ID. |
Operations
| Operation | What it does |
|---|---|
Send Message | Posts a message in the channel. |
Scheduled message | Schedules a message to be posted at the given time. |
Get Messages | Returns the channel’s messages, from newest to oldest. If you fill in Query, it searches messages by text. |
Update Message | Replaces the text of a message already sent. |
Delete Message | Deletes a message. |
Get Permalink Message | Returns a message’s permanent link, to share it or open it in Slack. |
Add Reaction Message | Adds an emoji reaction to a message. |
Get Reaction Message | Returns the reactions a message has. |
Remove Reaction Message | Removes a reaction from a message. |
List Files Message | Returns the files shared in the channel. |
Advanced options
| Field | What it does |
|---|---|
| Query | Only in Get Messages. Text to search for in your workspace’s messages. Searching requires the credential to use a Slack user token, not a bot token. |
Output
The Data output returns the messages, reactions or files you worked with. Each message has its ID (ts), its text (text) and who wrote it. Get Permalink Message returns the link (permalink); Get Reaction Message, the message with its reactions; List Files Message, one item per file. If Slack rejects the operation, the run stops with the reason.
You can connect the result to an agent to analyze the conversations, or keep a message’s ts to edit it or react to it later. The component can also be connected to an Agent as a tool. See Tool Mode.
Example
An online store alerts its team about orders over 1,000 euros.
- The order reaches the flow from the store with the customer and the amount.
- Add Messages with the
Send Messageoperation and the sales channel’s ID in Channel ID. - In Message, write
Large order fromfollowed by the customer and the amount. - When the order leaves the warehouse, another flow uses
Add Reaction Messagewith the notice’stsandpackagein Reaction Name so the team can see it has shipped.
Good practices
- Keep the
tsof the messages you will edit or mark later. Without it you cannot work with a specific message. - Invite your Slack app to the channels where it has to write or read.
Related components
- Channels: creates channels and invites people.