Microsoft Flow – Is timeout handling your worst nightmare?

In the past I wrote quite a few posts about error handling in Microsoft Flow.  In general, error handling means that you need to deal with something that has gone wrong. Timeouts however can be more complicated as your flow may sometimes work and sometimes fail. This can become your worst nightmare.

 

Handling the timeout can be done by setting the run after settings

This could then result in something like this:

In my above example I’m sending emails when a timeout has occurred or when a HTTP call has failed. Depending on what the call was doing you might need to redo or correct something. This is where timeout handling becomes potentially complicated.

Rather than trying to correct the Timeout it is better to avoid the timeouts all together. Within the HTTP request there is a Timeout setting. This timeout setting can be increased so that timeouts are less likely, however when you run HTTP requests that take a long time, you might want to fix the issues within the API that you’re calling.

Splitting a long running function into smaller tasks is a lot easier to handle than the timeouts within Flow. There are a number of ways that you can split your jobs.

Split data into smaller chunks

Imagine that you wanted to update 100000 records and this is taking too long. You could now consider splitting the data into smaller chunks and deal with 1000 records at a time.

Split large tasks into smaller tasks

Imagine if you created many list items in SharePoint then update SQL database records and then finally update SharePoint list items again. Rather than a single job it might be possible to do this in 3 steps.

Finally it is also possible to combine both of the above options.

Have you got any timeout issues in Microsoft Flow? Please leave a comment below. I’m interested in hearing about your issues.

Share
Pieter Veenstra

Business Applications Microsoft MVP working as the Head of Power Platform at Vantage 365. You can contact me using contact@sharepains.com

View Comments

    • Hi Sascha,

      It all depends the data and what you want to do with it. Feel free to hit the chat on the site and we can discuss this further.

  • Hi Pieter,

    Do you know a way to mark a timeout as success?
    I want to do an action if a user has not replied to an 'Email with Options', but the timeout marks the whole flow as failed. Even though it has the desired behaviour.

    • Hi Vincent,

      The best way is to use run after setting on the action after the failed action.

      You will find a good example in the post below:
      https://sharepains.com/2018/02/07/power-automate-try-catch-finally-flow/

      In the above post I put scope actions around a whole section of the flow. If you wanted to, you could also use the run after settings of just the next action and set it to include the failed/timeout option. Then the action will run even though the previous action has failed and the overall flow will then be marked successful.

  • Hey Pieter,
    I have used the runafter settings of the action after the one that fails (timeout). That action does indeed execute. But the fail seems to bubble up and the flow is marked failed once again.

    • That must mean that there isbanothrr failure.

      If you just want to ignore the failures can you implement the try catch finally pattern aroubd your existing flow? Then flows never fail.

  • I have now implemented a flow terminate which returns that the flow has succeeded. I dont think it is the best solution, but it works for now. If I come across a better way, I will update.

Recent Posts

Introducing 8 AI Functions for Dataverse in Power Apps

Recently Microsoft added AI Functions to Dataverse that can be used in Power Apps. In…

22 hours ago

Copy and paste Scope steps in the new Power Automate Designer

One of the outstanding issues with the new Power Automate Designer is Copy and Paste…

1 week ago

Receive the available storage within your SharePoint Online tenant

Within the SharePoint admin centre there is that little detailed overview, telling you the available…

4 weeks ago

Options for Documenting Your Power Apps: Comments, Code, and Controls

Within Power Apps there are various ways to document your app. In this post I'm…

1 month ago

2 ways to duplicate SharePoint Lists to support your Power Apps

Recently I've been asked quite a few times to duplicate SharePoint lists as part of…

1 month ago

Update a Hyperlink Column in SharePoint with Power Automate

Today, I was asked about how to create a lookup to a document or item…

1 month ago