Check if mail has attachments

I need to add a filter in the Get Outlook Message activity that should detect if email has a valid attachment but should exclude inline attachments.

I currently use this filter but it only checks if the email has an attachment: “@SQL=”“urn:schemas:httpmail:subject”" like ‘%job application%’ AND urn:schemas:httpmail:hasattachment=true"

As a result, it will still save the email even though the email only contains inline image. What should I add so that it should exclude the inline image when checking for attachments?

Hi @redanime94

You can modify your filter to exclude inline attachments by using the PR_ATTACHMENT_HIDDEN property. Please try the following filter & let us know if it helps:

"@SQL="“urn:schemas:httpmail:subject”" like ‘%job application%’ AND urn:schemas:httpmail:hasattachment=true AND NOT PR_ATTACHMENT_HIDDEN"

Hope this helps,
Best Regards.

seems to be not working…
Get Outlook Mail Messages: Cannot parse condition. Error at “@SQL=((“urn:schemas:httpmail:subject” li…”.

Got a workaround for this…

What I did was I added an If statement to check if the attachment = 0. I have read somewhere that inline attachments are not counted as an actual attachment. So I took a cue from that one and added the “If” clause.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.