Canarys | IT Services


SAP RPA 2.0: Out of Office (Outlook Automation)



In this blog post we will see how Out of Office messages can be set by searching for approved emails for leave applications in Outlook daily, using SAP intelligent RPA 2.0. We can see the creation of automation to do the same and test it successfully.

We will take a sample email template of approved leave application and set the auto replies / out of office by using the data which is available in the email like leave From and To Date, approver name and email address for using to set it in the auto replies of Outlook application, by using Try catch blocks, conditional statements, Screen captures in the workflow to show codeless consumption experience that SAP Intelligent RPA provides.

The framework provided by the SAP can be used to build and test rapid prototypes. And out of office can be set in Outlook within 20-30 seconds, by building the RPA with easy, very readable configuration steps and testing it to see results.

Different options like the process, web capture and automations are available to us as a centrally accessible bundle from SAP Intelligent RPA 2.0.

The data from the Outlook can be extracted with user friendly and convenient activities using Intelligent RPA 2.0 Outlook SDK.



  1. In “Search Mails” automation “Open Outlook instance” is used for opening instance of Outlook for performing tasks related to Outlook.
  2. “custom script” activity gets Today’s date and returns as output from JavaScript code.
  3. To search emails based on certain list of parameters the “Search Email (Outlook)” is used which searches approved leaves containing “subject” as “Your Leave Application has been Accepted” and “date Received” of current date.
  4. “Try catch” block is used to prevent context errors while using “Get Mail Sender” which is used to get Name and email address of the sender by whom the leave will be approved.
  5. “Get Mail Body” gets the mail body which satisfies the Search criteria’s given in “Search Mail” and the output is returned and empty value is returned when criteria’s does not match which then is used by “condition” to check when value is not empty to extract “From Date” and “To Date”.
  6. The “Auto Replies” automation which has the screen captures of Outlook application performs set of “click element” and “set element” on the declared elements in the capture pages to set auto replies.
  7. The “Start Application” is used to start Outlook application by giving target as Outlook and then set of “wait”, “click” and “set” elements are used to set Auto replies in Outlook.

The workflow showing final automation:

First Step: Project and Package

New Project is created from the Projects tab in Cloud Factory

. Create a New Project

Once project is created add SAP Intelligent RPA Core SDK and PDF packages are added in dependencies, we can acquire these packages from the Cloud Store.

. Next Step: Select Dependencies – Manage Dependency and Add Dependency

. After Adding the Dependencies will get the packages List shown in the below image

.  Next Step is Automation-Select Create – Automation

. The Configure agent version is displayed – select your latest version and


. Next step in the screen, required activities are added

. Next Step in Automation – Create a custom Data Type

. First Step in Automation -From activates drag and drop the “Open Outlook instance”.

. Next Step in Automation – Use the “Custom script” from the Activities to get Today’s date as output from       JavaScript code.

. Next Step in Automation – “Search Email (outlook)” from the Activities is used for searching emails having “subject” as “Your Leave Application has been Accepted” and “date Received” equal to Today’s date.

. Next Step in Automation – Use the “Try Catch” from the activities to prevent stopping of execution when search email returns empty, for getting required data like “Get Mail Sender” and “Get Mail Body” from the email.

. Next Step in Automation – “Get Mail Body” is used to get mail body output which satisfies the Search criteria’s given in “Search Mail”.

. Next Step in Automation – Use the “Condition” activity to filter when Email Body does not have any data.

. Next Step in Automation – “Custom script” is used to extract “From date” and “To date” from email body which passes the values to “Auto Replies” automation.

. Next Step in Automation – Drag and drop the “Close Outlook instance” and “Release Outlook instance” from the activities before the end of the automation.

. Auto reply Automation Process – “Start Application” starts Outlook application by getting target from parameter as Outlook then a series of “wait”, “set”, “click” is used to wait for the element, set the element and to click the element for the process of setting auto replies in Outlook.

. Use the Application in the project to capture the screens  

Sample leave Application Template

 Results of this Automation

Link to the running bot from Canarys Automation Pvt Ltd. with details


The Out of Office messages are set very easily by using automation, screen capture and Data Type features provided from SAP intelligent RPA 2.0 with codeless experience.

The intention of this blog post is to get customers, business managers and RPA developers to get into thinking about using SAP Intelligent RPA 2.0 in numerous automation scenarios by using simple steps for achieving great results.


Leave a Reply

Your email address will not be published. Required fields are marked *

Reach Us

With Canarys,
Let’s Plan. Grow. Strive. Succeed.