Skip to main content

Slack Events Trigger

Type ID: slackEventsTrigger  ·  Kind: Trigger  ·  Trigger style: webhook  ·  Ports: 0 in, 1 out

Starts the workflow instantly when Slack reports an event (a message, an @mention, a reaction), instead of polling for it. Slack calls the workflow's URL, so the customer's Slack app must point its Event Subscriptions Request URL at it.

In your Slack app, open Event Subscriptions, enable them, and paste this trigger's URL as the Request URL. Subscribe to the events you need (and give the app the matching permissions), and add the app's Signing Secret (Basic Information) to the connection used here. A Slack app can send events to only one URL, so one Slack app feeds one trigger. Slack only sends events from channels the app is a member of.

Credentials​

Connect a Slack Events credential via the integration picker.

{
"credentials": {
"name": "slack_events",
"id": "<credential-id>"
}
}

Properties​

PropertyKeyTypeRequiredDefaultPossible valuesApplies when
HTTP MethodmethodstringYesPOSTPOSTAlways
EventeventoptionsNomessageMessage Posted (message), App Mention (app_mention), Reaction Added (reaction_added), Any Event (all)Always
FiltersfiltersobjectNo{}See sub-tableAlways

filters (object)​

PropertyKeyTypeRequiredDefaultPossible values
Channel IDchannelIdstringNo''Only events in this channel (e.g., C1234567890)
User IDuserIdstringNo''Only events caused by this person (Slack user ID)
Text ContainstextContainsstringNo''Only messages containing this text
Exclude Bot MessagesexcludeBotsbooleanNotrueIgnore messages from bots, including this Slack app's own posts (prevents reply loops)
ThreadsthreadsoptionsNoallMessages and Replies (all), Top-Level Messages Only (topLevel), Thread Replies Only (replies)
Include Edits and DeletionsincludeMessageChangesbooleanNofalseAlso start for messages that were edited or deleted

Notes​

  • Before an execution exists, the trigger answers Slack's one-time URL check, verifies Slack's request signature with the app's signing secret, drops events this trigger is not set up for, and names the event_id as the de-duplication key so Slack's retries run the workflow once.
  • Output includes type, eventId, eventTime, teamId, appId, channel, user, text, ts, eventTs, deletedTs, threadTs, isThreadReply, isBot, subtype, channelType, reaction, itemUser, item, retryNum, event, and receivedAt.