Make several requests to the API and insert the values in a sheet.
What is the problem & what have you tried?
The modules are a tool, a http client and a sheet. The offset on the Http client has been set eg 0, 100, 200,…,10,000. The scenario is set to run every 2 minutes with the aim of pulling new records. However, the same records are being added to the sheet. It’s the first 100 batch repeated. How do I fix this please? The tool module has no parameter (all errors are skipped on it). The http client has all the parameters.
How do I fix this?
Error messages or input/output bundles
No error message. The same records are inserted into the sheet which defeats the purpose and wastes credits.
Every time the scenario runs, the values set with Set Multiple Variables are reset. They are not retained between executions.
To query multiple pages, you can either:
Find out how many pages are there, in total, then iterate that many times, updating the page number on each iteration. This would be a single execution and would save you a lot of credits. You can iterate, make the http request, aggregate and the insert all the aggregated results in bulk.
If you want to fetch a different page on every execution, you need a way to save the state between scenario runs. Take a look at this post to achieve that:
Thank you for your answer but I still don’t know how to do this? Maybe a diagram or something would help. I tried this article but it repeats records too Need help with sending req to API mutliple times
To further help with credits usage, you can use the Google Sheets - Bulk Add Rows (Advanced) which can add hundreds of rows in a single call/credit. There’s theoretically no limit other than the limit of cells you can have in a sheet, but a few hundred updates at a time is reasonable.
Do you intend to get all records from the API once then dump the results into Google Sheets and it never has to run again?
Or is this something you will want to run periodically to get new records from the API and add only the new records to Google Sheets?
Thanks @Donald_Mitchell thank you for the Bulk Add I’ll try that. I would have liked to run it once and get all the records but there is an API limit of 100. So I have to keep making requests.
The Make an API call module now supports most forms of pagination, and in my experience with it, it only uses 1 credit to retrieve up to 3200 items. What you’re able to do exactly depends on the API you’re working with.
Thank you for the update information and for auditing my last 5 answers. Looks like you took something personally.
Sorry, I’m not doing this. I hate toxic environments.