Showing results for 
Search instead for 
Did you mean: 
Continued Contributor
Continued Contributor

Automated action after the dataset has refreshed

Is there a way after the dataset refreshes to export the report as pdf to a location on a network drive?


or at least to send a pdf in a email? Maybe the report in the body of the mail?

Super User
Super User

You can accomplish that in Power Automate by either polling the refresh history (check the presence of an End Date for the most recent entry) or by using a custom connector to initiate an enhanced refresh. That will give you a request ID which you can then use in API calls to ask for the status.




Continued Contributor
Continued Contributor

Thanks @lbendlin however I cannot find "Refresh Dataset in Group".


Guessing that is not the trigger?

When setting up a flow I am asked to choose flow's trigger.
This option is not there.


Where the trigger in my opinion would be to see if a dataset changed.

There is no trigger. Everything is done via polling.

Continued Contributor
Continued Contributor

Ok @lbendlin , but sorry then I do not understand.

My understanding of Power Automate is not very big.



Guessing your solution then works totally different then other power automate flows.


Even not sure if I would achieve what I was after with your solution.


I have a report published (also in dekstop) that is on auto refresh.

My goal was to whenever this report was refreshed (so the new data was in) it would get exported as a pdf to a local folder.


(Probably sounds lot simpler then it will be in practice 😉 )

Power Automate has a standard "trigger"  for "when a dataflow refresh completes".  It does not have anything equivalent for "when a dataset refresh completes".  You will need to write your own process - as I have shown earlier in the post.  Keep in mind that "completes"  doesn't mean much. You also have to check the result - did it fail or did it succeed?  There may not be a need to continue if it failed (or you may choose to re-request a refresh).


You touched on a much deeper, more philosophical question though. Nothing in Power Automate is genuinely triggered. Deep down everything is implemented through polling.

Continued Contributor
Continued Contributor

Ok....well then I think this will lead me nowhere because I even don't have this one:



We will have to look into other options to automatically export our report as a pdf and save it to a local folder.


Thanks @lbendlin for your time.

for that part you can use the standard action (but you lose the Enhanced Refresh API options)




This only requests the refresh, there is no feedback on when it ends and if it was successful.

Continued Contributor
Continued Contributor

Hmm yes this is the refresh of the dataset.


But the dataset will already automatically refresh.

That refresh would actually be the trigger (sorry for using that word again) for exporting the power bi report to a local folder.


Looking into the PBI option in power automate.

See that there are also some power bi triggers.

Not sure if any of them would work for us:



None of them apply to your issue (Note: replace "goal"  with "metric"  - apparently Microsoft doesn't know that Microsoft changed the terminology...)


There is an API call that you can use for - you guessed it - polling the refresh history of your dataset. But that requires you to write a custom connector.


Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors