Skip to main content
Community site session details
Power Automate - Power Automate Desktop
Answered

Can you periodically download a report attached in an email?

Like (0) ShareShare
ReportReport
Posted on 6 Jul 2023 00:54:35 by 343

I am using a particularly useless reporting software, which when wanting to generate a CSV report, it does not allow you to download it directly, you need to wait 30mins+ for the software to send you an email with the CSV attached.

In order to automate this so that I can get this data to be read by PowerBI I am proposing the following 2 desktop flows:

 

1) Record a flow that will periodically (eg. once per week) access the reporting software and generate the required report.

 

2) Record a second flow that will run periodically (but lets say a day after the first), which will open the email with the report and save the CSV to a folder that PowerBI can read and do analytics on

 

I am not sure how to achieve (2) since how do I record which specific email the workflow should open each time? The email will have a similar subject and from address but it will not be the same email. Can the Desktop Recorder achieve something like this?

  • Verified answer
    MichaelAnnis Profile Picture
    5,721 Super User 2025 Season 1 on 06 Jul 2023 at 15:17:04
    Re: Can you periodically download a report attached in an email?

    If you don't have a paid license, you could run (attended) the first flow one morning and the second the next day.  Does anything in the email identify the exact email you need to pull?  Does the body or attachment file say anything that could be separated from the other e-mails?

     

    In the Retrieve Emails action, you can specify "subject contains" or "body contains".  If nothing here is different, you could potentially download all attachments for the past week, and then filter on those attachments through the "Get Files" command.  If you were to use this method, I would set up an auto-rule within Outlook to redirrect everything from this "from account" to it's own folder, so you are just downloading all the reports for a week and not every attachment in your inbox.  

     

    If the filename doesn't even have something unique to separate it from the other reports, then I would say it is better worth your time to just manually recognize the email in your inbox after the day 1 run and move that email (left unread) to it's own folder where you store all these.  When the bot runs, you can set it to "unread emails only" on that specific subfolder, and since it will be the only unread email in the subfolder, it will be the only one brought in.

     

    Good luck!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on 06 Jul 2023 at 03:39:01
    Re: Can you periodically download a report attached in an email?

    I would absolutely advise against using the recorder for anything other than learning the basics. It generates very poor quality flows that are completely unstable and usually useless.

     

    Also, is your reporting software a desktop-based app? Does it maybe have an API that you could invoke via a HTTP action in a cloud flow? That would make it much easier to accomplish.

     

    Finally, for flow #2, you do not need to make a schedule. Instead, make a cloud flow that is triggered by the new email being received with specific filters on subject and attachments. This will make it run immediately when you have received the email and will specifically target the email that you need. Retrieving the attachment and saving it in SharePoint/OneDrive or even the local file system is pretty simple to achieve in Power Automate cloud. Here's a template flow for saving it locally using the File system connector: https://powerautomate.microsoft.com/en-us/templates/details/289f7f75e2ff4a3183cfd08064bdece6/save-email-attachments-to-the-file-system/

     

    P.S. I assume you have a paid license of Power Automate, since you plan on building a scheduled desktop flow. Using any schedules or triggers in desktop flows requires a paid license, that would also include cloud flows, too. If you do not have a paid license, you will not be able to build a cloud flow with premium connectors, such as the one I suggested, but you would also not be able to build scheduled desktop flows either.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Loading complete