Hello,
First-time poster and generally new to Zapier so thanks in advance for helping me get familiar with what is helpful to post here for guidance. If there gaps or additional details that would be helpful, I would appreciate your coaching and patience.
Scenario
- System A responds to API requests in JSON without a root node object identifier
- System B is capable of importing data received in a JSON format but requires a root node
- System A is not capable of placing a root note identifier at the top of the JSON
- Trying to use Zapier to get data from System A to System B
- The JSON responses from System A include nested nodes
Attempts
So far, I have tried something as simple as a single Zap with a Get trigger and a Post action, and something as complex as replicating what’s in these posts (1 and 2).
Current Result
While the single Zap approach seems to return data I can use with System B, it seems like what’s happening is that the Get request from Zapier into System A is returning each result from calling its API as its own individual JSON response (i.e. one record at a time). As a result, what I get in System B looks like four independent Puts, especially as there are four individual JSON files on System B’s side that it attempts to consume. I can’t determine if this is by design of System A but I suspect so.
Desired Result
What I’d like instead is for Zapier to ‘bundle up’ all the JSON responses it receives from the Get of System A before then performing a single Put of those assembled JSONs into System B -- and ideally with clean root node identifier that System B can then use to parse the JSON.
I thought that the above linked posts would lead to that (a few places I read said that the Code action would run multiple times within a single Zap before ending but perhaps I do not understand that well since I am new). The ‘longer’ sequence of two daisy-chained Zaps works but is still four individual JSON Puts / files into System B, instead of a single payload.
Perhaps there is an entirely different route to go about this. My thinking is that System A does not put a root node at the start of the JSON in the first place because its API is only intended to send one response at a time rather than a single response with multiple records in it. However, moving the data between Systems A and B cannot be single-record JSON transmissions as there will be hundreds on a daily basis. The lack of a root node identifier may be a red herring / non-issue at this point, as it seems that since the API responds in this way, my focus instead needs to be on how to take those multiple System A responses and make sure they get combined to a single JSON Put for System B.
I hope this explanation makes sense and that someone will be willing (and patient enough) to talk through some options.
Thanks for reading this far,
JM