Download attachments from emails with a specific subject

Hector Agraz

New Member
Guys i am trying to download attachments from emails send to me with a specific subject .Help me as i see no options to download attachments
 

Scott92

New Member
Automatically download the attachment in a holding folder, then immediately have an if statement based on the email subject, where if email subject does or does not meet your criteria, loop through holding folder and delete your attachments & continue in the 'for each email in server' loop.
If an email is sent with the subject you desire, it will pass the above logic and you can have a command to copy the attachment in your desired folder location and delete it from the holding folder.
This will ensure you only get the attachments that pass the criteria/logic you set up in the code.
 

VJR

Well-Known Member
Hi Hector Agraz,

I've provided an alternative for this in the below link where you could allow all the attachments to be downloaded and then delete all the unwanted ones and keep/move the required ones. This is when you are aware of the name or the pattern of the attachment and its extension.
http://rpaforum.net/threads/email-automation.918/

Scott92's suggestion is a good one where you go email by email and delete all the ones with the unwanted subject and keep only the required ones in that folder as you go through each email.

The 'If' and the loop in the above link will be helpful to understand.
 

Hector Agraz

New Member
yes, try to eliminate and if it works well but I thought, if there could be an altarnativa of just downloading the attachments directly and not downloading the ones I do not occupy, thanks for the support guys
 

dan

New Member
Hi Hector, You must search first the subject of the email so that you will be able to download the specific attachment ONLY. Downloading all the attachment will take much time if you will only be needing one attachment from a specific subject.
 

smebdi

New Member
Hi Hector,

Just as easy to just download all of the attachments into a folder and delete the files that do not meet the criteria of your file. Takes longer with a shared inbox for many tasks, but will still work. Allows 10 people to use the same inbox as long as everyone has something in the format that denotes it is theirs. Such as you want ProcessName_09-05-2018.xlsx but there's ProcessName_09-04-2018.xlsx and 03 in there. Just delete the other two and move on from there.
 

RCBricker

New Member
could you not just:
loop through all emails
if email subject includes *X* then
loop through all emails and download attachement(s)
end loop
end if
end loop
 
Top