Automating Email with SAP Build Process Automation and Outlook Bot

Estimated read time 4 min read

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


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

Click on ‘Review’ and then ‘Create’.

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


name it ‘sendemailbot’ and add description as ‘ bot for email automation’

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 )

and then add ‘outlook sdk’

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

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

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

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.


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.

 

​ 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 projectFirst of all log into SAP Build Lobby.Click create -> Automated Process->Automation and click on nextName your project as ‘OutlookEmailAutomation’.Provide a short description  as “ Bot to send daily emails with attachment via outlook”.Click on ‘Review’ and then ‘Create’.Designing the Automation BotIn the automation section, click create -> automation and give the agent versionname it ‘sendemailbot’ and add description as ‘ bot for email automation’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 )and then add ‘outlook sdk’Add these steps by drag & drop from the tools section ;-i) Open outlook instanceii) Send email(Outlook)iii) Release outlook instanceIn 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 mailIn Send Email(Outlook) properties, fill all necessary details( like In emailitemparameter add custom data,set email fieldsattach file path( here add the filepath variable for storing file location))Test the bot locallyClick on test button and give the filepath ( i.e. the folder location)e.g.Ensure that there are no errors.Release the automationNavigate to project overviewClick release – set version 1.0.0Add release notes : “ Initial release of outlook email bot”.Finally Deploy the BotGo 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 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author