Automating Email with SAP Build Process Automation and Outlook Bot
Share

In this blog, I will walk you through how I built an outlook automation bot that : –
i) Opens Microsoft Outlook.
ii) Sends a repetitive message with  .docx file attached.
iii) Closes outlook.
iv) Is released and deployed through the SAP Build lobby.

Creating a new automation project
First of all log into SAP Build Lobby.
Click create -> Automated Process->Automation and click on next

Shubham_Singh_01_20-1751364625106.png

Shubham_Singh_01_21-1751364625114.png
Name your project as ‘OutlookEmailAutomation’.
Provide a short description  as “ Bot to send daily emails with attachment via outlook”.

Shubham_Singh_01_22-1751364625119.png

Click on ‘Review’ and then ‘Create’.

Designing the Automation Bot
In the automation section, click create -> automation and give the agent version

Shubham_Singh_01_23-1751364625126.png
name it ‘sendemailbot’ and add description as ‘ bot for email automation’

Shubham_Singh_01_24-1751364625131.png

Click on create.

Click on setting option, go to dependencies and  click on add -> Add a business process project dependency ( it is necessary to do this as then only we can get the different operations related to outlook in our tools section )

Shubham_Singh_01_25-1751364625138.png

and then add ‘outlook sdk’

Shubham_Singh_01_26-1751364625143.png

Add these steps by drag & drop from the tools section ;-

  1. i) Open outlook instance
    ii) Send email(Outlook)
    iii) Release outlook instance

Shubham_Singh_01_27-1751364625147.png

In automation details section, go to input/output and set one input parameter for storing the document location which is going to be attached in the mail

Shubham_Singh_01_28-1751364625151.png

In Send Email(Outlook) properties, fill all necessary details
( like In emailitemparameter add custom data,
set email fields
attach file path( here add the filepath variable for storing file location))

Test the bot locally
Click on test button and give the filepath ( i.e. the folder location)
e.g.

Shubham_Singh_01_29-1751364625156.png
Ensure that there are no errors.

Release the automation
Navigate to project overview
Click release – set version 1.0.0
Add release notes : “ Initial release of outlook email bot”.

Finally Deploy the Bot
Go to deployments tab in the build lobby.
choose your bot and deploy version 1.0.0.
Assign it to a Desktop Agent that has outlook installed.
Trigger via manual execution or by scheduled trigger(e.g. every morning 9:00 am).

Benefits of this automation :-
It will save daily manual effort.
It reduces errors in repeated email content.
It ensures consistent report attachment.
It works even with outlook desktop app – no server-side integration required.

 

  Read More Technology Blog Posts by Members articles 

#abap

By ali