Slack Socket Mode Trigger
AI-generatedSummary
Listen for specified Slack events using Socket Mode and trigger the workflow when events match optional filters such as event types, channel restrictions, and regex patterns.
Inputs
- Trigger On (required) — Select one or more Slack events to listen for (e.g., message, app_mention, slash_command).
- Regex Pattern — Optional regular expression to match against the JSON string of incoming Slack events (used to filter events). Capture groups can extract data.
- Regex Flags — Flags for the regular expression (e.g., g for global, i for case-insensitive). Defaults to 'g'.
- Slash Commands — For the 'slash_command' trigger, specify a comma-separated list of slash commands (without leading slashes) to listen for; leave empty to listen for all.
- Channels to Watch — Specify one or more Slack channel IDs to filter events. Only events from these channels will trigger the workflow.
- Legacy Channel to Watch — Legacy single Slack channel selection to filter events, retained for backwards compatibility.
Output shape
A JSON array of Slack event objects matching the selected triggers and filters.
Events are emitted whenever the Slack Socket Mode client receives an event matching the selected 'Trigger On' options, optional channel filters, and regex pattern if specified. The event data includes all relevant Slack payloads minus functions. Slash commands acknowledge automatically before triggering the workflow. The node performs health checks to maintain connection and reconnect as needed.
Examples
Example 1: Trigger workflow on new messages matching a regex in a specific channel
Trigger On = message; Regex Pattern = '^hello'; Channels to Watch = #general channel ID
Example 2: Trigger workflow on any slash command 'deploy' or 'status'
Trigger On = slash_command; Slash Commands = 'deploy,status'; no channel filter; optional regex to filter command text