I am retrieving data from a Xano table via an API endpoint and the output is formatted as JSON. I have confirmed that the endpoint is fine as when I run it, I get all of the records but when I inject into a Google sheet (for example) I only get the first record and if I run it again it injects the first record again.
How would I be able to get the scenario to inject all of the existing data since the last update?
Hi Steve, how are you sending the data to Google Sheets? What module/endpoint are you using?
I have the Xano module feeding into the Google sheet module.
Are you using the “Add a row” module? If you are then that is the reason.
You will likely have to iterate the output first, then for each output add a row. Or to save operations you can use the Google Sheets endpoint for batchUpdate.
So, how would I use make to iterate through the output? And once that is done the first time, how would I only iterate through the new rows in the JSON file?
In the scenario where you are mapping data from an array, it will only return the first item from the array. In such a case, it’s advisable to employ an iterator module before interfacing with Google Sheets to iterate through and access the all values.
If this is not the case, please provide a loom explanation of workflow or the corresponding output screenshot explanation, so we can analyze further.
If you require additional assistance, please don’t hesitate to reach out to us.
Visit us here
I implemented the iterator but am not getting any meaningful output.
Here is the output from the Xano module -
This is the flow control for the Iterator -
and this is the output from the Iterator -
In your iterator module use this function: map(body;Fuel_Type)
It would look like this (except you need to replace the 2.body, with your body from the output of your Xano module
Ok, I made that change and the iteration is working however the output is blank. On checking, even though I have an output from the Xano module, the input to the Iterator which is directly connected is empty.
In your Xano module, download the output
And make sure when you map(body;Fuel_Type), you copy and paste the “raw” value from the output, if this doesn’t work could you send me a screenshot of the output from the Xano module.
Screenshot of the output from Xano -
and of input to iterator -
and the scenario -
Not too sure what you mean by the “raw” value.
Steve try to import this blueprint:
FuelType.json (5.1 KB)
From the output of the Xano Module this should work