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
actions.
-
Configure the credential variable to hold the username.
Field | Input |
---|
Name |
username |
Use as input |
select |
Type |
Credential |
Default value |
Insecure string, leave field empty |
-
Configure the credential variable to hold the password.
Field | Input |
---|
Name |
password |
Use as input |
select |
Type |
Credential |
Default value |
Insecure string, leave field empty |
-
Modify the first
action.
-
Click the action to open it in the action
editor.
-
In the Select a credential field, select the
Variable tab.
-
Click F2 to open the Variables menu and select
$username$
.
-
Click Yes, insert.
-
Repeat the substeps in step 3 to insert the
$password$
variable into the second .
-
Click Save and Close
The Automation page appears.
Create a parent bot that will run the child bot and pass it the credential values.
-
Open a new bot.
-
Click .
-
Enter a bot name and click Create and
edit.
-
Insert a
action to select the bot and provide the login
credentials.
-
Double-click or drag the
action.
-
In the Task Bot to run field, select the
Control Room file tab.
-
Click Browse and select the bot
that you modified in the above steps.
-
In the Input values options, select both
Set username and Set
password.
-
For each credential variable, click Pick to
select the locker, credential, and attribute.
-
Click Save and Run.