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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Random .png file is be...
Power Automate
Unanswered

Random .png file is being uploaded when i upload email attachment

(0) ShareShare
ReportReport
Posted on by 26

Firstly, kindly bare with me as I am a noobie and have recently started working on Power Automate.

 

I am trying to build a flow which involves uploading an email attachment received (from a shared mailbox) to a sharepoint folder . I want to ensure that only those attachments are uploaded that have 'sample' in their name. I am having trouble doing this.

 

In addition to that, I have noticed that my current flow is working well except for the fact that all attachments are being uploaded to the sharepoint folder along with a random .png file. I believe it has something to do with InLine attachments (maybe its the email signature). However, i am having trouble excluding this file from being uploaded to sharepoint.

 

I have attached screenshots of my flow for reference.

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    Could you try to filter out attachments that are a specific file size? I'd imagine those images are very small in size. If possible, you can filter out by attachment type. 

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

  • zain28 Profile Picture
    26 on at

    Hey, thanks for your response, could you let me know what the flow would be to filter out the attachment (using type or size). I am still learning power automate so I would appreciate some guidance.

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    What do you want to filter by? The type or size? 

  • zain28 Profile Picture
    26 on at

    Ideally by type

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    If you are filtering out more than a single file type you will need to use an expression in the Filter Array action. 

    creativeopinion_1-1690769728549.png

     

    Single File Type

    For the Value, select Attachments Name. Select does not end with and type in the file extension.

    creativeopinion_2-1690769821658.png

     

    Multiple File Types

    Click on edit in advanced mode and enter an expression (below).

    Tip: Do not bother trying to type in the field. Compose your expression in a text editor and copy and paste. The advanced mode field is very buggy and it will move your cursor as soon as you start to type. 

     

    In my example below I'm filtering out all .png and .jpg file types. You can add more lines if you'd like. Please note that the last condition line does not have a comma. 

    @And(
     not(endsWith(tolower(item()?['name']), '.png')),
     not(endsWith(tolower(item()?['name']), '.jpg'))
    )

     

    Hope this helps.

     

    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

     

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard