openclaw-slack-block-kit
v0.1.1
Published
Send rich Slack Block Kit messages to the current Slack conversation
Maintainers
Readme
OpenClaw Slack Block Kit
English | 한국어
Turn structured OpenClaw answers into Slack-native dashboards, tables, image cards, and other Block Kit layouts.
- Sends to the current Slack channel, DM, or thread automatically.
- Reuses the Slack connection already configured in OpenClaw—no token or channel ID is exposed to the model.
- Adds one Slack-only tool,
slack_send_blocks, without turning every reply into a card.
Before / After
The same fictional sales report rendered as a normal reply and with Block Kit.
| Plain text reply | With slack_send_blocks |
|:---:|:---:|
|
|
|
Install
Requirements:
- OpenClaw
2026.7.1-2or later - A working Slack connection in OpenClaw
Install from ClawHub:
openclaw plugins install clawhub:openclaw-slack-block-kitOr install directly from npm:
openclaw plugins install npm:openclaw-slack-block-kitAfter installation, no plugin-specific Slack credentials, destination, or other configuration is required. The plugin reuses OpenClaw's existing Slack connection and the current conversation route.
Use it from Slack
Start in the Slack conversation where you want the result, then ask naturally:
Show today's sales as a Slack dashboard with a concise summary and comparison table in this thread.The agent can choose Block Kit when the answer benefits from a structured layout. To request it explicitly, name the tool:
Use slack_send_blocks to show these candidates as image cards in the current thread.The message is always sent back to the Slack channel, DM, or thread where the request
started. The tool cannot redirect it to another destination. For a different channel
or thread, use OpenClaw's core message tool.
After a successful send, the Block Kit message is normally the final answer, without a duplicate plain-text reply. Each message still includes fallback text for Slack notifications and accessibility.
What it supports
- Comparisons, ranked results, status summaries, multi-field records, tables, image cards, grouped sections, and data visualizations
- Known display blocks:
section(includingfieldsand an image accessory),header,context,divider,image,rich_text,table, anddata_visualization; common structure, size, URL, and safety checks run locally, while Slack validates their detailed schema - Warning-bearing passthrough for unknown message-surface blocks, with the same common local checks
- 1–10 messages per call, in order; 1–50 blocks per message
- Required fallback text of 1–4,000 characters per message
- OpenClaw's existing Slack authentication, outbound queue, hooks, and delivery receipts
This plugin is display-only. It does not support buttons, selects, inputs, or any other
element that requires an action_id; nor does it handle modals, App Home, or
file/video/call lifecycles.
For a portable layout across channels, use OpenClaw's core message tool with
presentation; use this plugin when you specifically need raw Slack Block Kit.
Troubleshooting
The tool does not appear
Plugin installation registers the tool automatically. The steps below grant access only when the active tool policy or runtime hides it.
Start the request from Slack. The tool is intentionally hidden on other surfaces.
Plugin installs and updates require the Gateway to reload. A managed Gateway normally restarts automatically; otherwise run
openclaw gateway restartonce.Inspect the loaded runtime and confirm that the Gateway RPC is healthy:
openclaw plugins inspect slack-block-kit --runtime --json openclaw gateway status --deep --require-rpcIf the plugin reports
loadedbut the tool is missing, runopenclaw dashboard, then open OpenClaw Dashboard → Agents → select your agent → Tools, enableslack_send_blocks, and select Save. This is commonly needed when local onboarding selected thecodingtool profile, which excludes third-party plugin tools.If the plugin is disabled, run
openclaw plugins enable slack-block-kit.If
plugins.allowis configured, make sure it includesslack-block-kit. This is a plugin-loading gate, separate from the agent's tool policy.
Profiles such as coding, messaging, and minimal exclude third-party plugin tools.
The Dashboard toggle normally writes agents.list[].tools.alsoAllow for the selected
agent. If the Dashboard reports that the agent uses an explicit allowlist, update that
agent's tools.allow in the Dashboard Config tab instead.
To grant the tool globally, edit the active OpenClaw configuration file—normally
~/.openclaw/openclaw.json. A CLI --profile <name> (state isolation, unrelated to tool
profiles) or OPENCLAW_CONFIG_PATH can change this location; run openclaw config file
to print the active path. Add the following top-level tools entry to that file:
{
tools: {
alsoAllow: ["slack_send_blocks"],
},
}To limit the grant to one agent, put the same alsoAllow entry under that agent's
agents.list[].tools instead. If the chosen scope already has tools.allow, add the
tool to that array; allow and alsoAllow cannot coexist in one scope.
Sandbox tool policy is a separate gate. Sandboxed agents also need the plugin id
slack-block-kit in tools.sandbox.tools.alsoAllow (or the existing sandbox allow
array). Use group:plugins instead only to allow every plugin tool. For agent-,
provider-, or sandbox-specific policies, see
OpenClaw tool profiles and policies.
A send fails
INVALID_ARGUMENT: check that each item inmessages[]contains bothtextandblocks.INVALID_BLOCK_KIT: followerror.issues[].pathand fix the reported block, URL, nesting, duplicate ID, or interactive element.INVALID_ROUTE: start the request from a real Slack channel, DM, or thread.RUNTIME_CONFIG_UNAVAILABLE: check that the Gateway and plugin runtime are loaded, then retry.SLACK_API_ERROR(for example,message: "invalid_blocks"): compare the payload with Slack's current block reference or test it in Block Kit Builder.SLACK_RATE_LIMITED: waitretryAfterseconds when provided; otherwise back off briefly before retrying.
Advanced usage
The agent normally builds this payload for you. The public input envelope is:
{
"messages": [
{
"text": "Fallback for accessibility and notifications",
"blocks": [
{
"type": "section",
"text": { "type": "mrkdwn", "text": "*Candidate 1*" },
"accessory": {
"type": "image",
"image_url": "https://example.com/item.png",
"alt_text": "Candidate image"
}
}
]
}
],
"validateOnly": false
}text and blocks belong inside every messages[] item. Flat top-level fields,
missing fields, extra fields, and wrong types are rejected.
validateOnly: true runs local structure, size, and safety checks without sending to
Slack. It does not guarantee that Slack will accept every block combination.
Multi-message sends are not atomic. After a partial_failed result, retry only the
failed indexes to avoid duplicating messages that already succeeded.
Security
- The plugin neither accepts nor stores a separate Slack token.
- The destination comes only from the trusted current Slack route.
- URL-bearing fields require valid
https:URLs, and model-facing errors omit tokens, full payloads, and internal stacks.
Do not put secrets or sensitive signed URLs in fallback text, blocks, or image URLs.
Develop from source
Node.js and pnpm are required only for source development.
git clone https://github.com/demarlik01/openclaw-slack-block-kit.git
cd openclaw-slack-block-kit
pnpm install --frozen-lockfile
pnpm build
openclaw plugins install --link "$PWD"
openclaw plugins enable slack-block-kitRun the release checks with:
pnpm typecheck
pnpm test
pnpm verify:completion
pnpm plugin:metadata-check
pnpm plugin:validate
npm pack --dry-runReferences
- Architecture: English · 한국어
- Slack: Block Kit overview · Block reference · Block Kit Builder
- OpenClaw: Plugin installation · Tool profiles and policies · Building plugins
