Hello,
I've been pouring over the community to try to find a solution to what I'm looking for but can't find quite the right solution.
I'm building an app that makes a series of API calls where each call takes inputs from the parsed JSON responses of the previous call ultimately coming to a call that results in a long running operation on the server. This long running operation creates a resource that can be polled to get the operation's status at whatever interval until the operation is complete. In the JSON response it will give me either 'IN_PROGRESS', 'COMPLETED', or 'FAILED'.
What I'd like to do is create a section of the workflow that will repeat as long as the status returned from the call is 'IN_PROGRESS' and exit once the status is either 'COMPLETED' or 'FAILED' then I'll handle each those conditions as needed. Most of the solutions around this kind of thing rely on iterative macros but this process isn't iterative.
In pseudo code:
var status = makeApiCall();
while (status == 'IN_PROGRESS') {
status = makeApiCall();
}
This is the section I want to repeat and how I tried it. I get why it won't work but it illustrates what I'm looking to do. Select nabs certain fields from upstream, append just passes through, the formula prepares certain fields for the API input. The macro then makes the API call, then I'm selecting a specific value from the response, and testing the value. What I want to do is if True go back to the beginning and rerun the API call. Keep doing that until it's false which I'll then handle. Bonus if I can tell it to wait a certain number of seconds before trying again.

Apologies for being wordy since I didn't share the workflow.
Also, apologies for not sharing the workflow since I've hard coded API credentials into it while I'm testing.