Skip to main content
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.

Best answer by jon.stueveapeople

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.

View original
Did this topic help answer your question?

8 replies

jon.stueveapeople
Automation Anywhere Team
Forum|alt.badge.img+7

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?


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • May 9, 2024
michael.witton wrote:

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.

 

 

Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 52 replies
  • May 9, 2024

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.


jon.stueveapeople wrote:

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.


Zaid Chougle wrote:
michael.witton wrote:

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.


jon.stueveapeople
Automation Anywhere Team
Forum|alt.badge.img+7

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.


jon.stueveapeople wrote:

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.


jon.stueveapeople
Automation Anywhere Team
Forum|alt.badge.img+7

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.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings