# Slack Block Kit Approval Message Generator

> Source: https://netray.co/tools/slack-block-kit-approval-message-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Creates a chat.postMessage body with Block Kit sections, fields and Approve and Reject action buttons for ERP approval workflows.

## Category

developer

## Erp

Slack

## Audience

- Integration developer
- DevOps engineer
- ERP admin

## Tool

**Kind:** template

**Output:** code

**Language:** json

**Fields:**

#### Channel ID

**Key:** channel

**Type:** text

**Default:** C0123456789

**Help:** Use the channel ID, not the name.

#### Fallback text for notifications

**Key:** fallback

**Type:** text

**Default:** Approval needed: change order ECO-2291

#### Header

**Key:** header

**Type:** text

**Default:** Engineering change approval

#### Document number

**Key:** doc_no

**Type:** text

**Default:** ECO-2291

#### Requester

**Key:** requester

**Type:** text

**Default:** Ana Torres

#### Impact summary

**Key:** impact

**Type:** text

**Default:** Revision C to D on bracket 7751, 3 open work orders affected

#### Decision needed by

**Key:** due

**Type:** text

**Default:** 2026-11-05

#### Link to the document

**Key:** link

**Type:** text

**Default:** https://plm.example.com/eco/2291

**Blocks:**

#### Body for POST https://slack.com/api/chat.postMessage

**Body:** {
  "channel": "{{channel}}",
  "text": "{{fallback}}",
  "blocks": [
    { "type": "header", "text": { "type": "plain_text", "text": "{{header}}" } },
    {
      "type": "section",
      "fields": [
        { "type": "mrkdwn", "text": "*Document:*\n{{doc_no}}" },
        { "type": "mrkdwn", "text": "*Requester:*\n{{requester}}" },
        { "type": "mrkdwn", "text": "*Decision by:*\n{{due}}" }
      ]
    },
    { "type": "section", "text": { "type": "mrkdwn", "text": "*Impact:* {{impact}}\n<{{link}}|Open in system>" } },
    { "type": "divider" },
    {
      "type": "actions",
      "block_id": "approval_{{doc_no}}",
      "elements": [
        { "type": "button", "action_id": "approve", "style": "primary", "text": { "type": "plain_text", "text": "Approve" }, "value": "{{doc_no}}" },
        { "type": "button", "action_id": "reject", "style": "danger", "text": { "type": "plain_text", "text": "Reject" }, "value": "{{doc_no}}" }
      ]
    },
    { "type": "context", "elements": [ { "type": "mrkdwn", "text": "Sent by the ERP integration. Decisions are logged." } ] }
  ]
}

**Notes:** Send with an Authorization: Bearer bot token header and the chat:write scope. Button clicks are posted to the Interactivity Request URL of your Slack app, which must verify the Slack signing secret and respond within three seconds. Replace the buttons with a message update after a decision so nobody clicks twice.

## Content

**Intro:** Block Kit is Slack's JSON layout format for messages with structure and buttons. This generator builds an approval request you can post with chat.postMessage and wire to your ERP or PLM change workflow.

**Sections:**

#### How to use it

**Body:** Enter the channel ID, a short fallback text and the facts an approver needs. Copy the JSON into your integration and post it with your bot token. The fallback text appears in push notifications and screen readers, so make it meaningful on its own. Create the Slack app, add the chat:write scope, enable Interactivity and point the request URL to an endpoint you control. When someone clicks a button, Slack sends a signed payload with the action_id, the user and your value, which you map to the ERP document.

#### Handling the response safely

**Body:** Treat every click as untrusted until verified. Check the X-Slack-Signature header with your signing secret and reject stale timestamps. Map the Slack user ID to an ERP user and confirm that person is an authorized approver for that document and amount. Update the original message to show the outcome and who decided, which also prevents duplicate clicks. Write the decision to your audit log with the Slack user ID and timestamp.

**Bullets:**

- Verify signature and timestamp
- Check approver authority in the ERP
- Update the message after the decision
- Make the handler idempotent

#### Common mistakes

**Body:** Typical errors include using a channel name where an ID is required, exceeding the 50 block limit per message, forgetting that section text has a length limit, and responding to interactivity after the three second window. Do not put secrets or personal data in button values because they travel through Slack. Remember that private channel posts need the bot to be invited first.

**Cta:** Netray builds approval and alert integrations between ERP systems and chat tools, read-only by default with human approval on writes.

**Faq:**

#### Do I need a Slack app to send this?

**Answer:** Yes for interactive buttons. An incoming webhook can post the blocks, but receiving clicks requires an app with Interactivity enabled and a public HTTPS request URL.

#### What is the fallback text for?

**Answer:** It is the plain text shown in notifications and by clients that cannot render blocks. Slack also uses it for accessibility, so write a complete sentence.

#### Can I approve without leaving Slack?

**Answer:** Yes if your handler writes the decision to the ERP through its API. For high value approvals many teams prefer a link to the system so a full review happens there.

#### Are there limits on message size?

**Answer:** Slack limits a message to 50 blocks and caps the length of text in individual blocks. Keep approval messages short and link out for detail.

## Search terms

slack block kit approval message, slack block kit builder approval buttons, slack chat postMessage blocks example, slack approval workflow json, slack interactive message approve reject, block kit section fields example, slack purchase approval bot

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
