I’ve got a Code step in my Zapier workflow that creates an array of managers and members. It works great but I’m having trouble using the output in a Custom Webhook Request.
I want to insert this into a larger JSON structure for my webhook but Zapier is splitting it into separate variables. How can I keep it as one block and use it in my JSON? Any tips would be much appreciated!
I ran into a similar issue with Zapier’s JSON handling recently. What worked for me was using JSON.stringify() in the Code step to convert the entire managers array into a single string. Then in your webhook step, you can use that string directly without Zapier trying to parse it.
In the webhook, you can then use {{managersString}} to insert the full JSON string. This keeps it as one block that you can nest in your larger JSON structure.
Hope this helps! Let me know if you need any clarification on implementing this approach.
I encountered a similar challenge with Zapier’s JSON handling. A workaround I found effective is to use the ‘Formatter by Zapier’ step after your Code step. In the Formatter, choose ‘Text’ as the transform type, then select ‘JavaScript Object’ as the input. This will convert your managers array into a string representation.
For the webhook, you can then use the output from the Formatter step directly in your JSON payload. It’ll be inserted as a string, preserving the structure of your managers array.
This method avoids modifying your existing Code step and provides a clean way to include complex data structures in your webhook requests. It’s been reliable in my Zapier workflows dealing with nested JSON data.
hey, i’ve dealt with this before. try using the ‘utilities’ step in zapier. it has a ‘store value’ option where u can dump your whole managers array. then in the webhook, use the stored value directly. it keeps everything intact without messin with your existing code. works like a charm for me!