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 / Saving an email attach...
Power Automate
Suggested Answer

Saving an email attachment to a folder and marking the email as read

(0) ShareShare
ReportReport
Posted on by 2
I'm very very new to power automate, but I have successfully made one flow. 
The problem I'm trying to solve is that I am emailed invoices (as PDFs)one at a time by our AP and I'm always behind so I don't get time to individually print them so I end up once a week  printing 70 or so invoices one at a time. 
 
I am trying to make a flow so that when I get an email from our AP that has the word "Invoice" in the subject line, it will take the attached PDF (and not any attached signature images) and save it in a folder on my desktop and then mark the original email as read so that I know what has and hasn't been saved to the folder. 
 
I think the biggest problem I was having was getting just the PDF and not the signature images to save. After some googling I tried a condition "name" ends with ".pdf" but that was still grabbing the signature images. So I did a bit more googling and tried "is inline" but then that wasn't grabbing anything at all. 
 
I have attached a picture of what I had built that I couldn't quite get to work. 
 
If anyone can help me with this I would be so grateful, this would solve a huge time sink that drags me down on my other responsibilities. 
 
Thank you so much!
Flow.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,267 Moderator on at
     
    You’re very close, this is a classic Power Automate scenario!

    The main issue is that email signatures (like company logos) are often treated as attachments, so your flow needs to isolate only real PDF files.
     
    Recommended Setup
    1. Update the Trigger Configuration
    • Use trigger: When a new email arrives (V3)
    • Add Subject Filter → Invoice
    Crucial Step:
    Click Show advanced options and set:
    • Include Attachments = Yes
    • Only with Attachments = Yes
    If you skip this, the flow won’t find any attachments to process.
     
    2. Add the Loop and Filters
    • Add Apply to each → Attachments
    • Inside, add a Condition (set to AND):
    • Name → ends with → .pdf
    • isInline → is equal to → false
    Tip: isInline helps filter signature images, while .pdf does most of the filtering. If isInline isn’t available, the .pdf check alone usually works fine.
     
    3. If Yes Branch
    Use Create file (OneDrive or SharePoint)
    File Name → Name
    File Content → Content Bytes

    4. After the Loop
    Add: Mark as read or unread (V3)
    → Set Is Read = Yes
    Keeping this outside the loop ensures the email is marked read only after processing.
     
    Saving to Desktop
    Power Automate can’t save directly to your PC.
    Easy workaround:
    • Save files to OneDrive
    • Sync OneDrive to your computer
    Files will automatically appear on your desktop/folder.
     
    Summary
    Filter using .pdf (+ isInline if available)
    Save to OneDrive
    Mark email as read after processing
     
    ✅ If one of the responses here solved your issue, please mark it as Accepted so others facing the same problem can benefit as well.
    👍 If this or any other reply here helped you, feel free to give it a Like. It helps others and is always appreciated.

    Sunil Kumar Pashikanti, Moderator
    Blog: https://sunilpashikanti.com/posts/
  • CD-25061445-0 Profile Picture
    2 on at
    Hi Sunil,
    Thank you for the reply!
    I want to just double check if I should be using "name" or "attachment name" for the condition.
    I'm going through this step by step from scratch and I got to step #3 and I'm not seeing "content bytes" as an option for the File Content field.  I do see "attachment content".
     
    The only change that I made was adding a From to the trigger with the email of the person who sends the emails to me. 
     
  • Suggested answer
    Kalathiya Profile Picture
    2,433 Super User 2026 Season 1 on at
     
    Above reply is correct, but it is missing the Get Attachment (V2) action.
     

    Inside the Apply to each loop, add the Get Attachment (V2) action to retrieve the attachment content. Then, use the output from Get Attachment (V2) in the Create file action to create the file with the attachment content.

    So your condition and everything is correct as suggest above by Sunil. Just for get the attachment content add one action and use that content in Create file action.

     
     
    ---------------------------------------------------------------------------
    Glad it helped 🙂
    If this fixed your issue,
    please click “Does this answer your question?” to mark it as verified so others can find the solution easily.
    A Like 👍 is always appreciated, and I’m around if you need more help @Kalathiya

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 482

#2
11manish Profile Picture

11manish 280

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard