Trigger Slack Message Block

Trigger workflows based on Slack messages

The Trigger Slack Message block enables users to initiate workflows based on specific conditions in Slack messages. This block is ideal for automating responses or actions triggered by message content, user interactions, or other Slack events.

Configuration (Required)

run_conditions
object

Defines the conditions under which the workflow should be triggered. This parameter allows you to specify rules that determine when the block should activate. The default is an empty set of rules.

items
list

A list of input items defining the conditions and parameters for the Slack message trigger. Each item specifies its type, key, display name, default value, and whether it is optional. This configuration allows for dynamic and flexible triggering based on Slack message attributes.

  • Channel ID: Optional short text input for specifying the Slack channel ID.
  • Team ID: Optional short text input for specifying the Slack team ID.
  • User ID: Optional short text input for specifying the Slack user ID.
  • Thread ID: Optional short text input for specifying the Slack thread ID.
  • User Message: Required long text input for specifying the content of the user’s message.
  • Is first message in thread: Optional checkbox to indicate if the message is the first in a thread. Default is false.
  • Bot is mentioned: Optional checkbox to indicate if the bot is mentioned in the message. Default is false.
See Workflow Logic & State > State Management for details on using dynamic variables in this block.

Outputs

The block outputs a dictionary of resolved inputs based on the Slack message and conditions. This structured output allows for seamless integration and utilization of Slack message data within the workflow.

Usage Context

Use this block to automate workflows in response to specific Slack messages or events. Configure the block to trigger under certain conditions, such as when a bot is mentioned or when a message is the first in a thread.

Best Practices

  • Ensure all required fields in the input items are correctly configured: Proper configuration ensures that the block triggers as expected.
  • Use conditions to precisely define when the workflow should be triggered: This helps in targeting specific events or messages that require automation.
  • Consider privacy and security implications when processing user messages: Ensure that the handling of user data complies with relevant privacy and security standards.