Objective
The objective of this How-To guide is to move or copy an email from one folder to another in the Microsoft Outlook application using OpenBots Studio. Outlook is a very popular business tool that is used for sending/receiving emails as well as scheduling meetings and appointments.
Walkthrough
The following step demonstrates the command to move or copy and email from Outlook
Step 1: To search for and extract one or multiple emails from an Outlook folder, use the Get Outlook Emails Command
  • Select Get Outlook Emails Command
  • Type in the name of the folder to look for email(s)
  • Type the search criteria for the email(s). This example looks for email(s) with the email subject matching this phrase: ‘Test’
  • Select ‘Yes’ (default choice) or ‘No’ to search for unread emails only
  • Select ‘Yes’ or ‘No’ (default) to mark each email found as read
  • Select ‘Yes’ or ‘No’ (default) to save the emails and their file attachments
  • Type the name of the list variable to pass these emails into (in this case vTest). Please note that a list variable is different from a variable.
  • Click OK
Step 2: To loop through the list variable and extract one email at a time, there is only one command needed, called For Each Command
  • Select For Each Command
  • Type in the name of the List variable (‘vTest’)
  • Type in the name of variable to send each email individually to (‘vEmail’)
  • Click OK
Step 3: To move/copy an Outlook email, there is only one command needed, called Move/Copy Outlook Emails Command
  • Select Move/Copy Outlook Emails Command
  • Type in the name of the MailItem variable ‘vEmail’
  • Type in the name of the folder the email will be moved/copied to (i.e. Test)
  • Select the Operation (Move MailItem or Copy MailItem)
  • Select whether the automation will look for unread emails only (Yes or No)
  • Click OK
The commands in this guide can be utilized alongside many of the other commands that will be discussed in later guides. Below is a snapshot of the commands used to move/copy Outlook emails in this guide.

Commands utilized for the above concept (Move/Copying an Email in Outlook) are as follows:

Outlook Command(s): Get Outlook Emails, For Each, Move/Copy Outlook Email

Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.

Contact Sales
Call Our Experts!