Sunday, November 9, 2025

Intro

When working with Azure Blob Storage and other cloud services, it’s common to run into timing issues, a file may be created by a service, but it’s not instantly available for retrieval. In my case, Azure Speech-to-Text generates a JSON transcription file in Blob Storage, but the file isn’t ready immediately after the transcription request completes. If you call Get blob content (V2) too early, the action fails and your entire flow stops. In this guide, we’ll explore how to use Power Automate Do Until to handle timing issues when working with Azure Blob Storage and other cloud services

To solve this, I implemented a retry loop using Power Automate’s Do Until control and a Boolean variable. This ensures the flow patiently waits until the file exists, but without introducing long, static delays.

Setup

Flow logic

Power Automate Do Until flow example

How It Works

  1. Initialize a Boolean Variable
    At the start, I create a variable varJSONReady set to false. This will be the flag that controls our loop.

  2. Do Until Control
    The loop runs until varJSONReady equals true. Inside the loop, we try to get the blob content.

  3. Attempt to Get the Blob

    • If the file exists, Get blob content (V2) succeeds.

    • When successful, we immediately set varJSONReady to true so the loop ends.

    • If it fails (file not yet created), the flow moves to the delay step.

  4. Delay

    I use a very short delay (1 second in this example) before retrying. This keeps the process fast and responsive without hammering the service too aggressively.
    To make this work correctly, the Delay action is configured to run only if Get blob content (V2):

    • has failed
    • is skipped
    • has timed out

      This is done by opening the menu on the Delay action, selecting Configure run after, unchecking is successful, and enabling only those three states. This ensures the delay only runs when the blob isn’t ready, skipping any wait time if the file is already available.

FAQs & Use Cases

Why This Is Better Than Static Delays

Instead of adding a fixed 30-second pause, this loop checks as often as needed and proceeds immediately once the file is ready. This makes the flow faster in most cases while still being reliable.

 

Reusability Beyond Blob Storage

This retry‑until‑success pattern comes in clutch whenever an action bombs out because the target resource isn’t provisioned or committed yet. In Power Automate terms, think of those times when a connector call returns a 404, 409, or “not found” simply because the backend hasn’t finished writing the file, record, or response. Instead of hard‑coding a Delay() and hoping for the best, the loop keeps polling the endpoint or storage location until it’s actually ready, then continues down the flow without throwing a fail and killing the run.
Examples:

  • Waiting for a SharePoint document to finish generating after a file conversion process before moving or processing it.
  • Polling an API endpoint until it returns a “completed” status instead of “in progress” when running long operations like report generation or data export.
  • Checking if a record exists in Dataverse before attempting to update it, avoiding “record not found” errors.
  • Verifying that an email attachment has been saved in a monitored folder before starting a parsing step.
  • Waiting for a large file to finish uploading to Azure Blob Storage before triggering a downstream process.
  • Ensuring a new user account has propagated in Azure AD before assigning licenses or groups.
    •  

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.