Loading
Help

Build reusable Sub-Zaps

Last updated:

With Sub-Zap by Zapier, you can create a set of actions to re-use in multiple Zaps.

Example

If you have multiple Zaps where you want to use an email address to:

  • look up a customer in Google Sheets
  • find a contact in Pipedrive

you can use a Sub-Zap by Zapier step to create those actions. Instead of adding those actions steps to each Zap, you can use a single Call a Sub-Zap action to perform those actions.


1. Create a Sub-Zap

Sub-Zaps are created the same way that Zaps are created.

  • Create a new Zap.
  • In the Zap editor, click to open the Trigger step.
  • In the Choose app & event section, search for and select Sub-Zap by Zapier.
  • Click the Trigger Event dropdown menu and select the Start a Sub-Zap trigger.
  • In the Set up trigger section, enter one or more inputs in the Input/Argument List field.
  • Click Continue.
Note
  • Inputs are the names of fields in your Zap that send the Sub-Zap data. Add any inputs that you’ll need to use in your Sub-Zap actions. If you want an input field to be required, add "required" anywhere in the name of the input.
  • If you want to use real data in your Sub-Zap, you must create and test a Call a Sub-Zap action before testing the Sub-Zap trigger. Otherwise, default sample data is provided.

2. Add a Call a Sub-Zap action to your Zap

  • In your Zap, click the Action step or click the plus + icon to add an action to your Zap.
  • Search for and select Sub-Zap by Zapier.
  • Click the Action Event dropdown menu and select the Call a Sub-Zap action.
  • In the Set up action section, select your sub-Zap from the Select Your Sub-Zap dropdown menu.
  • The input fields you created in your sub-Zap will appear. Set up the data that you want to send over to your Sub-Zap.
  • Click Continue.
  • In the Test action section, click Test & Review.

3. Test your Sub-Zap trigger

  • In your Sub-Zap, select the Test your trigger section.
  • Click Test & Review.

4. Add actions to your Sub-Zap

You can add as many actions to your Sub-Zap as you want. All Sub-Zap actions will run each time the Sub-Zap is called by a Zap.

The Sub-Zap must end with a Return From a Sub-Zap action. This action collects the data to send back to your Zap.

  • In your Sub-Zap, click the Action step or click the plus + icon to add an action to your Zap.
  • Search for and select Sub-Zap by Zapier.
  • Click the Action Event dropdown menu and select the Return From a Sub-Zap action.
  • In the Set up action section, set up your outputs in the Output/Return Values field:
    • In the field on the left, enter the output name.
    • In the field on the right, click the field and select a field from a preceding action with the data you want to send to your Zap.
    • Repeat this step for each output you want to send to your Zap.
  • Click Continue.
  • In the Test action section, click Test & Review.
Note

If you add a Return From a Sub-Zap action to your Zap, it will return this error: "Did you fork or replay this step? We expected callbackUrl to be stored!"
To prevent this error, only add a Return From a Sub-Zap action in your Sub-Zap.


5. Frequently asked questions

How many tasks does Sub-Zap by Zapier use?

Each time a Zap calls a Sub-Zap:

  • 2 tasks are used by the Sub-Zap by Zapier app.
  • Each action step within the Sub-Zap uses 1 task.

In the example above, 4 tasks are used by the Sub-Zap:

  • The Start a Sub-Zap trigger uses no tasks.
  • The Call a Sub-Zap action uses 1 task.
  • The Google Sheets action uses 1 task.
  • The Pipedrive action uses 1 task.
  • The Return From a Sub-Zap action uses 1 task.

Why is my Sub-Zap stuck in a Waiting status?

If you see a Sub-Zap with a Waiting status in your Zap run history, a Filter or Path action in the Sub-Zap prevented the Sub-Zap from continuing. Any Zaps associated with your Sub-Zap won't continue past the Return from a Sub-Zap action.

Learn more about Sub-Zap example workflows.


Need More Help?

Contact Support

Tell us about your problem, and we’ll find you a solution or you can email support.
Get Help

Hire an Expert

We have a directory of professionals across the globe who are ready to help.
Find a Zapier Expert

Zapier Community

Connect with other Zapier users and industry professionals to get help crafting the perfect workflow.
Check out the community

Zapier University

Video courses designed to help you become a better Zapier user, whether you’re a beginner or more experienced.
View courses