Hey there!
Making a automated daily infographic for my company. Every once in a while the scheduled refresh will fail (usually a error with getting the data report from our companies database). I dont want my daily report to send if the database did not refresh properly. Currently i have Power BI report subscribed to send to my own email, then i use power automate to download the .png attachment and use html code to put it in the body of a sent email in a nice and clean finished report.
I was playing around with conditions for it to see if i got a "refresh failed" email that day but i couldnt figure it out. Is there a way you may know about to conditionally run the power automate, or subscribed report daily?
Yes, you can add a condition to your Power Automate flow to check if the data refresh was successful before sending the email with the Power BI report.
Here's an example of how you can do this:
Here's a sample JSON schema for the response from the Power BI API that you can use in the "Parse JSON" action:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"startTime": { "type": "string" },
"endTime": { "type": "string" },
"status": { "type": "string" }
},
"required": ["id", "startTime", "endTime", "status"]
}
}
You can use the "status" property to check if the last refresh was successful.
ooooh this seems promising! Never ran aything like this so it may take a bit, but ill follow up when i figure it out 🙂