Best answer

Filtering a Zap from previous runs?

  • 1 April 2022
  • 2 replies

I am triggering a Zap off of a Slack message from a Post in a Channel

This is automating a bot with a message based upon slacks in this channel

What is happening is the bot is responding to the initial channel message (in thread) and then any subsequent messages in thread it is also responding to - creating a lot of noise.

What I’d like to do is filter something like “has zap run with _____ ID (from Slack trigger)” and stop action.

How can I see if a trigger with an ID has triggered the zap previously, and filter that out?


Best answer by jesse 7 June 2022, 00: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.

2 replies

Userlevel 7
Badge +14

Hi @Crusher 

Good question.

You’d have to log those into a GSheet or Airtable Base to then check against before deciding how to Filter:

Userlevel 7
Badge +9

Hey @Crusher! To expand on Troy’s suggestions here, you will need to add 3 steps to this Zap, which involves adding 2 steps before your “Bot” action and another one after. Your Zap should look like this:

  • Step 1: (Trigger)
  • Step 2: Find Row/Record (search by Message ID)
  • Step 3: Filter: Only continue if Row/Record ID from previous step does not exist. This ensures your bot is only posting to a message for the first time.
  • Step 4: (Bot Action)
  • Step 5: Create Row/Record action to record the message ID into an Airtable base or Google Sheet (your preference). This records the message ID for the lookup that will happen in Step 2 next time your Zap runs. If Step 2 finds this ID, it will know not to continue on with the Zap and trigger the bot again. 

Hope that helps! We’re here if you have any other questions. 🙂