cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BBIUser
Frequent Visitor

Trigger Power BI refresh only when I receive SUCCESSFUL ETL/DW Email?

Hello Experts,

 

Here is my scenario - 

-I have a number of Power BI Reports 'schedule refresh' configured in Power BI Service. In the current scenario, if any reports schedule refresh fails, I will get an outlook email with "Refresh Failed" of a specific report.

 

-In this case, I have set up a "Instant- from blank" --> named Power BI Email Trigger (as given in the screenshot below - Please ignore 'Delay until' step for now).

This works fine and on-demand dataset is refreshed in Power BI Service.

 

Now, what I actually want is - I want "Refresh a dataset" to wait until there is another new email arrives which is an email from ETL/DW SUCCESSFUL Build (If the Build is FAILED- it should wait for the SUCCESSFUL Build email) before a dataset is refreshed from Flow??? Is it possible to add this step in my Flow?

 

So my steps should be: (I am open to switch the steps to make this work)

Step 1: When a new email arrives (V3) [Email from Power BI FAILURE]

Step 2: Refresh a dataset 

Only when-

Step 3: When a new email arrives [Email from ETL/DW SUCCESSFUL]

Then Execute the dataset 

 

If the above step is not possible - Then at least, I should be able to schedule a refresh in the Flow (like we do it in Power BI Service)? 

or

Can I use any other actions such a Delay or Delay until? 

Note: I tried Delay and Delay until but I was not able to provide the From and Subject information like in email.

5.png

Appreciate your support!

6 REPLIES 6
ChristianAbata
Super User
Super User

hi @BBIUser  I think  I understhand what you need, I almost shure that you can add what you want By using Do Until action in your first flow.

Please could you share an screanshot?



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Sure @ChristianAbata .

All I have in the Step 1 is "When a new email arrives" (this is the email that I get from Power BI Service Refresh) = 'To', 'From' and 'subject filter'.

and

Step 2: Refresh a dataset.

 

6.png

yashag2255
Dual Super User II
Dual Super User II

Hi @BBIUser 

 

Although you can use two triggers in a flow, it is recommended not to as it might not work as expected. The second trigger can trigger of at any email and there could be issues because of that. 

 

What you can do is, use the power BI api to get refresh history and check if the last one was completed or not and based on that add the refresh data set action. API reference: https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getrefreshhistory

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thanks for your response @yashag2255 .

I don't think using two triggers is supported or is there anything wrong with this flow? So I could not progress with this flow further.

7.png

 

Since I am new to the 'Power' (Power Automate and Power BI) world, I am sorry if this sounds like a very basic question.

To use Power BI API, should I be using 'Powershell' to write and execute these codes?

 

-add the refresh data set action --> Can you please elaborate or give me an example on how to set up this? 

 

Thanks!

yashag2255
Dual Super User II
Dual Super User II

Hi @BBIUser 

 

Correct. You cannot use multiple triggers in a single flow. 

 

You do not have to use PowerShell for the api call. You can directly use the http action to send an http request and then use the parse json action parse the outputs of the http action and then check for status using a condition statement and then if it is complete do nothing, else add the action to refresh the dataset. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@yashag2255 This is getting tougher and tougher for me to work as I am not a developer but learning though.

 

I tried few things like applying http action but did not understand the further steps.

Do I have to register my Power BI application to call Power BI APIs and add that app to Azure. Something like described in this article?

https://medium.com/@Konstantinos_Ioannou/refresh-powerbi-dataset-with-microsoft-flow-73836c727c33

 

Are you suggesting the steps used in this article? Thanks!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,683)