Automation Anywhere: Deploy a Bot to a Device
Use the Automation Anywhere: Deploy a Bot to a Device to start a specific bot on a specific device. This action enables on-demand bot deployment, so instead of having a machine tied up 24/7 with a deployed bot, this action can deploy bots only when necessary.
Use case
If you use this action, imagine it as a mechanism to time and manage automation in AA. To set up a bot to handle incoming email or receive information from other systems, that bot is typically deployed to a device 24/7 to monitor for a document or trigger which may only happen a few times a day, in the span of a few hours a day.
Consider instead that the email or incoming data is sent into PagerDuty Workflow Automation, which has different types of triggers
Head over to the AA Integration setup guide to see the benefits of integrating AA with PagerDuty Workflow Automation.
How to configure this action
This action requires a preconfigured Automation Anywhere integration. For more information on integrating PagerDuty Workflow Automation with other systems, please refer to the Integrations section of our help center.
To fully configure this action, some API Requests are required to identify the Bot to run and device to deploy to. The File ID and Device ID are specific identifiers associated with deploying bots in AA.
Make a POST request for the File ID
The File ID is the unique identifier of the Automation Anywhere Bot to deploy and is required to start the right bot.
With Postman or cURL, make a POST request to the URL below. Replace <ControlRoomURL>
with your control room’s URL, this is the same URL required during the AA integration setup.
<ControlRoomURL>/v2/repository/file/list
POST request filter
The POST request body requires a filter to return the right File ID. Please see the AA Control Room API User Guide for more information on making this request. An example filter and explanation follows below:
{
"filter": {
"operator":"eq",
"value":"Sample Task.atmx",
"field":"name"
}
}
In plain language, this example filter’s condition is: “Filter for the bot where the bot name
equals
Sample Task.atmx
”. The operator eq
is short for equals. More types of filtering is available, see other operators in your AA User Guide.
The request response includes information from all bots on the account. You can identify each bot by the name. Below each name is the bots file id under Id
.
{
"page": {
"offset": 0,
"total": 3,
"totalFilter": 1
},
"list": [
{
"id": "9",
"parentid": "7",
"name": "Sample Task.atmx",
"permission": {
"delete": true,
"download": true,
"execute": true,
"upload": true,
"run": true
},
"lastModified": "2019-01-25T21:51:50.300Z",
"lastModifiedBy": "1",
"path": "Automation Anywhere\\My Tasks\\Sample Task.atmx",
"directory": false,
"size": 210362,
"locked": false,
"fileLastModified": "2018-12-22T23:33:05Z"
}
]
}
In this example, the id is 9
—this ID is required to identify the correct robot and is added to the File ID field during configuration.
Make a POST request for the Device ID
The Device ID is the unique identifier of the device where the bot should be deployed and is required to deploy to the right device.
With Postman or cURL, make a POST request to the URL below with a filter defined in the request body. Replace <ControlRoomURL>
with your control room’s URL, this is the same URL required during the AA integration setup.
<ControlRoomURL>/v2/devices/list
POST request filter
The POST request body requires a filter to return the right Device ID. Please see the AA Control Room API User Guide for more information on making this request. An example filter and explanation follows below:
{
"filter": {
"operator":"ne",
"value":"0",
"field":"id"
}
}
In plain language, this example filter’s condition is: “Filter for devices where id
does not equal
0
”. The operator ne
is short for does not equal. More types of filtering is available, see other operators in your AA User Guide.
The request response includes information from all devices on the account. You can identify each device by the name. Below each name is the devices device id under Id
.
{
"page": {
"offset": 0,
"total": 2,
"totalFilter": 2
},
"list": [
{
"id": "1",
"type": "BOT_RUNNER",
"hostName": "EC2AMAZ-FNU9R46",
"userId": "2",
"userName": "botrunner",
"status": "DISCONNECTED",
"poolName": "Test Device Pool",
"fullyQualifiedHostName": "EC2AMAZ-FNU9R46"
},
{
"id": "2",
"type": "BOT_CREATOR",
"hostName": "EC2AMAZ-FNU9R46",
"userId": "3",
"userName": "botcreator",
"status": "CONNECTED",
"poolName": "",
"fullyQualifiedHostName": "EC2AMAZ-FNU9R46"
}
]
}
In this example, there are two devices, with ids 1
and 2
, any of these ids is required to identify the correct device and is added to the Device ID field during configuration.
Fields for this action
-
Integration
- Select your Automation Anywhere integration from the options. These are your team’s integration accounts.
-
File ID
- File ID of the Automation Anywhere Bot to deploy. To find the File ID, see the steps above under Make a POST request for the File ID
-
Device ID(s)
- The Device ID(s) where the bot should be deployed, separated by commas. To find a device ID, see the steps above under Make a POST request for the Device ID
-
Run with RDP
- Whether this bot should be deployed with Remote Desktop. Select
True
orFalse
from the drop down. The default isFalse
.
- Whether this bot should be deployed with Remote Desktop. Select
-
Complete immediately
- Select
True
orFalse
from the drop down.- Enter
True
to have this task be marked complete as soon as the bot is deployed. - Leave blank or enter
False
to have this task stay open until the bots work is completed.
- Enter
- Select
-
Output Field Prefix
- To help keep output fields organized, choose an output field prefix to add to the beginning of each output field name as this action may output more than one field.
- The step’s name is used as the prefix by default.
What will this output?
This action outputs every response the AA API returns when a bot is deployed to a device. Each API response is output to a PagerDuty Workflow Automation field. These fields are information like the start time, end time, work item values, or status. See Automation Anywhere’s Control Room API User Guide for the details response.
This action may generate multiple fields. To help keep output fields organized, the prefix above will be added to the beginning of each of the output field names, separated by two dashes. Each field will result as:{{output-field-prefix--output-field}}
. Learn more
Output fields for this action
-
automationId
- The ID of the automation to which the execution is associated. For example:
1
- The ID of the automation to which the execution is associated. For example:
-
automationName
- The name of the automation to which the execution is associated. For example:
Sample Task_19.01.30.20.01.20
- The name of the automation to which the execution is associated. For example:
-
canManage
- Whether the current logged in user has the rights to manage the execution. For example:
True
- Whether the current logged in user has the rights to manage the execution. For example:
-
command
- Current command of the execution. For example:
Message Box
- Current command of the execution. For example:
-
createdBy
- The ID of the user who created the automation. For example:
1
.
- The ID of the user who created the automation. For example:
-
createdOn
- The date and time when the execution was created. For example:
2019-01-30 3:33 PM
- The date and time when the execution was created. For example:
-
currentLine
- The current line of bot that is deployed to execute. For example:
3
- The current line of bot that is deployed to execute. For example:
-
deploymentId
- The deployment ID to which the execution is associated. For example:
189353b0-2c7b-4a57-a9e3-f44dd7885c82
- The deployment ID to which the execution is associated. For example:
-
deviceId
- The device ID where the bot is deployed. For example:
1
- The device ID where the bot is deployed. For example:
-
deviceName
- The device name where the bot is deployed. For example:
DESKTOP-01
- The device name where the bot is deployed. For example:
-
endDateTime
- The date and time when the execution finished. For example:
2019-01-30 3:34 PM
- The date and time when the execution finished. For example:
-
fileId
- The file id of the bot that is deployed to execute. For example:
1
- The file id of the bot that is deployed to execute. For example:
-
fileName
- Name of the bot that is deployed to execute. For example:
Sample Task.atmx
- Name of the bot that is deployed to execute. For example:
-
filePath
- Relative path of the bot taht is deployed to execute. For example:
Automation Anywhere\My Tasks\Sample Task.atmx
- Relative path of the bot taht is deployed to execute. For example:
-
id
- The unique execution ID. For example:
4ce3c83f-6fb8-46ab-a524-c05e50bc976a
- The unique execution ID. For example:
-
message
- Returns a message if available.
-
modifiedBy
- The id of the user who last updated the execution. For example:
1
- The id of the user who last updated the execution. For example:
-
modifiedOn
- Date and time when the execution was last updated. For example:
2019-01-30 2:02 PM
- Date and time when the execution was last updated. For example:
-
progress
- Current progress of the execution in percentage. For example:
100
- Current progress of the execution in percentage. For example:
-
queueId
- The ID of an associated queue. For example:
3
- The ID of an associated queue. For example:
-
queueName
- The name of an associated queue.
-
startDateTime
- The date and time when the execution started. For example:
2019-01-30 3:34 PM
- The date and time when the execution started. For example:
-
status
- Returns the automation status, such as
DEPLOYED
,RUNNING
,RUN_PAUSED
,UNKNOWN
,COMPLETED
,RUN_FAILED
,RUN_ABORTED
,RUN_TIMED_OUT
, orDEPLOY_FAILED
. PagerDuty Workflow Automation considers the statusCOMPLETED
to represent decide if the task completed.
- Returns the automation status, such as
-
totalLines
- Total lines of the bot that is deployed to execute. For example:
3
- Total lines of the bot that is deployed to execute. For example:
-
type
- The type of activity. For example:
TASK
.
- The type of activity. For example:
-
userId
- The user id of the device. For example
2
.
- The user id of the device. For example
-
userName
- The user name of the device. For example:
James
.
- The user name of the device. For example:
-
usingRdp
- Whether the bot was deployed using remote desktop process (RDP). For example:
False
- Whether the bot was deployed using remote desktop process (RDP). For example:
Thanks for your feedback
We update the Help Center daily, so expect changes soon.
Link Copied
Paste this URL anywhere to link straight to the section.