Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Run Script on saved file from previous action

(0) ShareShare
ReportReport
Posted on by 31

A weekly sales report gets emailed to me that I auto format the title and save it to a folder in my onedrive.

I created an excel online macro that deletes columns that are not needed, changes some header text and then selects all to create a table and sort a column. 

The script works if i open a raw file and run it. How do i add it to my original flow?

Tried adding the run script card after the apply to each that renames and saves the file, didn't work. need guidance. 

  • Yutao Huang Profile Picture
    Microsoft Employee on at
    Re: Run Script on saved file from previous action

    Sounds good. Glad to hear you solved the problem! Feel free to reach out to us if you need any further help on Office Scripts!

  • davidcab Profile Picture
    31 on at
    Re: Run Script on saved file from previous action

    Oh sorry I solved this on my own. I had to change the input for the run a script action from the email attachment to the “item”. Works well. Now I need to figure out how to move the data to a report 

  • Yutao Huang Profile Picture
    Microsoft Employee on at
    Re: Run Script on saved file from previous action

    Can you share a bit more about your flow? What actions do you have in it? What errors did you get?

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,596 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,928 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow