Developers can use Co-Pilot for Automators to quickly build loop logic in bot
automation using natural language in an instructional prompt.
About this task
This example demonstrates designing a prompt to build a bot automation that loops
through emails and saves contact details of each sender in an Excel file. Notice
that after the prompt is entered, Co-Pilot for Automators automatically
generates and sequences the necessary actions and iterator type in a structure for
you to verify and complete by setting values for your individual use case.
This example intends to demonstrate the experience and steps to take when applying
Co-Pilot for Automators to developing loop logic. The results from more
sophisticated prompts, generating more complex scenarios, do require examination
with attention to detail to ensure results match expectations. Any generated
variables and connections follow default labeling when interpreted by the language
used in your prompt.
Procedure
-
From a new project in the Bot editor, click
Co-Pilot to open Co-Pilot for Automators.
-
Enter the following prompt: Connect to my email and loop through
unread emails and insert details of all senders in a new excel file and save
the file.
The necessary actions are added to the canvas. You can disregard the
comment that might appear, as it is simply a notification generated from your
prompt, unless you find the comment relevant to your automation needs.
-
Necessary variables have been populated and mapped to the actions of the
automation. Examine these for necessary improvements for your individual
automation.
-
In the Email: Connect action, variables for your
individual server require data for
$pStrServerhost$ and
$pNumPort$.
-
The variables
$pCredUsername$ and
$pCredSecuredpassword$ require your individual
Username and
Password.
-
The Loop action is configured for unread mail in your
Inbox folder. You can make this automation more specific by editing the type of
email or folder.
-
The Excel advanced: Insert action is configured to
insert at the variable
$pNumInsertrownumber$. Edit this
variable to insert data at your desired row or column in Excel.
-
Finally, test and save your automation.