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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Run Power Query Excel ...
Power Apps
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
    224 Super User 2026 Season 1 on at
    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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 414

#2
Valantis Profile Picture

Valantis 408

#3
timl Profile Picture

timl 339 Super User 2026 Season 1

Last 30 days Overall leaderboard