Returning data over date range and then combining

Describe the issue/error/question

I’ve got an API call to make that unfortunately will only run for 1 date at a time and doesn’t have options for me to get the data over a period of time, so I’m trying to do that in n8n. The workflow below is me trying to get it done using the Date & Time node creatively, but I think I’m probably headed the wrong direction and would be better suited using the Code and Split in Batches nodes to get this done, I’m just not exactly sure how to get it done (not for lack of trying!). The input would be a start date and an end date and I’d need the API call to run for each date and return all of those outputs.

I’m pretty sure I can get the back half of this figured out where I put the data all together and send it back to the spreadsheet, but any advice for that end would be greatly appreciated as well.

Thanks in advance!

Please share the workflow

Hi @Desk, welcome to the community :tada:

Perhaps you might want to check out the example workflow from this thread? It defines a bunch of date ranges covering one month each using Luxon rather than days, but you can adjust this as needed.

It would then call a sub workflow for each date which does its thing and eventually returns a result to the parent.

Let me know if this is roughly what you had in mind and if you need any help with adjusting this :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.