The essential Slack message takes many forms: a mere statement, a gateway into an interactive workflow, even a window into a bot's soul.
The same composition capabilities apply, no matter the purpose of the message.
In this overview, we'll outline the core concepts needed to compose messages. We'll also introduce the visual tools you need to make your app's messages compelling and memorable.
These are developer instructions covering content posted to Slack via APIs. For user instructions on message formatting in Slack clients, consult this help center article.
You can send postal mail in the United States using lots of different mail carriers, but each carrier uses the same standardized format for addresses.
Similarly, there are multiple ways for Slack apps to send messages, but all of them use the same message format.
The contents of a message are determined by a JSON object that we call the message payload.
Using these fields together to choose the message's appearance and interactive functionality is what we call message composition.
You can read our reference guide to message payloads to see the basic structure of message JSON objects.
Our guide to sending messages elaborates on the payload fields that control things like the destination or visibility of app-published messages.
In this guide, however, we'll focus purely on message composition, starting with how you can format text.
The base message is a plain, unformatted string of text --- just like this paragraph.
You can easily introduce a bit of boldness or some emphasis to make those messages easier to read and understand. You might also want to include some
inline code, add an emoji 💡, or lay things out in a list:
these things together💡
To accomplish this formatting and more, Slack apps can use a markup style in message text called
Beyond changing the appearance of text, there are also parsing options that can turn text into something more useful.
You can use special sequences of characters to:
Read our advanced formatting guide to learn more about these options.
For Slack apps, the medium transcends the message: you can do more than convey simple pieces of text.
Block Kit provides a range of visual components that can be used in messages to lay out complex information in a way that's easy to read and understand. Divide content up, add images, provide contextual info, and more.
Learn how to use these features to maximise your messaging magic by reading our guide to using blocks in message layouts.
Block Kit also opens your app's messages up to possible participation, with interactive components that enable workflows and integrations to be stitched right into the message.
Sometimes your app will want to include content that isn't quite as vital as the rest of the message. There's a simple way to make this distinction visual: using message attachments.
Attachments allow you to include simple text, or complex block layouts, in a less urgent, secondary message section.
This overview gives a broad perspective on the subtle differences among Slack messages. We encourage you to savor the individual guides to each composition feature, as you cook up a richly delectable experience for your app to serve and for your users to gobble up.