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 / Outlook attachments to...
Power Automate
Answered

Outlook attachments to sharepoint - uploading random jpeg, png, and gifs

(0) ShareShare
ReportReport
Posted on by 5

Hello, 

 

I am using the "Save my email attachments to a SharePoint document library" option to save Excel attachments to a SharePoint folder. That is going fine. However, with each email, there are also a number of jpeg, png, and gifs saved in the same location. Also, I cannot open these to see what they are as the "file type" is not supported, despite my being able to open other files of the same type. 

 

Does anyone know how to filter those out? I've tried ideas from other posts, but nothing has worked. 

 

Thank you

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @justanotherone 

    The cause of random JPEG and GIF files is because the email might contain a signature that has embedded images. Power automate treats them as attachments too.

    Add a "Condition" action inside the "Apply to each" loop to check the file extension. If the condition is met (i.e., the file is an Excel file), save the attachment to the SharePoint document library.

     

  • justanotherone Profile Picture
    5 on at

    @SudeepGhatakNZ 

     

    Thank you for your response. I have tried but it doesn't seem to work. Do you know the name of the function or expression? 

    justanotherone_0-1718110643945.png

     

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    Use the following expression
    toLower(last(split(outputs('Compose_-AttachmentName'),'.')))
    SudeepGhatakNZ_0-1718143445270.png

     

     

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 231 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 170

Last 30 days Overall leaderboard