# Running AA Bots via Control Room

Automation Anywhere (AA) is the leading cloud RPA platform. With PixieBrix, you can trigger AA Bots from any web page via AA’s Control Room API.

PixieBrix can run bots on both the Enterprise Edition and the free Community Edition. However, in Community Edition, PixieBrix cannot retrieve bot output.

### Configuring a Control Room API in PixieBrix&#x20;

{% hint style="info" %}
To set up a cloud integration that your team can access, head to the [Admin Console](https://app.pixiebrix.com/). *(If you'd rather set up something locally, use the Extension Console. Learn more about* [configuring-integrations](https://docs.pixiebrix.com/integrations/configuring-integrations "mention").*)*
{% endhint %}

From the **Integrations** section in the Admin or Extension Console, click the **+** **Add Integration** button in the top right corne&#x72;**.**&#x20;

Search for and select the Automation Anywhere Control Room integration.

* Control Room URL: the URL of the AA tenant. Should include the `https://`, but should not include a trailing slash
* Username/Password: your Control Room username/password. NOTE: AA will log you out of Control Room tabs you have open when calling the API

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FXFn6XXDSpQP0vQ8A3hdY%2Fimage.png?alt=media&#x26;token=c0ad625f-649b-4f6b-9a24-47cb2cc5a89e" alt="" width="375"><figcaption></figcaption></figure>

#### Optional: Filtering By Folder

When configuring the Automation Anywhere Control Room integration, you can optionally provide the `folderId` to restrict listed bots to that folder:

* Folder Id: the folder containing the bots you want to run. The folder id is available in the URL when viewing the Automation screen in the control room

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FNfzT815mMnMaqoHqkPfJ%2FUntitled%20(46).png?alt=media&#x26;token=28892d17-cbca-4ce1-9254-786fd6a88427" alt=""><figcaption></figcaption></figure>

### Running a Bot

Add the “Run Automation Anywhere Bot” brick to a PixieBrix mod to run an AA bot. The brick has the following options:

* Integration: the AA Control Room integration you configured above
* Bot: the bot in the folder you configured above

#### Enterprise Edition User/Device Pool Configuration

* Run as Users: one or more users that can be used to run the bot (the user must be designated as a runner). AA will choose one of those users to run the bot
* Device Pools: if provided, AA will use one of the assigned device pools. If not provided, AA will use the default runner device for the Run as User
* Await Result:

  * Toggle on to pass the bot output to the next step in the mod. PixieBrix will wait up to 60 seconds for the bot to run.
  * Toggle off to return the deployment id for the bot

  <figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F8c0lO58Hiqd4ZGcylrpl%2FUntitled%20(88).png?alt=media&#x26;token=5b31676d-bb9d-4825-b081-3759ad18abf4" alt=""><figcaption></figcaption></figure>

#### Community Edition Device Configuration

For Community Edition, you select the device you want to use to run the Bot:

* Device: the device for your Community Edition user

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F2VTiSohOdT4YYdO8uDMg%2FUntitled%20(89).png?alt=media&#x26;token=8eaa7963-ba23-42f4-9ac9-abaab26b4ff3" alt=""><figcaption></figcaption></figure>

#### Providing Bot Inputs

In Automation Anywhere, Create the input variables for your bots. To designate an input variable as an input, check the “Use as input” box:

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FJ49QW1x4YPKCqT5UzYIV%2FUntitled%20(90).png?alt=media&#x26;token=6a0706ff-6d54-47bf-80bb-d48517bd34ec" alt=""><figcaption></figcaption></figure>

If the Bot you selected above has input arguments declared, PixieBrix will show the input fields and descriptions.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FZ0TjsbY7blRPm9QU9oLE%2FUntitled%20(91).png?alt=media&#x26;token=e12dfc42-480c-4a32-b050-be7c1065a401" alt=""><figcaption></figcaption></figure>

Currently PixieBrix supports the following Bot input types:

* String
* Number
* Boolean

### Returning Bot Outputs

{% hint style="info" %}
Retrieving bot output from PixieBrix is only available for Automation Anywhere Enterprise Edition
{% endhint %}

#### Adding an Output to a Bot

Create an output variable for your bot, choosing the correct Type and checking the “Use as output box”.

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FFZGbx3j4C0dKSr8tsGlh%2FUntitled%20(92).png?alt=media&#x26;token=5745f427-8897-4203-8685-246b4f9c241a" alt=""><figcaption></figcaption></figure>

PixieBrix currently supports the following output types:

* String
* Number
* Boolean

Add an “Assign” step to assign the output variable:

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F0vdbrOoBP1ngKw7tJlxI%2FUntitled%20(93).png?alt=media&#x26;token=0631fd7e-5bbf-4ce6-ae68-0a54556ce2e9" alt=""><figcaption></figcaption></figure>

#### Retrieving Bot Output

In PixieBrix, add a “Run Automation Anywhere Bot” brick to your mod. Toggle on the “Await Result” field.

To use the output in later bricks, access the field name on the output key you’ve assigned to the brick, e.g., `@output.out_Sum`
