Reputation: 17
I have a created a logic app that to grab a report that initially comes back as null and multiple retries are required until the reportAccessSecureLink is populated with a link. The next api call utilizes the populated link to download and push the report to an azure storage blob. My current workaround is delaying for 30 min because the report link is typically populated in that timeframe but this is not fail proof. How can I utilize a condition to retry until the reportAccessSecureLink is not null then proceed in a logic app?
Also this app has a manual http trigger that requires user authentication to create an auth code and pass various tokens. Any thoughts on how to schedule this as a daily run without having to authenticate? Scheduling at the end run and looping actions to pass in refresh tokens etc.
{
"value": [
{
"executionId": "xxxxxxx",
"reportId": "xxxxxxx",
"recurrenceInterval": -1,
"recurrenceCount": 1,
"callbackUrl": null,
"callbackMethod": null,
"format": "csv",
"executionStatus": "Pending",
"reportLocation": "null",
"reportAccessSecureLink": "null",
"reportExpiryTime": null,
"reportGeneratedTime": "2022-08-18T13:41:20Z"
}
Upvotes: 0
Views: 264
Reputation: 69
For scheduling, you have to remove the http trigger and add a schedule trigger https://learn.microsoft.com/en-us/azure/logic-apps/concepts-schedule-automated-recurring-tasks-workflows please refer this for more details
For retry logic, you can use a “until” action. Be aware of the setting inside a while action for timeout and max number of iterations. You can combine while action and a delay inside it to simulate this.
Upvotes: 1