Best answer

Trigger on a message in a slack thread where original message is by a bot

  • 30 June 2021
  • 1 reply
  • 507 views

I have a bot sending messages to a slack channel.

My slack users will respond to that message in a thread.

whenever such a message gets posted to the thread, I want my zap to trigger.

 

Any ideas how to do it?

icon

Best answer by MarinaH 2 July 2021, 19:57

View original

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 4
Badge +9

Hey @harshiths!

Thanks for the question. The available triggers for Slack are here: https://zapier.com/apps/slack/integrations#triggers-and-actions and you would be able to configure the Zap to listen for the bot’s message in the trigger settings. Note this will trigger the Zap for both human and bot messages. 

 

4b9f3f4853a6e3ff19448ec78ea9d7d0.png
(view larger)

Then you would want to add a Filter to only continue the Zap for the replies to that message - you should be able to do this by using the Thread field exists or does not exist - exists if you only want replies to continue through the Zap OR does not exist if you only want the original message to continue to the action. More on threading in the Slack API docs here: https://api.slack.com/docs/message-threading

You could also add any other Filter conditions you want here. 

1c995cf6f9d590490b6f118bed421d2a.png
(view larger)

The tricky thing with both the suggestions is that you likely won’t be able to pull in a sample from the bot, due to how the live trigger works vs how samples are pulled from Slack when you setup your Zap. So you’ll need to configure the Zap with any sample message (may not be from the bot or have any replies) and then turn Zap on to test this out with a live message from the bot to the applicable Slack channel.

Hope that helps, let us know how it goes for you!