Best answer

Only trigger when 5 minutes have passed since last Slack message

  • 2 June 2021
  • 7 replies
  • 139 views

Hi all, 

I’m looking to forward messages between Slack channels. I don’t want every message to be forwarded, ideally I’d like to verify first if 5 minutes have passed since last forwarded message. 
Any idea how can I achieve such functionality?

Thanks!

icon

Best answer by Troy Tessalone 2 June 2021, 18:22

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.

7 replies

Userlevel 3
Badge +6

Hey @Matan, I hope you’re doing well, I just wanted to check in here!

Were you able to get things working with the information from Troy, or can we still help out here?

Webhooks and Zapier Manager would be the way to go for triggering zaps from other zaps and turning zaps off and on. Just note that a zap can’t trigger if it is turned off, so any zap management functionality would need to be done through a live zap.

Userlevel 7
Badge +14

Hi @Matan 

Try using Storage by Zapier: https://zapier.com/apps/storage/help

STEPS

  1. Trigger: Slack - New Message Posted
  2. Action: Storage Get Value
  3. Action: Code (used to evaluate the time between timestamps in minutes)
  4. Action: Filter
  5. Action: Slack - Send Channel Message
  6. Action: Storage Set Value

NOTE: This will be a Task intensive Zap just to reach the Filter step, so be mindful.

 

Userlevel 7
Badge +14

@Matan

Another way of accomplishing this could be this...

Zapier Manager: https://zapier.com/apps/zapier-manager/integrations#triggers-and-actions

STEPS

  1. Trigger: Slack - New Message Posted
  2. Action: Zapier Manager - Turn Zap OFF
  3. Action: Slack - Send Channel Message
  4. Action: Delay (5 minutes)
  5. Action: Zapier Manager - Turn Zap ON

@Troy This is a great a idea, but it looks like a Zap can’t turn off itself. I guess it means I need to separate the identifying Zap from the forwarder Zap. My question is is there a way to trigger one Zap from another?

Userlevel 7
Badge +14

@Matan

Good point, yeah you’ll likely need 2 Zaps that work together.

You can trigger Zaps from each other using Webhooks: https://zapier.com/apps/webhook/integrations#triggers-and-actions

 

@Troy Tessalone yep I saw that, but giving that Zap can’t turn off itself, I need to turn one Zap off from another. So going back to the suggested steps - step #1 should essentially trigger the second Zap that should turn on and off the first Zap. Is that possible?

Userlevel 7
Badge +14

@Matan

ZAP 1 STEPS

  1. Trigger: Slack - New Message Posted
  2. Action: Slack - Send Channel Message
  3. Action: Webhook (to trigger Zap 2)

 

ZAP 2 STEPS

  1. Trigger: Webhook (sent from Zap 1)
  2. Action: Zapier Manager - Turn Zap OFF
  3. Action: Delay (5 minutes)
  4. Action: Zapier Manager - Turn Zap ON