Last week, I came across an issue with actions failing in the Excel connector. Making try Excel Connector retry actions, was slightly harder than expected.

Failing Excel Connector

The actions, like for example the Get Tables action, sometimes fail without any form of retry. The file did definitely exist! In this post, the details on how to make the Excel connector retry failing actions.

In my case the flow would run the Get Tables action. Then later in the flow some actions would read data form tables. All actions would work 99% of the time work, but every now and then unexplained failures would happen.

Excel connector retry not kicking in
Excel connector retry not kicking in
How to make your Excel connector retry in Power Automate
How to make your Excel connector retry in Power Automate 1

As you can see the Excel action is returning a 404, Not Found error. How can we make the Excel action retry. I already found that running the same action straight away would give me a successful result.

I could of course develop a try catch that reports the problem, but in this case I just want to retry the failed action, as I know that there isn’t any good reason for this action to fail.

Moving the Excel Actions to a child flow

To find a solution, we need to move the Excel actions to a child flow. With a few small updates that is done quite quickly.

Child flow with Excel action
Child flow with Excel action

Just create a flow with a Manually trigger a flow, the Excel Action and a Respond to a Power App or flow action and we have our Child flow ready. You will also need too update the Run-only user settings on the child flow.

Adjust the Parent flow to support Excel connector retry

Now, we need to adjust the flow that contained our Excel action and replace the Excel action with a Run a Child Flow action and select the child flow that we just created.

Call a child flow to support the Excel connector retry
Call a child flow to support the Excel connector retry

Retries will now still happen but the Excel connector will work after the first retry.

Excel connector retry working
Excel connector retry working

So, if you find that your flow that uses the Excel connector fails every now and then, you simply need to create a child flow for your Excel actions.

Why does this Excel Connector retry method work?

The clue is there is in the Retry policy setting on the actions. 408, 429 and 5xx errors will give you a retry. The 404 that we found in our Excel action does not trigger a retry.

only 408, 429 and 5xx failures trigger a retry
only 408, 429 and 5xx failures trigger a retry

In our case when the Excel action in the child flow fails, we will trigger a bad request error as our Respond to a Power App or flow action will never run.

If you want some easy examples of accessing Excel Online using the Graph API then please check out the following post Replace Excel Online with the Microsoft Graph API.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.