Solved

Email: How do i get the list of attachment names?


Hello everyone,

How do i get the list of attachment names from an email and perform subsequent actions only to emails with specific attachments?

Downloading attachments for every email and constructing a list causes a lot of unnecessary traffic, so it is to be avoided at all cost.

Thank you for the help.

icon

Best answer by jon.stueveapeople 28 May 2024, 17:56

View original

8 replies

Userlevel 2
Badge +6

For clarity, are you asking how to get a list of attachments from the Email Package?

Or are you developing a Package to get the list of attachments from a program or webservice?

Userlevel 4
Badge +14

Hello everyone,

How do i get the list of attachment names from an email and perform subsequent actions only to emails with specific attachments?

Downloading attachments for every email and constructing a list causes a lot of unnecessary traffic, so it is to be avoided at all cost.

Thank you for the help.

Hey @michael.witton , 

In the initial phase of reading the email you can set different rules like sender, subject line and basis that you can save the attachments.

 

 
Userlevel 2
Badge +6

Feature to download only specific file types from email attachments in unavailable in existing packages.

You can create custom package leveraging Microsoft’s graph SDK for Outlook/ Google SDK for Gmail.

For clarity, are you asking how to get a list of attachments from the Email Package?

Or are you developing a Package to get the list of attachments from a program or webservice?

how to get a list of attachments from the Email Package.

Hello everyone,

How do i get the list of attachment names from an email and perform subsequent actions only to emails with specific attachments?

Downloading attachments for every email and constructing a list causes a lot of unnecessary traffic, so it is to be avoided at all cost.

Thank you for the help.

Hey @michael.witton , 

In the initial phase of reading the email you can set different rules like sender, subject line and basis that you can save the attachments.

 

 

Hello, so how do i set the rule to only read emails with .xlsx attachments?

Thanks for your help.

Userlevel 2
Badge +6

When using the base Email package, it’s getting all of the emails (All, Read, and Unread), and you bot should contain logic to loop through all of the emails individually. See this article on the Documentation site:
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-email-automation-command.html

Simply put, the recieved email protocols don’t support listing of attachments, or file types. This is where you’re Email bot will need to loop through each email, for each email the attachments will be downloaded in to the indicated folder on the device, and you’ll need to write the logic to check each file in a folder to determine the extension and find the files you’re looking for. You’ll want to empty the folder before going to the next email message.

When using the base Email package, it’s getting all of the emails (All, Read, and Unread), and you bot should contain logic to loop through all of the emails individually. See this article on the Documentation site:
https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-email-automation-command.html

Simply put, the recieved email protocols don’t support listing of attachments, or file types. This is where you’re Email bot will need to loop through each email, for each email the attachments will be downloaded in to the indicated folder on the device, and you’ll need to write the logic to check each file in a folder to determine the extension and find the files you’re looking for. You’ll want to empty the folder before going to the next email message.

 

Well, i specifically want to avoid the unnecessary traffic in this, as already stated in my question:

Downloading attachments for every email and constructing a list causes a lot of unnecessary traffic, so it is to be avoided at all cost.

I also know that MAPI etc. support listing of email attachments, so the reason why this package’s protocols can’t do it is unclear to me.

Userlevel 2
Badge +6

You’d want to make an enhancement request for this, if the current package doesn’t contain the options. I’m unsure what the APIs return from MAPI.

 

Reply