web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Run Power Query Excel using Power Automate

(0) ShareShare
ReportReport
Posted on by
Hello everyone! Can anyone help me, I have been working on a project. I want to update/refresh the data of the power query table in excel using office scripts then trigger it via recurrence in power automate cloud. However, the datas are not being updated/ refreshed when using run script action. I'm kinda stuck in this situation. Thank you for your help in advance!
Categories:
I have the same question (0)
  • sannavajjala87 Profile Picture
    166 on at
    Run Power Query Excel using Power Automate
    Hi,
     
    You can refresh Power Query data in Excel using Power Automate and Office Scripts, but there are a few key points to make it work:
     
    • The Run Script action in Power Automate only executes the code in your Office Script.
    • If your script doesn’t explicitly call the refresh method for the query tables, the data won’t update.
    • Power Query refresh in Excel online requires the workbook to be open and the script to handle the refresh.
    Update Your Office Script
    • Make sure your script includes something like:
    • function main(workbook: ExcelScript.Workbook) {
        // Refresh all queries
        workbook.refreshAllDataConnections();
      }
     
    Set Up Power Automate Flow
    • Use Recurrence trigger (e.g., daily or hourly).
    • Add Run Script action:
      • Select your Excel file stored in OneDrive or SharePoint.
      • Choose the script you created above.
    • (Optional) Add Send Email or Teams notification to confirm refresh.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics