Skip to main content

Slack Message action

Posts a message to a Slack user or channel. In the action picker it is Slack Message, under Integration Actions.

Fields​

FieldRequiredDescription
ConnectionYesThe Slack connection to post through.
RecipientYesA user or channel to message—see Choosing a recipient.
MessageNoThe message. Pick the body type that matches how it is written—see below.
Hide Link PreviewsNoStops Slack expanding a preview card under each link it recognises.
Test Recipient OverrideNoOn the Advanced tab. During a dry run, this step posts here instead of the automation-level Slack test target. Choose the connection to post through as well as the recipient: neither is taken from the step. Leave its recipient empty to use the automation-level target.

Choosing a recipient​

Every Slack field that names a recipient—this step's Recipient, a question's Channel, and a test target's Recipient—works the same way.

  • Pick from the list. The list fills from the workspace of the field's connection: its users, its public channels, and—when the app has the optional groups:read scope—the private channels it has been added to, marked with a lock. A picked user shows by name.
  • Type it. Type any of the forms in the table below.
  • Use a variable. Bind the field to a variable, so the recipient can come from an earlier step or be defined once and shared. A test target in the automation's settings sits on no step, so it can use variables and secrets but not an earlier step's output.
FormExampleWorks when
Channel name#release-alertsAlways for a public channel. For a private channel, the app must be added to it and have the optional groups:read scope.
Channel IDC0123456789Always for a public channel. For a private channel, the app must be added to it. In Slack, the ID is at the bottom of the channel's details.
Handle@anaThe app has the users:read scope, exactly one person goes by it—as their display name, username, or full name—and the workspace has no more than about 5,000 accounts, deactivated ones included.
Email addressana@example.comThe app has the optional users:read.email scope.
User IDU0123456789Always. In Slack, open the person's profile, choose ⋮, and then choose Copy member ID.

A recipient with no # or @ that isn't an ID or an email address is read as a channel name. A person is messaged directly by the app.

When the step runs, it looks the recipient up and posts to what it names. If it can't—a handle two people go by, an email address no one in the workspace has, or a scope the app is missing—the step fails and says why and what to use instead.

The list holds at most 1,000 channels and 1,000 people, and it reads only part of a very large workspace. Archived channels and deactivated accounts count toward that size, because Slack reads them before leaving them out. If the field can't show every channel, it shows the channels the app has been added to first, then the others it read. If it can't show every person, it shows none of them. Either way the field says so, and you type the rest.

If the list can't be loaded—the connection is missing a scope, or none is chosen yet—the field says so, and typing still works. A large workspace's list can take a moment the first time, and the field says when it is still loading. The list is refreshed every few minutes rather than on every open, so a channel created in Slack can take up to five minutes to appear; type its name to use it sooner.

Composing the message​

The Message field offers four ways to write it. Pick the one that matches how much control you need—every one of them accepts variables.

TypeWhat it isReach for it when
FormattedA rich-text editor: bold, italic, strikethrough, links, inline and block code, bulleted and numbered lists, and tables.Almost always. It is the default, and what you type is what Slack shows.
MarkdownStandard markdown, rendered by Slack. Adds headings, task lists, block quotes, and fenced code blocks with syntax highlighting.The content is already markdown—most often an AI agent's output.
BlocksAn ordered list of Slack blocks configured one at a time.You want structure a text editor cannot express, such as a chart or a two-column summary.
Raw Block Kit JSONA Block Kit payload pasted verbatim.You need exact control, or a block type not offered under Blocks.

Formatted versus Markdown​

Formatted treats your text as text: punctuation such as an asterisk, an underscore, or a backtick arriving from a variable reaches Slack as those literal characters. Markdown treats the same punctuation as syntax. So if a variable might contain arbitrary prose, use Formatted; if it contains markdown you want rendered, use Markdown.

The Formatted editor deliberately offers only formatting Slack can render. Underline, superscript, and subscript are absent because Slack's message format has no equivalent for them—a message using them would lose that styling silently on delivery.

Markdown's toolbar is deliberately bare for the same reason in reverse: you are writing the characters, so a button that inserts them would fight you.

Blocks​

Configure blocks one at a time, in the order Slack should show them:

Header, Section, Markdown, Rich Text, Context, Divider, Image, Video, Remote File, Table, Data Table, Chart (Pie, or Bar / Line / Area), Card, Carousel, Container, Task Card, Plan, Buttons, and Link Button.

Raw Block Kit JSON​

Paste either shape Slack's Block Kit Builder produces—a bare array of blocks, or an object with a blocks key—so a payload moves across without editing. Variables can be inserted anywhere in the JSON, including inside string values.

A second field, Fallback Text, holds the plain text shown in notifications and by clients that cannot render blocks. Slack shows the message with no preview text when it is empty.

Slack expands a preview card beneath any link it recognises. Turn on Hide Link Previews to suppress them for a message—useful when the message is mostly links and the previews would bury the text. Left off, Slack applies its usual behaviour.

Dry runs​

During a dry run with no test recipient, the step posts nothing and writes the recipient to the run log instead, with a Preview Message link that opens the message in Slack's Block Kit Builder, so you can see the rendered message without sending it. The recipient is still looked up, and the log shows the Slack ID it was found as, so a recipient that would fail a live run fails the dry run too.

Output​

FieldDescription
recipientThe recipient the message was sent to.
channelSlack's resolved channel id.
tsSlack's message timestamp, usable to thread replies.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.