Skip to main content

Hello,

I need to get the count of how many emails came from a particular sender and particular subject in last 2 hours. Is this possible, if yes kindly assist. Thanks in anticipation!!

Hi @gauravr13 ,

 

Please try with below options, i believe this will help you 

 

Note : You need to given -2 hours from current date&time, then loop the email and count it.

 

 


Hi @gauravr13,

 

If the number of mails in the Inbox is huge, then what I would recommend is try adding a Rule in Outlook to automatically receive all communications from this particular sender to a Subfolder. Later, you can loop inside this subfolder to check the total count.

 

Instead, if you loop inside the Inbox, the execution time will be more depending on the number mails inside of it.


Hi @gauravr13,

 

If the number of mails in the Inbox is huge, then what I would recommend is try adding a Rule in Outlook to automatically receive all communications from this particular sender to a Subfolder. Later, you can loop inside this subfolder to check the total count.

 

Instead, if you loop inside the Inbox, the execution time will be more depending on the number mails inside of it.

Hi @Padmakumar ,

Thanks for your response!

Can you let me know how I can read the body of any email?


 

Hi @gauravr13,

 

If the number of mails in the Inbox is huge, then what I would recommend is try adding a Rule in Outlook to automatically receive all communications from this particular sender to a Subfolder. Later, you can loop inside this subfolder to check the total count.

 

Instead, if you loop inside the Inbox, the execution time will be more depending on the number mails inside of it.

Hi @Padmakumar ,

Thanks for your response!

Can you let me know how I can read the body of any email?

While looping, the output will be assigned to a Dictionary variable. You can mention the emailMessage key to read the Email content.

 

Refer the below links for additional key value pairs for Email Dictionary variable.

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

 


 

Hi @gauravr13,

 

If the number of mails in the Inbox is huge, then what I would recommend is try adding a Rule in Outlook to automatically receive all communications from this particular sender to a Subfolder. Later, you can loop inside this subfolder to check the total count.

 

Instead, if you loop inside the Inbox, the execution time will be more depending on the number mails inside of it.

Hi @Padmakumar ,

Thanks for your response!

Can you let me know how I can read the body of any email?

While looping, the output will be assigned to a Dictionary variable. You can mention the emailMessage key to read the Email content.

 

Refer the below links for additional key value pairs for Email Dictionary variable.

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

 

Hi @Padmakumar ,

Thanks again for your response, it really helped.

I am facing another challenge on this. If I provide a subject in loop condition, somehow it is taking more subjects also (for example - I gave subject as ‘Test’ but it is taking subject ‘Testing’ as well). Any way to avoid this??


Hi @gauravr13 ,

 

It is mentioned that When Subject contains. Which means, it will take whatever text you gave there and search inside the folder. The search is not exclusive and hence, it will return whatever Subject lines which has the search text included.

So, in your case, TEST is included in TESTING. Hence the result will include both.

 

Go with some specific text which is relevant to a particular mail communication.


Reply