How do I set up a Zap to automate Slack messages based on reactions and thread replies?

  • 9 November 2023
  • 1 reply

Ultimately, whenever I see a customer sign-up, there will be an automated parent message in slack. My team will reply on that parent message (in a thread) with who the sales person should be. Another person will also reply on the thread (separate message) with what the account name will be. They will then add a special/dedicated reaction.

I want the zap to be triggered when it sees this reaction on the parent message. I want it to:

  • find the latest parent message with this reaction
  • find a thread reply that has the sales person which will contain the text “Sales lead:”
  • find a thread reply that has the account name which will contain the text “Account name:”


How do I create the search query to find the parent message and then find the right thread reply? I assumed I should query by the thread_ts but cannot find any documentation anywhere for how this actually works.

Thanks so much!!

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +11

Hi @cindyoh, welcome to the Community! 👋

It seems the Find Message action is limited to the same search modifiers that can be used within Slack so it won’t allow you to search in a specific thread. You can view the full list of possible search query modifiers here: Search in Slack 

What you may need to do instead is to use Slack’s API Request (Beta) action to retrieve a list for all replies in the thread using the conversations.replies API endpoint. Then you’d need to find a way to extract the reply that contains the text “Sales lead:”. as well as one that contains the text “Account name:”. I’ve not tested this myself but since the replies it find will likely be output as line items you might be able to extract the relevant reply text using a similar approach to what’s mentioned in this guide:

And if you’re using the New Reaction Added trigger for the Zap the details of the parent message will be returned from the trigger.

That workaround is a bit advanced as it involves setting up an API request but hope that helps to get you pointed in the right direction. Please do keep us in the loop on how you get on with this! 🙂