How to trigger Zaps from Slack thread messages

When creating Zaps using Slack, you may want to trigger Zaps when Slack threads receive new replies. This article will explain how to find the appropriate Slack IDs for threads and how to set up a Filter step to only continue the Zap for thread replies. 

Understanding Slack IDs

Slack messages contain the following ID fields:

  • ts: A unique timestamp for each message.
  • thread_ts : A timestamp that identifies the thread the message belongs to and is the parent message of the ts value.

All replies within a specific thread have the same thread_ts value, which is equal to the ts value of the initial message. 

actionEdit icon Example
  • Initial message:
    • ts:1678886400.123456
  • First reply:
    • ts:1678886460.678901
    • thread_ts:1678886400.123456
  • Second reply
    • ts:1678886520.234567
    • thread_ts:1678886400.123456

These output fields are only available in triggers related to Slack messages, such as New Message Posted to Channel. You'll use these fields to create a filter step in your Zap.

1. Set up the Slack trigger

When setting up the trigger for your Zap:

  • Select either of these Slack triggers:
    • New Message Posted to Channel
    • New Message Posted to Private Channel
    • New Public Message Posted Anywhere
  • Set up all required fields and any optional fields that you need for your workflow.
    • Required fields have an asterisk after the field name.
  • Slack thread messages do not appear as samples when testing your Slack trigger. This is expected behaviour.

2. Filter for thread replies only

To ensure your Zaps only continue when a threaded message is received:

  • Add a Filter step to your Zap right after the Slack trigger.
  • In your filter step:
    • In the first dropdown, select the Thread Ts field.
    • In the second dropdown, select (Text) Does not exactly match.
    • In the third dropdown, select Ts.

Zap editor UI showing the configuration of a filter to include only Slack thread replies

3. (Optional) Filter keyword or phrases

You can also use this filter to reply to thread messages that contain specific keywords or phrases, by adding more filter rules

Next steps

Once the filter is set, add any subsequent actions you want the Zap to run when a new reply is posted in a Slack thread.

Was this article helpful?
0 out of 0 found this helpful