Since Zapier is so easy to use, anyone from your company can start building Zaps to automate workflows. While this allows your company to move quickly, it can mean that the numbers of tasks being used increases rapidly, especially if less technical team members do not build their Zaps with scaling and optimization in mind. If this is happening in your company then you’ve come to the right place! This post will talk about the importance of streamlining your Zaps and then show you how to reduce Zapier high task use through better filter placement and by using Code by Zapier actions to replace multiple actions.
There are 2 main reasons why streamlining zaps is important and I will use an example of one of the very first zaps I built to show how not to build a zap and then I will show you how I revamped this zap.
Reducing Zapier High Task Use Walkthrough Video
The Efficient automation: How to get the most out of your Zaps post is a good starting point to help beginners identify zaps that are running too often or that feature redundant steps and offers ways to reduce the task usage of these zaps. Once you have picked the low hanging fruit outlined by that post, take a look at the video below and this supporting blog post to see how you can get creative to cut even more tasks from your zap!
The Importance of Streamlined Zaps
Save Time Building and Updating Zaps
Taking the “Original Zap” below as an example, it can be seen that paths A and C-F have the exact same steps i.e. Google sheet lookup followed by a Slack message send (see the YouTube video above starting at minute 3:10). However, when building a zap it is not possible to duplicate paths or steps so even though these 5 paths are the exact same, each had to be built from scratch. (thankfully, as announced at Zap Connect 2022 it is now possible to duplicate steps and paths).
When I first set up these 5 paths, I used a Python code step to map a person’s name to their Slack tag and each time a new member was added to the sales team I would have to update this code step in each of the 5 paths. This was becoming tedious so I created the Slack Tag Names sheet, which contains a continually updated list of sales team members and their Slack tags, and then replaced the Python code step with a Google sheets lookup. Thankfully this removed the need to edit the 5 paths each time a new sales member was added but there was still the initial pain of having to swap the code step for the Google sheet lookup 5 times.
Oh, and did I forget to mention, that I had 4 versions of this same zap, 1 for each of 4 Slack channels we wanted to tag sales members in?
Yes…..the pain I had to go through first building and then updating the one zap I described above had to then be done 3….more….. times…..uuuuggghhhhh!!!
When you consider the time spent in a scenario like this, the monetary value of this time can be much more considerable than overages fees for excessive task usage. This is compounded by the “opportunity cost” of what else you or other members of your marketing operations team could be better spending your time on.
In a scenario like the above where you have a sequence of actions that are used repeatedly, then it is best to create a sub-zap for this sequence of actions and then request this sub-zap from other Zaps that need to complete these sequence of actions. This way if a change needs to be made to the sequence you can make it in one place, the sub-zap, as opposed to having to make this change across all the Zaps where this sequence of actions is being used. For a walk-through of how to use the sub-zap by Zapier action see the Sub-Zap by Zapier Quick-Start Guide.
Reducing Zapier High Task Use
Every Zapier subscription plan has a default task threshold per month ranging from 100 to 100k tasks per month and if these thresholds are exceeded you pay overages per task. For example, if you are on the Team pricing plan ($137.50 pm billed annually) with a 75k threshold but you actually use 105k task per month, with an overage fee of $0.005/Task, then your 30k of overages will be more than your monthly subscription at $150!
So what are your options?
You could get an increase in your monthly task allocation but then you will be paying more indefinitely and without optimizing, your Zapier high task use will spiral as you scale and it will not be long before you have to upgrade your threshold again.
Alternatively, login into your Zapier account, go to “Task History” on the left hand side panel, and use the date range filter to only look at usage for the previous month. Now you can identify the main Zapier high task use culprits and start in sequential order moving from the top of the list streamlining your zaps.
Reducing Zapier High Task Use Example
Whenever a lead views/downloads a piece of content, a wehhook is used in Marketo to send a message to a Slack channel where the “Sales Tagging” zap identifies the lead or account owner and tags them in the thread to notify them of the activity.
N.B. If you want to learn how you can send messages from Marketo to Slack then check out the Marketo Slack Integration post.
Original Slack Sales Tagging Zap
This Zap triggers whenever a new message is posted to the content channel in Slack. Since we are only interested in tagging sales on messages from Marketo, a filter is used in Step 2 to only continue if “User Name” does not exist. This way the rest of the Zap won’t run if another member of your team messages in this channel or comments in a thread, thereby saving tasks and preventing errors/zap failures from occurring.
In the 4 subsequent steps, the lead owner, lead SDR (sales development representative), account owner, and account SDR are parsed out using Python regular expressions (regex) in “Formatter by Zapier” actions:
Account Owner:\s(\w.\w)\n
Account SDR:\s(\w)\s\w\n\n
Lead Owner:\s(\w.\w)\n
Lead SDR:\s(\w)\s\w\n
Account Owner Exists/Does Not Exist
If the account owner is specified in the Marketo notification then the zap heads down path A. The owner name is then looked up in the Slack Tag Names sheet, which contains a row for every member of the sales team and maps their name to their slack tag name, and then they are tagged in the original thread of the notification in Step 10. If the account owner was not specified, the zap heads down path B and straight into either path E or path F.
If the account SDR is specified then the zap heads down path C or E, else if the account SDR is not specified and the lead SDR is specified then the zap will head down path D or F. In all paths C-F, the owner/SDR tag name is retrieved and then they are tagged in the original notification thread using the exact same steps described in the paragraph above.
I know this is all very confusing to understand with text so I went through each of these paths starting at minute 3:10 in the YouTube video linked at the top of this page 🙂
Reducing Zapier High Task Use (Easy)
Step 1 and 2 in the streamlined zap are the exact same as the original. The optimization of this zap is achieved through the use of a Python code step to handle the conditional logic needed to replace the Zapier paths and to parse out sales team names from the Slack message (parse_owners.py).
A Google sheets lookup task is placed ahead of Step 4 so that the Python code will have access to the mapping of sales team names to Slack tags (Slack Tag Names sheet). Then a filter is used in Step 5 to ensure that the zap will only continue to send the Slack message in Step 6 if the message is populated.
Zapier High Task Use Reductions
- The 4 “Formatter by Zapier” parsing steps from the original zap are replaced by 4 lines of code that use Python regular expressions to parse out sales team names thereby saving 4 tasks every run.
- Using the for loop in the Python code (see parse_owners.py) to populate the Slack message with sales team member names means that paths A-F are no longer needed, which saves time on the initial building of the zap as well as on future updates.
- In total, a zap that could have used up to 12 tasks per run will now only use a maximum of 6 tasks, while achieving the exact same output.
Reducing Zapier High Task Use (Advanced)
The zap can be further streamlined to only 3 tasks by incorporating the filters from Steps 2 and 5 above into the Python code as if
statements and then using a http request to send a webhook and replace the Slack message step from Step 6 (parse_owners_send_slack.py).
Take a look at the “username” row in the input data and notice how there is the string “empty” hardcoded in beside the username extracted from step 1. The reason for this is because when referencing any input data in Python code, if this data is empty i.e. does not exist, then the Python code will throw an error and this step will fail. Hence, the usage of the string “empty” ensures that when the username from Step 1 does not exist then input['username']
will be populated with “empty” allowing the zap to continue.
One thing to note about using the webhook is that it is no longer possible to send the message in a thread. Although Slack has a developer kit for Python and this Stack Overflow post shows how to reply to a message in a thread, Zapier’s Python code steps do not allow you to import custom modules such as those offered by Slack (or useful HTML parsing tools like BeautifulSoup) so workarounds and compromises have to be made. Now instead of using the Slack app to send the message, using the webhook will send the tagging message directly in the channel underneath the original notification message from Marketo.
You might be wondering if the columns mapping first name to tag name could be hardcoded into the Python code step to remove the Google Sheets lookup step. However, since we have 4 notification zaps that all need this mapping, if it were hardcoded then every time the sales team adds/removes a member 4 code steps would need to be modified. Instead, using a central Google sheet that is then looked up in each of the 4 zaps means that sales team changes can be made in one place and propagated to all 4 zaps. In this case, the convenience of using the Google sheet lookup outweighed the need to cut one more task.
3 Ways to Reduce Zapier High Task Use Summary
- Filter Placement: Place filters as high up as possible in the zap to stop the zap as soon as possible to save on task usage and prevent zap failures
- Parsing Text: Use Python code steps and regular expressions to do parsing, especially when more than 1 parse needs to be done
- Conditional Logic: Avoid the use of paths and instead build conditional logic into your zap using Python (or JavaScript) code steps to reduce zap complexity and task usage
Now that you have learned how to reduce Zapier high task use and streamline your zaps, take a look at the posts below to master some of the fundamental building blocks in Zapier:
- Zapier For Each Loop Quick-Start Guide
- Sub-Zap by Zapier Quick-Start Guide
- Zapier Google Sheets Quick-Start Guide
As always if you are enjoying this content and want to learn more cool Zapier tips and tricks then subscribe using that big, shiny, pink subscribe button at the top of the page 🙂