Hi,
I am working on a flow where I am constructing a POST API call by initially requesting for a Bearer token and then passing that into another API call along with date to get data. Unfortunately the API is timing out if I pass the start date's for the entire year. I might have to reduce the timeframe to monthly or quarterly intervals and make multiple api calls to get all the data for the year. I am new to iterative macros and need help configuring the macro if that is the approach to be taken. Below is the screen show where the start and end dates are hard coded into the body. How can is set a macro to cycle through the dates?
Below is the screenshot where I am constructing the body and passing into the API payload.
How do I loop through the start and end dates in monthly intervals for the year 2022?
Workflow here
Just spotted you wanted to iterate over the months. That's cool. We can use a batch macro to perform that iteration. You'll likely need to put the download tool within the macro to pass the requests through per iteration (for each month).
@BS_THE_ANALYST Thank you for the solution. I am not following it how the generated numbers would iterate around. Would it iterate around the month numbers?
. Here is what I am looking for
on the first API call would have the following start and end dates, that could be passed into the body.
StartDate: 02/14/2023
EndDate: 03/14/2023
The flow should iterate to make the second API call with the below date
StartDate: 03/15/2023
EndDate:04/14/2023
and so on..
Eventually we would need to combine all the date data from these API's into one data sent.
@BS_THE_ANALYST - Here is something that I started working on using the batch macro example. Would something like this work?