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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using Power Automate t...
Power Automate
Answered

Using Power Automate to save a weekly emailed sales report attachment, run a Power Query, save resulting file to OneDrive

(0) ShareShare
ReportReport
Posted on by 9

How could I use Power Automate to receive weekly sales report (email attachments) and then perform data cleansing and save the resulting CSV file into a OneDrive folder?

Obviously there are multiple ingredient to a flow like this but does anyone know how I could start building this?

 

Thanks,

Matthew

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Matthew_Simpson 

     

    I don’t think you can use power query via a flow yet but you could investigate office scripts. Excel has a recording tool allowing you to record and write a typescript function and call it from power automate. The beauty of it is that excel data doesn’t need to be in a table and you can format it, sum it, create charts etc.

     

    I’ve a few videos on my YT you can look at https://www.youtube.com/playlist?list=PLzq6d1ITy6c2_qM_ocYDtEaENrqi92YmM or read official docs here https://docs.microsoft.com/en-us/office/dev/scripts/overview/excel

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • Matthew_Simpson Profile Picture
    9 on at

    Thanks Damo, yep this is the way to do it. I haven't perfected the solution yet, but I am closing in on it. If you would like extra brownie points, can you point me to a way to get information in a cell/cells from the weekly report and use as part of the filename when resaving the transformed report?

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Matthew_Simpson 

     

    You would use the expression return(). It will then include the data you have passed to it in the function and allow power automate to query it from the output of the script.

     

    Damien

  • Matthew_Simpson Profile Picture
    9 on at

    Damien, you're on fire. This is going to be fun. Thanks again.

     

    Matthew

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

Forum hierarchy changes are complete!

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

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard