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. It provides a flexible way to handle events such as message postings, mentions, and thread interactions, and can be configured with various input types to tailor the trigger conditions.

Configuration (Required)

run_conditions
object

Trigger Conditions. This parameter allows you to define the conditions under which the workflow should be triggered. The default value is an empty object .

items
list

A list of input items that define the conditions and parameters for triggering the workflow. This configuration allows for dynamic and flexible gathering of conditions, which can be used throughout the workflow. The default list includes:

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

Outputs

The block outputs a dictionary of input values resolved from the Slack message context. This structured output allows for seamless integration and utilization of Slack message data within the workflow.

Usage Context

Use this block to trigger workflows based on specific Slack message events, such as when a message is posted in a channel or when the bot is mentioned. It is useful for automating responses or actions in response to Slack interactions.

Best Practices

  • Ensure that the input conditions accurately reflect the Slack events you want to trigger on. This helps in precisely targeting the desired events.
  • Use the ‘user_message’ input to capture and process message content. This allows for detailed analysis and response to message content.
  • Configure optional inputs like ‘channel_id’ or ‘user_id’ to narrow down the conditions for triggering the workflow. This helps in focusing the workflow on specific contexts or users.
Built with