Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
chriswragge
Helper I
Helper I

Refresh local query using MS Flow

Hi there, 

 

I am looking to automatically refresh a local query based on a tigger in MS Flow, but am having difficulty.

 

Here's my current workflow

  1. Data is emailed to me weekly as an attachment
  2. As soon as the Email hits my inbox, a MS Flow rule saves this attachment to OneDrive (good so far)
  3. I then open PowerBI and manually refresh my query using that newly modified file in OneDrive (which is synced to my desktop) as a data source, plus one other file needed in the transformation
    • The query pings an API and returns a list of JSON values that I perform further transformation on
    • A bit of R script at the end of my query exports the transformed data as a new file out to OneDrive
  4. Microsoft Flow detects the exported file from PowerBI in OneDrive, and the FTPs the fully transformed dataset to a server

In essence, what I am trying to remove my manual intervention from Step 3. 

 

My Issues

  1. How do I get Step 3 triggered via Flow?
  2. I require a file to be exported out of PowerBI when my query ends ready for FTP-ing.

 

Where I've got to so far

 

Can anyone lend a hand?

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

I think that one issue with your approach is going to be that there are not a lot of options for automating Power BI Desktop via code just yet versus what people have done in the past with things like Excel, Word, etc. You can check out this here: https://community.powerbi.com/t5/Desktop/Automation-for-Power-BI-Desktop/m-p/334108#M149441 I do not see much here other than streaming data sets as far as a destination: https://flow.microsoft.com/en-us/search/?q=power+bi


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler. I may explore the local code side of things a little further, but good to know I am not missing something obvious. Cheers!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.