Skip to main content

Multi-column status report

Every language builds a complete message with the same fallback text and a two-column table: Service/Status, API/Healthy, Worker/Degraded. For formatted cells and column alignment, see Using Blocks. These examples print JSON without sending it.

Output

Local preview of the selected language’s tested example. Slack client appearance may differ; controls here do not send requests.

ServiceStatus
APIHealthy
WorkerDegraded
Serialized output
{
"channel": "C1",
"mrkdwn": true,
"blocks": [
{
"type": "table",
"block_id": "<generated-block-id>",
"rows": [
[
{
"type": "raw_text",
"text": "Service"
},
{
"type": "raw_text",
"text": "Status"
}
],
[
{
"type": "raw_text",
"text": "API"
},
{
"type": "raw_text",
"text": "Healthy"
}
],
[
{
"type": "raw_text",
"text": "Worker"
},
{
"type": "raw_text",
"text": "Degraded"
}
]
]
}
],
"text": "Service status"
}

Code​

Shared example contract: The same service-status message in every language: Service/Status, API/Healthy and Worker/Degraded.

from slackblocks import Message, RawText, TableBlock

rows = [[RawText(text) for text in row] for row in [
["Service", "Status"], ["API", "Healthy"], ["Worker", "Degraded"],
]]
report = Message(channel="C1", text="Service status", blocks=[TableBlock(rows=rows)])
print(report.json())