Moving Specific Mails to Bin/Trash folder using IMAP/Outlook


Based on some condition, I want to move some specific emails from my Gmail inbox to bin/trash folder.

Please let me know the steps.

I have used get imap->move IMAP, but, I am not sure where and how to use the conditions.

1 Like

Awesome We can use MOVE Mail activity
May I know in what condition you would like to move like based on any specific subject
Or date
Or sender
Or body context

Cheers @Saikat_Chowdhury

1 Like

I want to move mails from some specific senders.

1 Like

So once after getting the mail list from Get Outlook or any other mail getting activity with a variable of type list of mailmessage named list_mails

Now use a FOR EACH loop and pass the above variable list_mails as input and change the type argument as System.Net.Mail.Mailmessage in the property panel of For each loop

—inside the loop use a IF condition like this
If true it will go to THEN part or goes to ELSE part where inside the THEN Part use MOVE mail activity either from Imap or from any service in which we can mention the folder ‘Deleted Items/Trash‘we want to move

Cheers @Saikat_Chowdhury


Thanks, buddy, this worked.
However, instead of going to the ‘Trash’ folder, the mails went to ‘[IMAP]/Trash’ folder.

what might be the reason?

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