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
Start sub-zap with a string input parameter
Format that string with a regex pattern and extract the matched group
Return the match
But how do I pass in a test string into Step 1?
Best answer by christina.d
Hi @dstack
Yes, testing Sub-Zaps is a bit tricky.
Steps
You have to test on the parent Zap action for Sub-Zap Call.
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! 🙂
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.
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!
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.
@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!
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! 🙂
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.