
Slack Trigger
CertifiedTrigger flows from Slack Events API
Slack Trigger
Trigger flows from Slack Events API
Exposes a webhook compatible with Slack Event Subscriptions and slash/interactive payloads to start a Flow execution. Validates requests with your app signing secret and uses the bot token to decrypt the incoming context. Configure Slack to send the events you want to this trigger URL; unsupported paths return 404.
type: io.kestra.plugin.slack.app.core.TriggerExamples
Trigger on new messages
id: slack_message_trigger
namespace: company.team
triggers:
- id: slack_event
type: io.kestra.plugin.slack.app.core.Trigger
botToken: "{{ secret('SLACK_BOT_TOKEN') }}"
signingSecret: "{{ secret('SLACK_SIGNING_SECRET') }}"
conditions:
- type: io.kestra.plugin.core.condition.ExecutionFlowCondition
namespace: company.team
flowId: slack_message_trigger
tasks:
- id: log_event
type: io.kestra.plugin.core.log.Log
message: "Received Slack event: {{ trigger.body }}"
Trigger on app mentions
id: slack_mention_trigger
namespace: company.team
triggers:
- id: slack_mention
type: io.kestra.plugin.slack.app.core.Trigger
botToken: "{{ secret('SLACK_BOT_TOKEN') }}"
signingSecret: "{{ secret('SLACK_SIGNING_SECRET') }}"
tasks:
- id: respond_to_mention
type: io.kestra.plugin.slack.app.chats.Post
token: "{{ secret('SLACK_BOT_TOKEN') }}"
channel: "{{ trigger.body.channel }}"
messageText: "Hello! You mentioned me."
timestamp: "{{ trigger.body.ts }}"
Properties
key *Requiredstring
1256The unique key that will be part of the URL.
The key is used for generating the webhook URL.
::alert{type="warning"} Make sure to keep the webhook key secure. It's the only security mechanism to protect your endpoint from bad actors, and must be considered as a secret. You can use a random key generator to create the key. ::
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
botToken string
Slack bot token
Bot token for the installed app, rendered at runtime (typically starts with xoxb-).
fetchType Non-dynamicstring
FETCHNONEFETCHSTOREWhat the trigger does with the body of the webhook request.
FETCH: the body reaches the flow on thebodyoutput. A JSON body is deserialized, a binary one is base64-encoded. This is the default, and how a webhook has always behaved.STORE: the body is streamed into Kestra's internal storage as it is received, and the flow reaches it through theurioutput. Nothing of it travels through the execution, so this is the option to use for a large or binary payload - but note that a condition on the trigger can no longer read the body.NONE: the body is read off the connection and dropped. Use it for a caller whose payload the flow does not need.
This only concerns the body of a request. The file parts of a multipart/form-data request are always stored in the internal storage and exposed on parts, whatever this property is set to, as a file part has no meaningful representation inside an execution.
inputs object
The inputs to pass to the triggered flow
signingSecret string
Slack signing secret
Secret used to verify Slack signatures on every webhook request; required for all Event API calls.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
body *Requiredobject
Webhook payload body
headers *Requiredobject
Webhook request headers
parameters *Requiredobject
Webhook query parameters
token *Requiredstring
Encrypted bot token for the event