Best answer

Update Sub-Zap test data when parent Zap test data is changed

  • 17 December 2021
  • 9 replies
  • 346 views

Userlevel 1

I want to create a sub-zap that’ll accept a string, strip out part of it and then return what’s left. I understand the overall structure, but I’m struggling to figure out how to pass in test data into this Sub-Zap.

My current flow

  1. Start sub-zap with a string input parameter
  2. Format that string with a regex pattern and extract the matched group
  3. Return the match

But how do I pass in a test string into Step 1?

icon

Best answer by christina.d 22 February 2022, 21:54

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.

9 replies

Userlevel 1

And really, the broader question is “how do I test any sub-zap?” from the sub-zap itself? I’d really like to avoid having to test this from the parent, which takes a lot longer. Thanks!

Userlevel 3
Badge +4

Hi @dstack! This article explains very well how to use Sub-Zaps: 

 

And yes, you will have to use the parent Zap for testing specific values

Userlevel 1

Ok, thanks for clarifying. I think I’ll take the approach of creating a “Test: <name here>” main zap and trigger via JS and hard coded values.

Would be super helpful if I could just pass in test data into the sub zap.

Userlevel 7
Badge +14

Hi @dstack 

Yes, testing Sub-Zaps is a bit tricky.

 

Steps

  1. You have to test on the parent Zap action for Sub-Zap Call.
  2. Change the Sub-Zap Start trigger test data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger
  3. Test each step of the Sub-Zap.
  4. Test the Sub-Zap return action.
  5. Lastly, test the parent action again.
Userlevel 1

I think it would be great if we could be in test mode for a parent zap and have the Sub-Zap be in non-test mode so that data passed from the parent would get the non-test result from the Sub-Zap without a separate test of the Sub-Zap.  This would let us test a range of boundary conditions on the Sub-Zap quickly, e.g. how does it handle empty fields, fields with incorrect values et cetera.  Having to go through a full test of a real or test parent for each possible data input each time greatly increases the test cycle.

Userlevel 7
Badge +14

Hi @BillW 

Feedback and feature request can be submitted via a ticket to Zapier Support to be logged: https://zapier.com/app/get-help

Userlevel 1

@Troy Tessalone Will do!  Sub-Zaps are saving us a great deal of setup and maintenance time - we have over a hundred Zaps that are identical except for the account used for the trigger event and the account used for the event updating with data from the trigger at the end.  Any change to the intermediate steps required updating all of the hundred-plus Zaps.  Now we just modify the Sub-Zap and all are fixed instantly!

Userlevel 7
Badge +9

Hi @dstack 

Yes, testing Sub-Zaps is a bit tricky.

 

Steps

  1. You have to test on the parent Zap action for Sub-Zap Call.
  2. Change the Sub-Zap Start trigger test data: https://zapier.com/help/create/basics/change-the-test-data-in-your-zap-trigger
  3. Test each step of the Sub-Zap.
  4. Test the Sub-Zap return action.
  5. Lastly, test the parent action again.

 

Hiya, @BillW!

I can see you were able to open a feature request for this with our support team, which is perfect. The team will be sure to keep you in the loop if and when this does get implemented. Thanks for taking the time to share your feedback with us! 🙂

Userlevel 1

Thanks, Christina!  Glad to see your Dev team is open to suggestions.  Hoping it or a similar solution gets implemented soon.  Sub-Zaps are a great feature for us integrators that have many customers using similar/identical Zaps that only vary by the app instances to which they need to be connected.  And, you can never skip testing things like this, so anything that speeds/eases the process is greatly appreciated.:thumbsup_tone2: