Computer >> Computer tutorials >  >> Software >> Office

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

 

Excel is a powerful platform and has always been more than a spreadsheet tool. With the power of Power Automate and Power BI, you can now make Excel act like a workflow launcher, where clicking a button can refresh reports, send emails, update SharePoint lists, or even trigger approval workflows.

In this tutorial, we will show you how to trigger Power BI or Power Automate actions from Excel buttons.

Why Trigger Power BI or Power Automate from Excel?

  • Automate repetitive tasks directly from your spreadsheet.
  • Refresh Power BI dashboards on demand.
  • Send Excel data to Teams, Outlook, or SharePoint instantly.
  • Launch approval workflows without leaving Excel.
  • Turn Excel into a lightweight “app” with workflow buttons.

What You’ll Need (Prerequisites)

  • Microsoft 365 account with Excel for the web (for Office Scripts).
  • Access to Power Automate (included in Microsoft 365).
  • Power BI Service (free or Pro, depending on your dataset sharing needs).

Method 1: Use Excel Online Buttons with Office Scripts (Regular)

This method works on the standard version of Power Automate (no Premium required).

Step 1: Create an Office Script in Excel

  • Open your workbook in Excel for the web.
  • Go to the Automate tab >> select New Script.
  • Replace the existing script with the following script:
function main(workbook: ExcelScript.Workbook) {
    console.log("Excel button clicked! Triggering Power Automate...");
}
  • Save it as TriggerFlow.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Step 2: Add a Button in Excel

  • You can add a button from the Code Editor.
  • Click on More Options (…) >> select Add in Workbook.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Now, clicking this button will run your script.

Step 3: Connect the Script to Power Automate

  • Automate tasks from the Code Editor.
  • Click on More Options (…) >> select Automate a Task.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • It will navigate to the Power Automate website.
  • Click Continue.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • In Run Script >> select Parameters
    • Location: Select Excel Online (Business)
    • Document Library: Select Documents
    • File: Select your Excel file
    • Script: Select TriggerFlow

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Click on the Plus (+) icon to add an action.
  • Select Power BI.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • You will see several actions for Power BI.
  • Select Refresh a dataset.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • In Parameters
    • Workspace: Select My workspace
    • Dataset: Select your dataset

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • You can add other actions in the flow.
    • Outlook → Send an email
    • Teams → Post a message
    • SharePoint → Add a new list item

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Once you’re done, save the flow.
  • Click on Save.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Step 4: Test Power Automate Flow

  • Click on Test.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Select Manually to test the flow.
  • Click Test.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Click Run flow.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • The test will run, showing the duration and a success notification upon completion.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Go back to Excel for the web.
  • Click your TriggerFlow button.
  • The script runs → Power Automate is triggered → Action executes.
  • As we added a Power BI dataset refresh, our report updates instantly.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Use Cases:

  • Refresh Power BI dashboards with one click.
  • Send approval requests directly from an Excel sheet.
  • Post status updates to Teams when data changes.
  • Email filtered reports from Excel to your manager.
  • Log order data into SharePoint lists.

Method 2: Trigger Power Automate Flows from Excel Buttons (Premium)

Step 1: Create a Power Automate Flow

  • Go to Power Automate.
  • Select Create >> select Instant Cloud Flow.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Name the flow: Trigger from Excel Button.
  • Choose When an HTTP request is received as the trigger.
  • Click Create.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Click on the Plus (+) icon to add an action:
    • Select Power BI >> Select Refresh a dataset.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • In Parameters
    • Select Workspace
    • Select Dataset.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Add another action:
    • Send an email (V2)
  • In Parameters
    • Insert To
    • Type Subject
    • Type Body

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Now Save the flow.

Get the Flow’s URL (HTTP Trigger):

  • After saving the flow, the ‘When an HTTP request is received’ step will generate a unique URL.
  • Copy this URL to use in your VBA code.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Step 2: Create a Button in Excel

  • Open Excel.
  • Go to the Developer tab >> select Insert >> select Button (Form Control).
  • Draw the button on your sheet.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Right-click >> select Assign Macro.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Step 3: Add VBA Code to Call the Flow

  • Paste this VBA code (replace with your Flow URL):
Sub TriggerFlow()
    Dim objHTTP As Object
    Dim URL As String
    
    URL = "Insert URL from your Flow"
    
    Set objHTTP = CreateObject("MSXML2.XMLHTTP")
    objHTTP.Open "POST", URL, False
    objHTTP.Send
    
    MsgBox "Flow Triggered Successfully!"
End Sub

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

  • Click the ‘Trigger Power Automate’ button to call your Power Automate flow.
  • A success message will appear when the flow is triggered successfully.

Launch Power BI & Power Automate from Excel Buttons: A Step‑by‑Step Guide

Conclusion

By following the above methods, you can trigger Power BI or Power Automate actions from Excel buttons, whether you have regular or premium versions. With Excel for the web buttons, Office Scripts, and the standard version of Power Automate, you can already trigger Power BI refreshes, send emails, or start workflows directly from your spreadsheet. If your organization has Premium licenses, you can unlock even more advanced integrations (like VBA + HTTP triggers or custom APIs). But even with the standard version, Excel can act as a powerful workflow launcher for your daily tasks.

Start with small actions, build a button that refreshes your Power BI dataset. Once you see it work, you can extend the idea to approvals, email alerts, or team notifications.

Get FREE Advanced Excel Exercises with Solutions!