Hey again, Zapier fans! In this article I'm going to explain what Sub-Zaps by Zapier is, how it works, and give some examples of workflows that you could build. Let's jump in!
What It Is
This app enables you to build reusable Zap components and systems by building and calling "Sub-Zaps".
Ok, but what does that mean?
When you build a Zap that has the Start a Sub-Zap trigger, it becomes its own workflow that you can "call" (connect to/send information to) from other Zaps.
Still confused? Here's a quick example:
Don't be afraid of the use of the words "access token". In a nutshell, I had a process that I needed to use each time I wanted to perform certain actions (retrieving an access token) in a Zap. I could either create this in each and every Zap, which is not quick or obvious to do, or build a Sub-Zap one time that has everything I need, then "call" that Sub-Zap when I need to retrieve an access token.
Start a Sub-Zap (Instant)
Triggers when an outside Zap calls this Sub-Zap. Always used inside of a Sub-Zap. A later step in the Sub-Zap should be the "Return from a Sub-Zap" action.
Call a Sub-Zap
Used outside of a Sub-Zap, this will activate a Sub-Zap, which should contain both the "Start a Sub-Zap" trigger and "Return from a Sub-Zap" action.
Return From a Sub-Zap
Used inside of a Sub-Zap, this is the final step of a Sub-Zap and should be after the "Start a Sub-Zap" trigger.
How It Works
A Sub-Zap in and of itself can't really do much, since you have to "kickstart" it from another Zap. You can think of it as a parent Zap (the one that calls the Sub-Zap) and a child Zap (the one that is triggered by Start a Sub-Zap).
Sub-Zap: Extract an email address, split first and last name, and use a Lookup Table to output a specific value.
Parent Zap #1: Triggered by Google Forms submission, calls the Sub-Zap, then adds the person to HubSpot.
Parent Zap #2: Triggered by Facebook Lead Ads form submission, calls the Sub-Zap, then adds the person to HubSpot.
Parent Zap #3: Triggered by Unbounce landing page submission, calls the Sub-Zap, then adds the person to HubSpot.
As you can see, adding the three steps that are in the Sub-Zap to each of the "parent" Zaps above would have been tedious.
BONUS: If you need to make a change to the steps in the Sub-Zap, you can do it one time instead of finding all of the Zaps in which you added those steps.
What You Can Build With It
It might be easiest to understand if we go through an example and include some screenshots to illustrate the process :)
Example: Extract Email, Split Full Name and Use Lookup Table
Let's use the example we introduced above, where we have input from a source (regardless of what that source is) and we want to do the following:
Extract an email address from a field that may also contain other text in it
Split a full name into first name and last name
Use a Lookup Table to look at a location field and output the appropriate ID that our CRM app will need
Let's start by looking at the Zap that will be doing most of the work (the Sub-Zap). The trigger will always be "Start a Sub-Zap". This is where we create the inputs that will be used inside the main Zap, to map fields that can then be processed by the Sub-Zap.
First, we'll use a Formatter step to extract the email address. In this case, let's say that we've had people adding more than just their email address in the form. We want to isolate the email address for later use in our CRM.
Next, we'll add another Formatter step to split the full name from our main Zap into separate fields (first and last). There are some edge cases where names contain a middle name, or two-part last name, but for demo purposes it's a first and last name that we're splitting.
Finally, we'll use a Lookup Table to turn the words "Product A" into the Product ID that our CRM uses. If we try to pass "Product A" into the CRM, we'll get an error message since that's not something that it will recognize.
The last piece is to send all of these values back to the main Zap. You can name the values anything you'd like, as long as it will make sense to you when you receive it in the main Zap. You can see that I've mapped all of the output from my various Formatter steps, and used descriptive labels for them (email, first name, last name, product ID).
The Main Zap
For demo purposes, I used a Code step to create the values I needed, but this would be your form step (for example). As you can see, when I specify which Sub-Zap to use, the fields that I'd set up are available for me to map values from my trigger step. Neat!
When I test the step, I receive the values that were processed by my Sub-Zap.
Example 2: Searching Multiple Apps to Retrieve Contact/Lead Data
Let's say that you've got 5 different places where you collect information about contacts/leads and when your Zap is triggered you want to search all of them in order to retrieve data for a final step in your Zap. It would be tedious and untenable to include all 5 of those steps in each Zap that you build. Instead:
Main Zap: The trigger step that contains an email address, the step that calls the Sub-Zap, and one last step where you send out an email with the information you've gathered from the various sources.
Sub-Zap: Receive the email address from the Main Zap, search apps 1, 2, 3, 4, and 5 for the data you need, send it back to the Main Zap (where it will be compiled into an email).
Example 3: Send Data to More Than 1 Sub-Zap
Now we're getting pretty advanced! What if instead of just looking for information about contacts/leads, you'd also like to retrieve a file from Google Drive, Dropbox, etc. You could put that step into Sub-Zap #1 but others at your company need to find files without all of those extra steps from your first Sub-Zap.
So it exists as a separate Sub-Zap that you can add to your Main Zap:
Hopefully this helped you see the potential and power of using Sub-Zaps in your workflows. If you still have questions, or anything is unclear, please don't hesitate to comment below or create a new topic in the Community.
Very helpful, thanks, I created my first subzap successfully with your help.
@Patrick.emin! What does it do?
That’s a great idea! I’m so glad that sub-Zaps are helpful for you
I have several Zaps which trigger when a submission is made to Gravity Forms. Each Zap adds a record into Pipedrive.
These existed before I became involved.
Current requirement is to add a step to those Zaps so that a new row in a Google Sheet is created.
My thinking is to put this into a Sub-Zap so that the addition to Google Sheets only has to be coded once.
But I would need the details from the Gravity Form submission (all of them).
I have read that there is a way of passing the ID of the required step ie Gravity Forms to the Sub-Zap and then having the Sub-Zap retrieve the actual fields.
Where can I find out more about how to make this work?