Building a Real‑Time Dashboard in Slack with Block Kit
Learn how to use Slack’s Block Kit to create a dynamic, interactive dashboard that updates in real time, including tips for keeping within message limits and avoiding layout collapse.
01 Apr 2026, 06:53 UTC

Why a Slack dashboard matters
When a team needs instant visibility into production health, pushing a live dashboard into Slack can be faster than spinning up a dedicated web page. Slack’s Block Kit lets developers describe a message layout in JSON, and Slack renders it across desktop, mobile, and web clients. The result is a single, consistent UI that can be updated in place without sending new messages.
Key constraints you must respect
- Message size: 3,000 characters per message.
- Block count: 50 blocks maximum.
- Rate limits: 1,000 messages per minute per workspace.
Violating any of these triggers a generic error or throttling, so the first step is to design a layout that fits comfortably within the limits.
Designing the layout
Block Kit offers a handful of block types that are most useful for dashboards:
| Block | Description |
|---|---|
| Section | Text and optional accessory (e.g., button, image). |
| Image | Full‑width image or chart. |
| Actions | Row of interactive elements. |
| Divider | Horizontal separator. |
Arrange the blocks so that the most critical metrics appear first. Use context blocks sparingly; too many can cause the layout to collapse on mobile.
Example: a simple system‑monitor card
Below is a minimal Block Kit payload that shows CPU, memory, and a chart. The accessory of a section can be a button that opens a detailed view in the browser.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*System Health Dashboard*"
}
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*CPU*: 42%"
},
{
"type": "mrkdwn",
"text": "*Memory*: 3.2 GB / 8 GB"
}
]
},
{
"type": "image",
"image_url": "https://example.com/charts/cpu.png",
"alt_text": "CPU usage over time"
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Open full report"
},
"url": "https://example.com/reports/full"
}
]
}
]
}
Deploy this payload to a private channel to confirm rendering:
- Run
curl -X POST https://slack.com/api/chat.postMessage -H "Authorization: Bearer xoxb-..." -H "Content-type: application/json" -d @dashboard.jsonfrom a terminal withcurlinstalled. - Check the message on desktop, mobile, and web to ensure the image scales and the button is clickable.
Keeping the dashboard alive: real‑time updates
Instead of polling, use the Events API with Socket Mode to push updates. The workflow:
- Enable Socket Mode in the app settings and obtain a
SLACK_APP_TOKEN. - Connect to the WebSocket endpoint and listen for
app_mentionor custom events that indicate a metric change. - When an update arrives, call
chat.updatewith the samets(timestamp) and a newblockspayload.
Because chat.update replaces the existing message, you stay well below the 1,000‑message‑per‑minute limit. Still, throttle updates to once per minute per dashboard if metrics change faster.
Trade‑offs and limitations
- Block Kit is declarative; you cannot embed custom CSS or JavaScript. Complex visualizations must be served as images or external links.
- Rate limits mean a single dashboard can be refreshed no more than once per second on average. If you need sub‑second updates, consider a separate monitoring channel or a dedicated web UI.
- Large payloads risk hitting the 3,000‑character limit. Use concise markdown, remove unnecessary whitespace, and consider pagination (e.g., a button that loads the next page).
Practical checklist before rollout
- Validate JSON with the Block Kit Builder to catch syntax errors.
- Test on all clients: desktop, mobile, web.
- Monitor rate‑limit headers (
x-slack-rate-limit-remaining) during development. - Set up a fallback: if
chat.updatefails, send a new message and delete the old one.
Takeaway
Slack’s Block Kit gives you a quick way to turn raw metrics into a polished, interactive dashboard that lives inside the chat you already use. By respecting size limits, using Socket Mode for updates, and validating your JSON, you can deliver a reliable, real‑time view without writing a custom UI.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.