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

Email Attachment Condition FALSE?

Hi All

 

I have a flow that

Checks for .PNG and .JPG files. When true, the files are saved to SP Document/TodaysDate/EmailAddessOfSender.

 

When images are sent from Android or Windows email clients this works great. However, when the images are embedded into the email, the condition fails. Should I be doing something else or am i missing something?

 

Capture1.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @GiZmO ,

 

I did a test on my side, you can refer to this structure.

If the image is embedded in Body, Has Attachment field needs to be set to blank, the Flow will be triggered normally.

It is also recommended to use ends with to determine the file type and see if Attachments Name ends with the specified extension.

 

Image reference:

32.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
efialttes
Super User
Super User

@GiZmO 

Have you tried to check the filename (with extension) output from trigger when condition fails?

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



GiZmO
Frequent Visitor

Thanks for your reply

 

I do get this, but it doesnt give me much information. 

 

Capture2.PNGjyj

 

In the Output of the trigger (When a new email arrives) I see this (taken a section)

 

"Name":"image1.JPG","ContentType":"image/jpeg",

 

"DateTimeReceived":"2019-05-21T05:41:33+00:00","HasAttachment":true,"Subject":"Jpg in body","BodyPreview":"Sent from my iPad","Importance":1,"ConversationId":"AAQkADAwZmJjNDQ3LTM1NzctNGU2MS1iMzk4LWE4OTY2OGE0ZTZmYwAQAE7DQ9cH4XtAlhwZumfef5U=","IsRead":false,"IsHtml":false,"Body":"\r\n\r\nSent from my iPad","From":"user@emailaddress.com","To":"user2@emailaddress.com","Cc":null,"Bcc":null,"Attachments":[{"@odata.type":"#Microsoft.OutlookServices.FileAttachment","Id":"AAMkADAwZmJjNDQ3LTM1NzctNGU2MS1iMzk4LWE4OTY2OGE0ZTZmYwBGAAAAAABf09MgtVP1Q69g65htYujaBwB0jE5q0Y2kS7ewBwVVGIeZAAAAAAAOAAB0jE5q0Y2kS7ewBwVVGIeZAAWIr-1pAAABEgAQAEdy9Ud_8ZxKvcJgCBcpCOY=","Name":"image1.JPG","ContentType":"image/jpeg","Size":1084216,"ContentBytes":"/9j/4S/+RXhpZgAATU0

 

Brad_Groux
Community Champion
Community Champion

Remove the dot (.) from the conditions. The dot operator also makes the condition variable case sensitive, so if you include the dot (.), you would need a case sensative condition like .JPG.Jpg and .jpg for each filetype extension. 

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!

 

GiZmO
Frequent Visitor

Thanks for that tip Brad

Hi @GiZmO ,

 

I did a test on my side, you can refer to this structure.

If the image is embedded in Body, Has Attachment field needs to be set to blank, the Flow will be triggered normally.

It is also recommended to use ends with to determine the file type and see if Attachments Name ends with the specified extension.

 

Image reference:

32.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thats great it works..

 

I changed from contains to ends with and all worked as expected

 

Thanks for your help

 

I have one more question for this solution, but ill do another post.

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

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

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,469)