cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jakub_
Frequent Visitor

Download email attachment - duplicate file

Hello,

 

I am trying to download an attachment from email and I get always a duplicate file with some other name. My attachment is always picture.attch flow.pngattchments files.png

 

I don't really understand why is it downloading this extra file when the email has only one attachment. Because my files are downloaded daily I have always the one with same name rewritten and the other creates a new file with this name without extension. Is there any way to filter attachments by extension, or something? When I see the run the apply to each step has been run twice which means the first step gets 2 attachments for some reason even though the email has only one.

Thanks for help.

K.

7 REPLIES 7
yashag2255
Dual Super User II
Dual Super User II

Hi @jakub_ 

 

This might be happening due to any images in the signature or the email body. As it is happening consistently, I believe it is the image in the signature of the email. Can you check and confirm this one? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Yes, the attached image is embedded in the email body. Do you know how to ignore email body?

yashag2255
Dual Super User II
Dual Super User II

Hi @jakub_ 

 

You can try to identify the image name and then ignore it while creating the attachments in SP. If the incming mails will have a particular naming convention for the attachment, you can look for that. 

 

Also, you can check on a few other mails if the name of the attachment from the body of the email is same, you can use that ignore it by adding a condition branch in the attachments loop. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

It always ends with png and I can try to create switch with substring for the last three characters, i guess.

yashag2255
Dual Super User II
Dual Super User II

Hi @jakub_ 

 

Yes. So if the attachment that you are trying to store is not an image, you can add a condition to check if the type or extension is PNG. You can use the split action to split on the file name on the '.' and then use the last of the split array to compare with the png text. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

How would you use split for attachments name? Mine does not work or I don't know the syntax.

yashag2255
Dual Super User II
Dual Super User II

Hi @jakub_ 

 

You can do it like this as well: 

 

fe.PNG

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,683)