Teneo Developers

Automation Anywhere

The Automation Anywhere example solution showcases how you can use your Teneo bot for Robotic Process Automation (RPA) with Automation Anywhere. The solution contains an integration with Automation Anywhere and an example flow to start a job on Automation Anywhere.


Solution Contents

Automation Anywhere integration

The solution contains a backend integration with methods to authenticate the user to and run a bot on Automation Anywhere. These methods are used in the example flow.

Example flow

This flow is meant as an example of how to authenticate and run a bot on Automation Anywhere from a Teneo dialogue. The finished flow is available in the solution with the following name:

  • Automation Anywhere Authentication and Trigger

Getting Started

In this area, we are going to go through the process of setting up a Teneo solution that can trigger a bot from an Automation Anywhere Control Room.
In this example, a Teneo Solution will pass two pieces of data to a bot and that bot will write them into a log.


  • These instructions assume you have downloaded and imported the Automation Anywhere solution. See instructions below.
  • To follow these instructions, you need to have a user with an Unattended bot runner license in Automation Anywhere.
  • These instructions also assume you have a Control Room with a checked-in bot. Please refer to this tutorial for the steps required to build and check this bot in to Automation Anywhere. In case there is an issue with the tutorial page, the video can be found on Youtube. Below is a recap of the video from the tutorial page.

Get a token

  1. Before any bots can be triggered or ID’s can be pulled back, a token must be generated using the Control Room authentication API.
  2. The video uses authentication via username and password. An API key authentication could have been used as an alternative – and would have returned an identical response body.

Set up input variables

For variables to appropriately be sent from API call to bot, the variables must be:

  1. Indicated in the variable setup as input values
  2. Be referenced exactly by name: however they are set up in the bot itself, you’ll need to reference those exact same variable names when passing values to the bot via the API call

Get ID's for user & bot to trigger

In addition to the values we want to feed the bot, we have to tell the Control Room exactly what bot to run and where to run it. Fortunately, some of the other Control Room API endpoints make it relatively easy for us to grab said data.

If you just want to do a quick test, instead of using the API to get user and bot ID’s, you could alternatively navigate to those objects in the Control Room web interface and you will see the object’s ID in the URL. In the example below, 123482 is the ID of the bot:


Trigger the bot

Once you have a valid token, the bot ID, the user ID and any option values to pass to the bot, you’re ready to trigger it. The automation/deploy endpoint returns a deployment ID to uniquely identify this deployment. This ID can also be used to check the status of a currently running bot execution.

Global Variables and how to access them

In order to build the solution we would first need to define a series of variables under Globals Variables in Teneo Studio.

Variable NameExample valueWhere to find it
cr_urlhttp://916XXXXXeeXX.ngrok.io/The URL where your Control Room is accessible from. You can get this address from the browser when you connect to your Control Room. If the address is a local installation (localhost, or machine name) you will need to use a tunneling application to route from the internet to your local machine. We use ngrok for this purpose, mapping the address provided by ngrok to localhost:80. In our example, the value of this variable is http://916XXXXXeeXX.ngrok.io/. The ending slash is necessary.
cr_username'teneoName'This is the name of the user that has the Unattended bot runner license. For security, it should be different from the admin user or the bot builder user, with only the exact permissions to run the bot. In this example, the value is "botrunner".
cr_password'testPswd'The password for the user above.
cr_botId'20'The number of the bot to run. You can find this in the Control Room by selecting the bot from the list under Bots and My Bots and looking for the id in the URL, like so: .../bots/repository/public/taskbots/-->20<--/view.
cr_userId'12'The number of the user whose username we defined above. You can find this in the Control Rom by selecting the user from the list under Administration->Users and looking for the ID in the URL: .../admin/users/-->3<--/edit.
cr_token''A placeholder to store the authentication token received from the Control Room. Initial value should be an empty string ("").

Try it Out

We can test our solution using Try Out. Open it and type in the trigger we defined at the beginning of this flow, _bot_trigger. If authentication is successful, it will ask you for two input strings, which will then be passed on to the log writing bot. If you get a Deployment ID back, it means the job is being executed. For final confirmation, you can go to the machine where the Control Room is running and check the log file for the inputs you sent.

Example Conversations

User: _bot_trigger
Bot: Authentication Failed. Please check your Control Room URL, username and password.

User: _bot_trigger
Bot: Authentication Successful.
Please enter 1st input for log.
User: test input 1 for log
Bot: Please enter 2nd input for log.
User: test input 2 for log
Bot: Selected inputs:
test input 1 for log
test input 2 for log
botDeployId: 2354-6975-1298-9465