Skip to content
AskElephant Knowledge Base home

Create Slack Block

Use AI to turn a plain-language description into Slack Block Kit JSON, so you can build rich, interactive Slack messages without writing the JSON by hand.

Create Slack Block node in the workflow builder

What It Does

Takes a prompt describing the message you want and uses an AI model to generate Slack Block Kit JSON. It returns both a JSON string and a structured object, ready to feed into a Slack message node.

When To Use It

Use this when you want a formatted or interactive Slack message (headers, dividers, buttons, fields) but do not want to write Block Kit JSON yourself. Chain it before Send Slack Message (or another Slack send node) so the generated payload becomes that node's message input.

Configuration

Configure the node with these settings:

Field

What it controls

Prompt

Describe the Slack message you want in plain language. The AI generates Block Kit JSON from this description. Required.

Model

Which AI model generates the JSON. Defaults to default (balanced). Other options include lite (fast and cheap), creative, analytical, and specific models such as claude-sonnet-5 and gpt-5.5. Required.

Temperature

Controls how deterministic the output is, from 0 to 1 in steps of 0.1. Lower values produce more consistent results. Defaults to 0.7. Required.

Validation Criteria

Optional rules the generated Block Kit JSON must pass. When set, the node checks the output and regenerates it until it passes or Max Retries is reached.

Max Retries

How many additional generation attempts to make if validation fails. Defaults to 2, from 0 to 5.

Outputs

The node passes these values downstream. Check the Outputs tab on the configured node to confirm exact paths.

Variable

Type

Description

Example

slackMessage

string

JSON string of the Slack message payload for direct use in Slack message nodes

{{nodeId.slackMessage}}

slackMessageObject

object

Structured Slack Block Kit message with text fallback and blocks

{{nodeId.slackMessageObject}}

slackMessageObject.text

string

Fallback text for notifications and accessibility

{{nodeId.slackMessageObject.text}}

slackMessageObject.blocks

array<object | object | object | object | object | object | object | object | object | object>

Array of Slack Block Kit blocks

{{nodeId.slackMessageObject.blocks}}

Example Workflow

A workflow drafts a weekly metrics recap. A Create Slack Block node turns a prompt describing the key numbers into Block Kit JSON, then a Send Slack Message node posts {{createSlackBlockNode.slackMessage}} to the team's channel.

  • Send Slack Message

  • Send Message to Channel

  • Send Direct Message

Need More Help?

Reach the AskElephant support team by:

  • clicking the Support tab on the right side of your screen,

  • emailing [email protected],

  • or using @askelephant support in your dedicated Slack channel.