Joseph
Joseph

Reputation: 570

Power Automate - Wait till Power BI dataset refresh completes\fails

  1. I have created a Flow in Power automate, have used a Refresh a Power BI dataset component , there is no issue in terms of functionality as such and I am able to refresh the dataset successfully - so far so good (till the time the dataset gets refreshed successfully)
  2. I have added a send email component post the dataset refresh, Now, the thing is the 'Refresh a dataset' component doesn't wait till the time the dataset is completely refreshed, it just triggers the refresh with an output value as Succeeded and proceed towards sending an email while the dataset refresh is still in progress
  3. Now, when the dataset refresh fails due to some reason - the Power Automate flow has already completed and has lost the track of the refresh

How can I make it wait till the time the dataset refresh has completed successfully or has failed and then send an email accordingly?

I have tried below but the outcome is always Success

Solved: Get alert when refresh a dataset fail - Power Platform Community (microsoft.com)

Upvotes: 1

Views: 7579

Answers (2)

Paul S
Paul S

Reputation: 1

You can set (2) parallel actions after the "Refresh a Power BI Dataset". As an example, the 1st action is to send a refresh failure email notification while the 2nd action is to send a refresh success email notification. In each send email action, click on the "..." menu option. Click screenshot 1

Then pick the "Configure run after" option and pick if refresh outcome was successful or failure. Click screenshot 2 & 3

Upvotes: 0

Dani U
Dani U

Reputation: 434

The Refresh action sends an API call to the Power BI REST API. The Refresh Dataset endpoint does not respond with an outcome indication. It just responds with whether or not the refresh request was accepted.

There are two other endpoint options Get Refresh History and Get Refresh Execution Details which you would need to monitor for completion of your refresh. I'm not saying it's impossible to implement something with Power Automate to do this, but honestly, you will have a better outcome just writing it yourself.

Power BI's lack of admin and monitoring tooling is by far its biggest shortcoming--especially surrounding refresh management. The sooner you realize you will not get out of it what you want and just accept that you're going to have to roll your own, the sooner you'll get what you need.

Upvotes: 1

Related Questions