Skip to Content
Technical Articles

SAP Intelligent RPA 2.0 – Explore Outlook features

This blog post is part of the SAP Intelligent RPA 2.0 Best Practices Series.

This blog post explains Outlook features in SAP Intelligent RPA 2.0 using Low Code/No Code approach.

Functionalities covered in the Blog Post


1.Search Emails.

2.Read the Email Content (Get Subject, Get Body, Get Sender)

3.Download the email attachments and save them in the specified location.

4.Using Logic Controls (Forever, Each)


1.Add dependencies to the Project

      To access the Outlook Activities, make sure to add Outlook SDK as a dependency to the project.

      Repeat the steps to add the core library.

Once the dependency is added, You can view the Outlook SDK under Dependencies TAB.



2.Create an Automation

SAP Intelligent RPA 2.0  has features available in the Cloud Studio to create automation.



3.Explore Outlook Activities and Logic/Controls


Step 1: Activity-Open Outlook instance

Initializes the Outlook Instance.

Step 2: Activity -Search Email

Search the mails with the specified criteria.

Step 3: Activity -Get Number of Email Items in Context

Gets the number of mails available in the Context which satisfies the Search Condition

Step 4: Activity -Log

Displays  the number of emails






Step 5: Activity -Forever.

Use the Logic Control Forever to read the Email content of all the emails.

Step 6: Activity-Is Context Current Email Not Exist.

Activity retrieves false if there is no email in the context.

Step7:   Logic/Controls-Condition.

Condition is mapped to the output parameter isContextCurrentEmailNotExist.


Displays the message “Emails not found”

Step 10-Step 16 -Activities Get Subject, Get Sender, Get Body and Log

Activities to read and print the Subject, Sender and Body.

Step 18-Activity-Save All Attachments

Saves all the attachments to the specified path.

Step 19-Logic/Controls-For Each

Loops through the attachments.

Map the Looping List to the output parameter of Step 18.



Step 20-Activity Log

Displays the Attachment Name

Step 21-Activity-Get Next Email Item in Context

Reads the Next Email Item.

Step 22-Activity Log

Step 23-Release Outlook Instance

Releases the Outlook Instance

Step 24-Activity -Open Message Dialogue

Opens a Message Dialog. Different types of templates are available.



Recording of the steps from 5-24





Complete Workflow



Save and Deploy the Project.


Test Results:

Click on Test Button to view the output.

The BOT would read all the emails matching the selection criteria, Reads the Subject, Email Content, and saves the attachments in the specified location.

Test Results




Further information links

Find more information on SAP Intelligent RPA:

Exchange knowledge: SAP Community | Q&A | Blog

Learn more: Webinars | Help Portal | openSAP

Explore: Product Information | Successful Use Cases

Try SAP Intelligent RPA for Free: Trial Version | Pre-built Bots

Follow us on: LinkedInTwitter and YouTube



You must be Logged on to comment or reply to a post.
  • Perfect. Nice work.

    Good explanations good videos.

    Including a "test" video as proof makes the blog even more helpful.

    Completed and tested with a few test emails in my trial account. Thumbs up.

  • Dear Priya,

    very very informative and usefull.

    I was practicing with your example. Somehow the activity “Move Email” made the whole process collapse.

    When adding move email in the default branch with the activity “Get Next Email Item in Context” the forever loop will end even though only one of the two emails was processed.

    When adding move email in the default branch without the activity “Get Next Email Item in Context” the forever loop will process again and again the first email of the context and will never start the forever loop activities for the second email.

    In my automation I wanted to start the process once a day and I wanted to make sure that only the emails received in the meantime are being processed. Do you have another solution instead of moving emails to only process the newly received emails?

    Edit1: The same accounts for the activity “Delete Email”.

    Edit2: A workaround solution for my last question would be adding the "is read" operand as a search criteria and the "set read" activity in the loop.

    Best regards,

  • Hi Chaitanya Priya Puvvada,

    Thank you for tutorial videos. It’s a really good videos to understand most of the outlook features.

    Could you please help me to understand;

    How to send Custom Emails such as I would like to add HTML body message(specially mailto with a button) to my mail. Like;

    <p> Test message </p><p> <a href=” Approved &body=Hi, irfan”>Approve </a> <a href=” Rejected &body=Hi, irfan”>Reject </a></p><p>The link will only work if you click.</p>


    Thank you for your help,

    Best Regards.

  • /
    • Hi

      Please follow the below steps in Outlook and make sure that your Anti Virus status is Valid. If not,please check it with your IT dep to make it valid.
      In outlook Naviagte to File-->Options--Trust Center-->TrustCenterSettings