Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
4 hours ago

Add a step for Power BI Failure Email Notification

i want to add a step in below workflow for sending email notification when Power BI semantic model refresh failure happens, this workflow is already created by someone in Logic App of Azure Data Factory 

 

1 Reply

  • Prince0011's avatar
    Prince0011
    Icon for Memorable Member rankMemorable Member

    Hi,

    The “Refresh a dataset” action only triggers the refresh. It doesn’t wait for the result, so a failure inside the refresh won’t make that step fail.

    Here’s what I’d add after it:

    1. A Delay of a minute or two.
    2. An Until loop with an HTTP action that calls GET https://api.powerbi.com/v1.0/myorg/groups/{workspaceId}/datasets/{datasetId}/refreshes?$top=1. Loop until status is no longer “Unknown”, since that means it’s still running.
    3. A Condition: if status = “Failed”, add Send an email (V2) from the Office 365 Outlook connector.

    Also click the three dots on the refresh step, choose Configure run after, and tick “has failed”. Add an email step there for cases where the trigger call itself fails.

    If this helped, feel free to give it a kudos or mark it as solution, helps others find it too.