Slack Error: 'no_text' — Cause, Fix, and Troubleshooting Guide
Fix the Slack no_text error: chat.postMessage needs a top-level text fallback even when you send blocks. Always include a summary text string.
- #slack
- #api
- #troubleshooting
- #errors
Stuck on this Slack error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
Overview
no_text means Slack received a chat.postMessage (or chat.update) call with no usable message content — no text, and no blocks/attachments that provide a fallback. Most often it appears when you send only blocks and omit the top-level text.
{
"ok": false,
"error": "no_text"
}
Symptoms
- Block Kit messages fail while plain-text messages from the same bot succeed.
- The payload has a populated
blocksarray but notextkey. - A message built by string concatenation posts fine sometimes and fails when the string ends up empty.
Common Root Causes
1. Blocks without a text fallback
blocks render in-app, but Slack requires a top-level text string as the notification/accessibility fallback. Omitting it can yield no_text.
2. Empty or whitespace-only text
Conditionally built strings that resolve to "" (a filtered-out template variable, a null coalesced to empty) leave the message with nothing to send.
3. All content stripped by validation
Sanitising user input can remove every character, leaving an empty text and no blocks.
How to diagnose
Reproduce the blocks-only case:
curl -s -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel":"C0123456789","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Deploy finished"}}]}'
{"ok": false, "error": "no_text"}
Add a text fallback and it succeeds:
curl -s -X POST https://slack.com/api/chat.postMessage \
-H "Authorization: Bearer $SLACK_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel":"C0123456789","text":"Deploy finished","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Deploy finished"}}]}'
Fixes
- Always send a top-level
textsummary alongsideblocks. It becomes the push/notification preview and screen-reader text. - Guard against empty strings: default to a non-empty fallback (
text = summary or "(no summary)") before the API call. - Validate before sending: reject a message where both
textis empty andblocksis empty rather than letting Slack reject it.
What to watch out for
- The
textfallback should describe the message, not just repeat a header — it is what users see in notifications and on unsupported surfaces. - Attachments can also satisfy content requirements, but attachments are legacy; prefer
text+blocks. - This is an accessibility win, not just error avoidance: screen readers rely on the
textfield.
Related
Fixed it? Get 500 Slack & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Stuck on this? Start guided troubleshooting
Open an interactive diagnostic session with this error already loaded. Work a step-by-step plan, record what each check returns, land on a root cause, and export a clean incident summary — no account needed to start.
Did this fix your issue?
Solved it a different way?
Share the fix that worked for you — reviewed, then published to help the next engineer.
That looks like it may contain a secret (key, token, password, or connection string). Please remove it — a note with a detected secret can’t be published.
Thanks — that helps. Published notes appear after a quick review.
Trending errors this week
The error guides other engineers are actually reading right now.
- 1mount: wrong fs type, bad option, bad superblock
- 2mount: wrong fs type, bad option, bad superblock
- 3Docker 'failed to set up container networking': Fix the Bridge and IP Pool
- 4Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block
- 5Docker 'failed to create shim task': How to Fix the containerd Runtime Error
- 6Too many levels of symbolic links
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.