I have a problem that I can’t solve on my own, and I tired to look for a solution and was unable to find an answer. So, I really hope that you can help.
I need to download only PDF attachments from the mails, and then only move those mails to a “processed” folder. (properly by using “Move IMAP mail messages”)
Right now, the flow is as follows:
Get IMAP Mail Messages → For Each → IF (condition: item.Subject.ToLower.Contains(“”) → Save Attachments (Condition: “^.+.(([pP][dD][fF])$” ) →
But then what do I do? I have used a “Move IMAP Mail Message” activity, but if I am using the “Message” variable from the “Get IMAP Mail Messages” activity, then I will be moving every mail listed in that variable and not only those with the PDF attachment.
Hope there is a someone with a brilliant mind to solve this….
@Thomas_Eld Using Save Attachments Activity with that Condition will only Save Pdf Attachments right ? If that’s working fine, then there’s a way to solve it
@Thomas_Eld Ok So you were able to Filter the PDF files using that Filter, Then you can use the Output of Save Attachments Activity, To get the Count of Attachments , If the Count is More than 0, Save that Mail Message to a List
In this way you have a List of Mail Messages that has a PDF in it, The i guess you can use Move IMAP mail Message Activity inside a For Each of MailMessageList
@supermanPunch , Well. i think i understand where you wonna go at, but i dont konw how to get there
I mannaged to get the output from the “Save Attachments” activity into a variable of type
= “System.Collections.Generic.IEnumerable(Of String)”. But, what then?