I have a front-end workflow that schedules a backend workflow on a list.
Each item in the list is creating an invoice item with a custom call to the Stripe API. The next step in the front-end workflow runs a different API call to finalise this invoice. The problem is that I’m finalising the invoice before all or any of the invoice items are added. They don’t make it into the invoice before it’s finalised.
Ohhhhh. never mind! While writing this I had an idea for how to solve this and it works. I still think this isn’t well addressed in these forums so I’ll add this question anyway and mark it as a solution in a couple days.
I sent two new parameters to my backend workflow
1 the ID of the current list item
2 the last list item as parameters.
I moved the second api call, which I needed to be synchronous, into the backend workflow and gave it a conditional, “only run when - this item’s ID is the last item’s ID”
I hope this saves someone the hour it just cost me.