Skip to Content
Technical Articles

Step-by-Step SAP IRPA and CAI Integration

Hello There,

This is my first blog post on SAP Intelligent Robotic Process Automation, In this blog post I want to share my mini project on Integrating SAP Intelligent robotic process automation with SAP Conversational AI.



SAP Intelligent Robotic Process Automation – Automate repetitive manual processes by creating intelligent bots at the same time you can schedule, monitor and manage your bots on cloud.

SAP Conversational AI – It’s a platform to build, train, connect and monitor chat bots, Access Link

In this blog post, will go though the step-by-step process to integrating SAP Intelligent Robotic Process Automation and SAP Conversational AI bots.

Refer the links to know more about SAP IRPA & SAP CAI.

Main Part:

The prerequisites are:

  1. Desktop studio – Installed on your machine
  2. Desktop Agent – Installed on your machine
  3. SAP IRPA Factory – Access to upload project to cloud
  4. Client ID and Secret – To setup Integration
  5. Conversational AI – To create chat bot
  6. Chrome web browser – Live the chat bot


This project has six simple steps, in sequence:

  • Step#1. We create a project using desktop studio
  • Step#2. Uploaded project into Intelligent Robotic Process Automation Factory
  • Step#3. We create a chat bot using Conversational AI
  • Step#4. Setup Integration of Intelligent Robotic Process Automation and Conversational AI bots
  • Step#5. Setup Connect SAP Conversational AI Web Client
  • Step#6. Test our project by communicating with our custom chat bot



First, we create a project using desktop studio. Desktop studio is an on-premise component used to build and test bots.


Open Desktop studio, go-to file menu tab and click on new project or Ctrl+N. A pop-up window will appear, fill all mandatory input fields and click save button.


Create new Workflow, in this scenario I have given “integration” as its name. Press save button.

Then go to activities window. From file section find Read text activity, drag and drop it to workflow screen.

Properties of read file activity, set up as follows

For source file path, here we can use direct file path in single codes or use ctx.options.path.log + “\\filename.extension”

Further we are reading the data from text file and storing in variable Target Data

To create variable(s), we need to go to context tab.

In the above screen shot, data is a folder name and the variable item name is ws_text as used in target data.

Next step I have created custom activity to display the read data from text file, as this is custom activity, we need to add the code.  ctx.log(rootData_data.ws_text);

To end the workflow, use the function end you can find out in scenario section of activities window. Below screenshot is the complete workflow.

After completing the project, we must save, and press build (Ctrl + B) to generate the code lines.

Once you complete above steps of build, you will be finding output window. Make sure that there are no errors and warning messages.

Now we need to save the project, test and export.

Note: the best practice is that we must test bot(s) using debug option in desktop studio before uploading project into factory.


To upload project into Intelligent robotic process automation factory, here are the steps



Select the new project, enter the project name and description details, it will take you to new window. You need to select the import desktop package. Once the project is selected and saved, close the window and go back to project tab in Intelligent Robotic Process Automation factory.

Now generate the package from the project, once the package is generated successfully set it up in released status.


Now to set up the trigger, there are three options to create trigger. Choose an option from select an environment, Deploy and select a trigger type.


Once we complete trigger setup, system will generate the URL and trigger token.



Create a chat bot using SAP Conversational AI, login URL into SAP Conversational AI and click on create new chat bot. Here I have created a chat bot called ‘integration’.

Create an intent say ‘System’ and we must add expressions. Here in this scenario, I have added 4 expressions.

Go to build and create a new skill say ‘Integration_Check’

Double click on skill to set up trigger functionality.

Actions tab


Now we have to setup integration via API service configuration, for that you must have client secret and ID details.

Go back to Intelligent Robotic Process Automation Factory, now add notifier(s) to the trigger which we created in our earlier steps

Conversation ID is ${invocation_context.conversationId}

Token we need to copy from Conversational AI chat bot -> settings (Every chat bot has it’s won developer token).


Enter message content which will respond to Conversational AI, here I am entering output variable from IRPA bot sent to Conversational AI.

Format is ${output.Output_Variables}. In this scenario, output field from Intelligent Robotic Process Automation bot is ws_text.

To validate the input and output parameters of an Intelligent Robotic Process Automation bot, go to project tab in Intelligent Robotic Process Automation Cloud Factory. Select the project you want and then click on scenarios. On right side of the window, find I/O parameters.



Now setup a connect. In this scenario I have selected SAP Conversational AI web client.

Once complete connection setup process, it will generate a script which we need to copy and create a html file.

Save the file on your desktop.


To run the bot, we must open the html file which we created in the above step. Here is the chat conversation in below screenshot.

You can monitor the bot status in Intelligent Robotic Process Automation Cloud Factory.

click on the record to check complete details of the job status..



Following the above process steps, we can successfully integrate SAP Intelligent Robotic Process Automation and Conversational AI systems.

This can be used in various scenarios based on business requirements. If you face any difficulties in implementing the above process steps, you can leave your comments or queries in this blog post, will try my best to respond at the earliest.

I hope that you enjoyed this blog post, I will research more in depth in SAP Intelligent Robotic Process Automation and Conversational AI and will come up with new blogs with various scenarios.

Keep visiting my blogger page and keep sharing your thoughts.


Thanks for your time!

Raghunath Shyamala

You must be Logged on to comment or reply to a post.