Skip to main content
Solved

Loop through emails and get subject text


Forum|alt.badge.img+4

Hi,

I want to get certain text from the subject of some emails in my inbox. I am trying to create a loop that iterates over each email and gets the innerHTML property, but so far I can only get the text from the first one multiple times. How can I iterate throught the emails in my inbox and get the text in the subject?

Thanks

Best answer by Tamil Arasu10

Hi @jsegura 2409 ,

Following Steps:

  • Use the Email Connect Action
  • Loop the mailbox (inbox)
  • Assign the variable into Dictionary 

Please refer the below links,

 

The email properties are stored in a dictionary variable within the following dictionary key

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-email-action-loop.html

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-using-email-properties.html

 

emailSubject String Retrieves the value of the email subject
View original
Did this topic help answer your question?

3 replies

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3274 replies
  • Answer
  • August 24, 2023

Hi @jsegura 2409 ,

Following Steps:

  • Use the Email Connect Action
  • Loop the mailbox (inbox)
  • Assign the variable into Dictionary 

Please refer the below links,

 

The email properties are stored in a dictionary variable within the following dictionary key

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-email-action-loop.html

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-using-email-properties.html

 

emailSubject String Retrieves the value of the email subject

Forum|alt.badge.img+4
  • Author
  • Cadet | Tier 2
  • 8 replies
  • August 25, 2023

Thanks,

And how can I read the content of the email and store it in a variable?


Forum|alt.badge.img
  • Cadet | Tier 2
  • 1 reply
  • April 17, 2024

@Tamil Arasu10 

 

In case of reading emails with large volume within short time if we need to use multiple bots to read Unread emails from the same mailbox, how can we avoid to read same email by more than one BOT and get the details duplicated ?

Or any other alternate solution to read large no of emails within short time faster without using multiple bots option ?

 

kindly provide feedback! THANKS


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