
Slack Post
CertifiedPost a Slack message
Slack Post
Post a Slack message
Sends a message with text, blocks, or attachments. Accepts either raw JSON payload or messageText; channel and thread can also come from the payload. Requires chat: write.
type: io.kestra.plugin.slack.app.chats.PostExamples
Post a simple text message
id: slack_post_message
namespace: company.team
tasks:
- id: post_message
type: io.kestra.plugin.slack.app.chats.Post
token: "{{ secret('SLACK_TOKEN') }}"
channel: "#general"
messageText: "Hello from Kestra!"
Post a message with custom payload
id: slack_post_custom
namespace: company.team
tasks:
- id: post_message
type: io.kestra.plugin.slack.app.chats.Post
token: "{{ secret('SLACK_TOKEN') }}"
channel: "#general"
payload: |
{
"text": "Workflow completed successfully",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Status:* :white_check_mark: Success"
}
}
]
}
Post a message to a thread
id: slack_post_thread
namespace: company.team
tasks:
- id: post_message
type: io.kestra.plugin.slack.app.chats.Post
token: "{{ secret('SLACK_TOKEN') }}"
channel: "#general"
messageText: "Main message"
- id: reply_message
type: io.kestra.plugin.slack.app.chats.Post
token: "{{ secret('SLACK_TOKEN') }}"
channel: "#general"
messageText: "Reply in thread"
timestamp: "{{ outputs.post_message.timestamp }}"
Properties
token *Requiredstring
Slack token
channel string
Channel to send message
Channel ID or name; can also be set inside the payload.
iconEmoji string
Message icon emoji
Emoji code (e.g., : wave: ) that overrides iconUrl.
iconUrl string
Message icon URL
HTTPS image used as icon when iconEmoji is not provided.
messageText string
Message Text or JSON String
The message content as a raw string. It can be plain text with markdown, or a JSON object. If not a valid JSON object, it is automatically wrapped in {"text": "..."}. This property is ignored if the payload property is set.
payload string
Slack message payload
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
timestamp string
Thread timestamp to reply to
Slack ts value for replying in a thread; must belong to the same channel.
username string
Display username
Overrides the bot's default display name for this message.
Outputs
timestamp *Requiredstring
Timestamp of posted message