Triggering Bots Using the Control Room API

  • 6 October 2020
  • 2 replies
  • 2524 views

Userlevel 6
Badge +9

In this episode, we dive into creating a basic bot which can be triggered and receive values from the Automation Anywhere Enterprise A2019 Control Room. The video leverages the Enterprise A2019 Postman collection. If you don't have Postman yet, check out http://getpostman.com/ - its a great tool for testing API calls to understand how they work and what their responses look like.

Video Recap:

  1. 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/password, but API key authentication could have been used as an alternative  - and would have returned an identical response body.
  2. Setup Input Variables
    1. 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. To say that however they are set up in the bot itself, you'll need to reference those same variable names when passing values to the bot via API call.
  3. Get ID's for User & Bot to Trigger
    1. 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.
    2. Fortunately some of the other Control Room API endpoints make it relatively easy for us to grab said data.
      1. 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:
  4. Trigger the Bot
    1. 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.
    2. The automations/deploy endpoint returns a deployment ID to uniquely identify this deployment.
      1. Note: This ID could also be used if you needed to check the status of a currently running bot execution.

  That's it! If you were able to follow along with the video, you now know how to trigger a bot (and send values to said bot) from the Automation Anywhere Enterprise A2019 Control Room. Now time to get creative about approaching new RPA integrations...


2 replies

Badge

Can I trigger a bot using Control Room API in the Community edition.?

Userlevel 5
Badge +9

Can I trigger a bot using Control Room API in the Community edition.?

Yes- the device ID would just need to be the device that you use for development as there are no dedicated runners in Community Edition.

Reply