Canvases are simple but powerful documents built into Slack. Canvases can either exist attached to a channel or all on their own. Here are some uses for canvases to inspire you:
✨ Use a channel canvas in a feedback channel to instruct users how to submit feedback in a desired format or denote certain urgency.
✨ Welcome new team members with an onboarding canvas filled with tasks, team resources, and user references of their fellow comrades.
✨ Create a canvas in connection with an incident to gather all pertinent information in one place.
Canvases can be added to Slack apps via the Slack API or with a built-in function in a workflow app. How you format canvas content depends on how you are interacting with it—whether that is through the Slack API or with a built-in function in a worflow app. Note that currently, Block Kit is not supported in canvases.
When creating or editing a canvas with the API, you will encounter a document_content
object, which contains two properites of its own: type
, and markdown
. Currently, the only supported type
is markdown
.
The document_content
object supports the following markdown elements:
Markdown formatting varies slightly for standard elements, like headers and quotes, and Slack-specific elements, like user and channel mentions.
For guidance on markdown formatting for standard elements, refer to this markdown guide and our internal documentation Formatting text for surfaces.
For Slack-specific elements, the markdown syntax for canvases is a bit different. For example, a channel mention, where the channel ID is C123ABC456
:
Why not join ![](#C123ABC456)
And a user mention, where the user ID is U123ABCDEFG
:
![](@U123ABCDEFG)
In both of these cases, the link will automatically be converted to show the channel name or user card, respectively. If any of the channel members do not have access to the linked channel, they will see an unclickable private channel
label.
Below are some more examples of these Slack-specific elements in action.
Given the example request of this code:
POST https://slack.com/api/conversations.canvases.create
Request
{
"channel_id": "C07317JTXCP",
"document_content":
{
"type":"markdown",
"markdown":"# Headers\n# Status\n:large_green_circle: On Track\n# Goal\nThe channel to coordinate the build, testing, and launch of Platypus\n# :people_hugging:Stakeholders\n![](@U071CCRCVFH)\n\n![](@UQSSGHV0Q)\n# :books:Resources\n* Project Plan\n* Google Drive\n# :slack:Related channels\n* ![](#C073UAJRW4R) - Project Channel\n* ![](#C073UAJRW4R) - GTM Channel"}
}
Here's the same content in a more human-readable format:
# Headers
# Status
:large_green_circle: On Track
# Goal
The channel to coordinate the build, testing, and launch of Platypus
# :people_hugging:Stakeholders
![](@U071CCRCVFH)
![](@UQSSGHV0Q)
# :books:Resources
* Project Plan
* Google Drive
# :slack:Related channels
* ![](#C073UAJRW4R) - Project Channel
* ![](#C073UAJRW4R) - GTM Channel
The ouput canvas would look like the channel canvas in this image:
Some objects, like user references, support both "card" and "title" unfurls. This unfurling behavior is contextual. To be unfurled as a "card" (like the image above for this example), the reference needs to be in its own syntax block. If the reference is is a child of another syntax block, the unfurl will be a "title" style. In this example, the double spacing around the users (the \n\n
part) ensures the user mentions unfurl as a card.
When referencing an image in the document_content
field, you can pass a publicly-hosted image URL.
Alternatively, to reference an image that is already hosted in Slack, pass the image permalink for the URL value.
If the image hasn’t been uploaded already, you’ll first need to upload it. Instructions to do so can be found in Uploading files in the files documentation. Once completed, you can use the returned file ID with the files.info
endpoint to find the image permalink.
For which permalink to use, refer to Permalinks in the file object documentation.
Once you have the permalink, pass the value to your canvas like this:
POST https://slack.com/api/canvases.edit
Request
{
"canvas_id": "F072RA30WRL",
"changes": [{
"operation": "insert_after",
"document_content": {
"type":"markdown",
"markdown":"![graph](https://your_workspace_URL.slack.com/files/U071SRU8BA7/F073FVDABQS/image.png)"
},
"section_id": "temp:C:YKV9b3fab0f992e4080ae952deca"
}]}
Let's look at another example of this in a weekly newsletter example.
To create a weekly newsletter canvas for your team, it could look something like this:
POST https://slack.com/api/canvases.create
Request
{ "title": "Weekly Newsletter for May 2",
"document_content": { "type":"markdown","markdown":"Welcome to the latest edition of our weekly newsletter! We're thrilled to share with you some exciting updates and news from our organization.\n ## :chart-green: Weekly Targets\n ![graph](https://your_workspace_URL.slack.com/files/UQSSGHV0Q/F071Q447X6Z/image__1_.png)\n ## :tada: Latest News\n* :act-app: Just a few days left to complete our FY25 Corporate Message Certification! Block 30 minutes on your calendar, head to Astro’s Course Tracker, and align on our corporate strategy and message. :lets-go:\n* :sales-elevate-wow: We relaunched Slack Sales Elevate at World Tour New York, with new features including deal insight notifications, deal filters, and Slack AI, to help sales leaders stay informed, take action, and guide their teams to close deals faster. :amaze:\n* :love: ![](@U071CCRCVFH) wished our wonderful Executive Assistants a happy Administrative Professionals Day, where we saw lots of love in thread for our amazing EA crew!\n* :emea2: ![](@UQSSGHV0Q) recapped a busy EMEA trip to London and Amsterdam, highlighting meetings with customers like Octopus Energy, JP Morgan Chase, Haleon, AstraZeneca, Channel 4, Synthesia, Booking.com, and more!\n\n ## 📅 Upcoming Events\n* May 1: Hear from the VP of Sales on how to create culture 😀\n* May 18: Women at Acme Happy Hour at Amelie Wine Bar 🍷\n* May 15: Sign up for our monthly lightning networking event ⚡️\n\nNot part of our calendar group? Add yourself to receive invites"
}}
Here is the same content in a more human-readable format:
Welcome to the latest edition of our weekly newsletter! We're thrilled to share with you some exciting updates and news from our organization.
## :chart_green: Weekly Targets
![graph](https://your_workspace_URL.slack.com/files/UQSSGHV0Q/F071Q447X6Z/image__1_.png)
## :tada: Latest News
* :act-app: Just a few days left to complete our FY25 Corporate Message Certification! Block 30 minutes on your calendar, head to Astro’s Course Tracker, and align on our corporate strategy and message. :lets-go:
* :sales-elevate-wow: We relaunched Slack Sales Elevate at World Tour New York, with new features including deal insight notifications, deal filters, and Slack AI, to help sales leaders stay informed, take action, and guide their teams to close deals faster. :amaze:
* :love: ![](@U071CCRCVFH) wished our wonderful Executive Assistants a happy Administrative Professionals Day, where we saw lots of love in thread for our amazing EA crew!
* :emea2: ![](@UQSSGHV0Q) recapped a busy EMEA trip to London and Amsterdam, highlighting meetings with customers like Octopus Energy, JP Morgan Chase, Haleon, AstraZeneca, Channel 4, Synthesia, Booking.com, and more!
## 📅 Upcoming Events
* May 1: Hear from the VP of Sales on how to create culture 😀
* May 18: Women at Acme Happy Hour at Amelie Wine Bar 🍷
* May 15: Sign up for our monthly lightning networking event ⚡️
Not part of our calendar group? Add yourself to receive invites
This example request would yield this canvas as a result:
Formatting canvas content within a workflow app (i.e. a Deno-based, Slack-hosted app) is different. If you are creating or updating a canvas with the built-in Slack methods, you will encounter a content
input parameter that is an expanded rich text object. Refer to the automation types page for an example of expanded_rich_text
and all of its sub-elements.