Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Excel Power Automate

(0) ShareShare
ReportReport
Posted on by 2

Hi

 

I have an PA flow triggered  from Excel - with the flow pointing to the excel file

 

For the future i would want to use this flow over multiple excel files but cant see a way of doing this without creating multiple copy flows and pointing each one to an individual excel file

 

Is there an easy shortcut

  • Kapil775 Profile Picture
    25 on at
    Re: Excel Power Automate

    Hi @Westport9 ,

     

    I used below steps to achieve the mentioned requirement.

     

    1. Create a cloud flow with trigger type as "When a http request is received". The request received should be of post type and it should have request body. The request body will have information regarding which excel has triggered the flow.

    2. Create office script for each excel similar to below. This script when triggered will make http request to the power automate flow there by triggering the flow. We can add a button in excel for triggering this script. In request body the name(or identifier) of the excel is passed. In below script, excel1 is the identifier for the excel.

     

    async function main(workbook: ExcelScript.Workbook) {
     const response = await fetch('<Power Automate triggering url>', {
            method: 'POST',
            body: JSON.stringify({ x: "excel1"}),
            headers: {
                'Content-type': 'application/json; charset=UTF-8',
            },
        });
    }

    3. In power automate flow, get the excel identifier from the request body. Now we know which excel has triggered the flow. With this information we can point to that excel. For example, in below snapshot, I am using Switch condition to read the excel which has triggered the flow.

     

    Kapil775_0-1687842053674.png

     

    Thanks!

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow