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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can getting attachment...
Power Automate
Unanswered

Can getting attachments from email be optimized?

(2) ShareShare
ReportReport
Posted on by 32

I have a flow that is responsible for extracting specific attachments from multiple emails. The flow works, but I am curious if it can be optimized since I am relatively new to power automate. 

 

This is what the flow looks like:

I start with the get emails(V3) action and use the parameters to filter an inbox for specific emails to look for

dbgghost_0-1721134939006.png

Once the emails are identified, I need to loop through each email and each attachment in each email to see if the attachment is a valid attachment. A valid attachment is checking for csv, xls and xlsx attachments.

dbgghost_1-1721135087975.png

Now my issue like in the nested for loops. Sometimes it runs quickly and other times it lingers on the one action for a long time. I am using concurrency control as well. Is there a way to debug why it it taking so long in some instances? Or is there a more optimal/reliable way to achieve this type of functionality?

dbgghost_2-1721135212896.png

dbgghost_3-1721135235373.png

 

 

 

 

Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,228 Super User 2026 Season 1 on at

    Hi @dbgghost ,

     

    I think this flow framework will help you; please review.

     

    Here, I have a single condition that uses OR and looks for that dynamic content "attachment name" ends with one of the three types you want to filter.

     

    Then on the yes side, I have my create file action.

     

    It's important to note in the When an email arrives (V3) trigger, I also have the Only with Attachments set to Yes so the flow doesn't trigger on non-attachment emails.

     

    trice602_0-1721137307241.png

     

     

    trice602_1-1721137354431.png

     

     

  • dbgghost Profile Picture
    32 on at

    I did look into the 'When an email arrives' action and I couldn't figure out how to apply it to my case. I should've provided more context. With the valid attachments I find this is what I do:

    dbgghost_0-1721139692018.png

    I need to do this concurrently with all the emails for a single day (i think) because there will be X number of emails a day that need to be stored together. I cannot have them overlap with the next days emails

  • dbgghost Profile Picture
    32 on at

    ^^^ regarding the above message, these emails do not always come at the same time of day. They usually arrive between 7pm - 7am and then are processed around 830am. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 953

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 622

Last 30 days Overall leaderboard