Before I jump into this one, I do want to clarify that this won’t limit the number of times your Zap is triggered. It will, however, allow you to control how many times your Zap can perform the actions in your chosen time period.
The most common use case is probably the daily limit, so that’s what I’ll focus on here. But the same principles apply if you’d like to limit the weekly or monthly actions, for example.
Why might someone want to limit how many times their Zap performs actions every day?
- the trigger is an RSS feed and they don’t want to perform an action *every* time a new post is added
- the trigger is new tweets and the account in question is super active, so they’d like to limit how many times they perform actions
I’m sure there are other use cases!
The Challenge
You really enjoy Zapier’s blog posts (of course you do!) and want to share the content on Twitter. But sometimes there can be 3 posts every day and you only want to share one item daily.
The Solution
This can be done in a single Zap but I think it’s a little tidier to use 2 Zaps. Also, it saves some tasks by using separate Zaps.
Zap 1 - RSS to Twitter
Trigger: RSS Feed
Action: Storage: Get Value
Filter: Only continue if value is 0
Action: Storage: Increment Value by 1
Action: Twitter
Explanation
The first Storage action retrieves the value from the key (you can call it whatever you want — like “daily limit”) and the Zap only continues if that value is 0. It will only be 0 if this is the first time that day that the Zap has triggered. The second Storage action then increments the value by 1. This means that every subsequent time the Zap triggers before it’s reset (using the second Zap) the filter will stop it.
Zap 2 - Reset Daily Count
Trigger: Schedule - Daily
Action: Storage: Set Value (to 0)
Explanation
This one is pretty straightforward. Every day (you could choose midnight as the time, for example) set the value at your “daily limit” key to 0. As mentioned above, this means that the first time Zap 1 triggers, it will pass the filter. And it won’t pass the filter again until Zap 2 has reset the value to 0.
The 1-Zap Solution (uses one extra task per day)
Trigger: RSS Feed
Action: Storage: Get Value
Filter: Only continue if value is 0
Action: Storage: Increment Value by 1
Action: Twitter
Action: Delay Until (11:59pm)
Action: Storage: Set Value (to 0)
Explanation
With this single Zap we replace the 2nd Zap above by delaying until 11:59pm then resetting the value to 0. The reason we delay until 11:59pm is that it will always be on that same day, and after the time the Zap has triggered (unless of course the Zap happens to trigger exactly at 11:59pm). If we choose midnight, that’s technically already past and as you can see below, the Zap will continue instead of delaying.
NOTE: You could also use “tomorrow at midnight” for the Date/Time Delayed Until instead of just “11:59pm”.
Hopefully this helps you out, and as always, if you have any questions or suggestions about this workflow we’d love to hear them!