Support > Forums > OpenBots Studio > Outlook Automation
How to loop through Emails in OpenBots
This forum has 175 topics, 471 replies, and was last updated 8 hours ago by DHARANI R
Thanks
Hi AKST001,
Thankyou for sharing the query. In order to loop through emails you can use for each command. First step would be to read outlook emails - Use Get Outlook Emails command and the extracted mails will be stored with data type list<mailitems>. Second step to loop through emails - Use for each command you can pass, the output of above command - list<mailitems> and create another variable <mailitem> (individual mail item). Inside for each loop you can add commands to perform respective operations on individual mail such as - Get Outlook Email as Attachments, Save Outlook Email etc.. as per your requirement. For further reference on automation with Emails please refer to this video - https://academy.openbots.ai/lessons/stock-price-extraction/ Please let me know in case of further queries.
You are not authorized to reply, please click here to login and add your reply to this topic.