Reputation: 570
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
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
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