Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Example of building a bot that uses credential variables

  • Updated: 8/11/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

Example of building a bot that uses credential variables

Securely pass values to a bot using credential variables to automate the process of logging in to a bank website.

Prerequisites

Complete the steps in the following task to build the child bot that automates logging in to a bank website: Example of building a bot that uses credentials

This task is performed by the user who wants to build and deploy bots. You must have the necessary rights and permissions to complete this task, and authorization to log in to the Control Room as the licensed user.

In this example, you modify the bot to accept credentials passed from a parent bot.

Procedure

In the bot that you built for Example of building a bot that uses credentials, create two credential variables and insert them into the Recorder > Capture actions.

  1. Configure the credential variable to hold the username.
    FieldInput
    Name username
    Use as input select
    Type Credential
    Default value Insecure string, leave field empty
  2. Configure the credential variable to hold the password.
    FieldInput
    Name password
    Use as input select
    Type Credential
    Default value Insecure string, leave field empty
  3. Modify the first Recorder > Capture action.
    1. Click the action to open it in the action editor.
    2. In the Select a credential field, select the Variable tab.
    3. Click F2 to open the Variables menu and select $username$.
    4. Click Yes, insert.
  4. Repeat the substeps in step 3 to insert the $password$ variable into the second Recorder > Capture.
  5. Click Save and Close
    The Automation page appears.

Create a parent bot that will run the child bot and pass it the credential values.

  1. Open a new bot.
    1. Click Create new > Bot.
    2. Enter a bot name and click Create and edit.
  2. Insert a Task Bot > Run action to select the bot and provide the login credentials.
    1. Double-click or drag the Task Bot > Run action.
    2. In the Task Bot to run field, select the Control Room file tab.
    3. Click Browse and select the bot that you modified in the above steps.
    4. In the Input values options, select both Set username and Set password.
    5. For each credential variable, click Pick to select the locker, credential, and attribute.
  3. Click Save and Run.
Send Feedback