Co-Pilot for Automators creates optimal outputs when entering the following example prompts for common trends observed in automation development.

Consider copying prompts from the following list and alter individual details to tailor the output for your own automation needs.

Examples of prompting in the Bot editor

Examples:
  • Open a folder. Loop through each file. Copy the file names and add it in an excel file.
  • Connect to database using myname/mytoken account.
  • Open browser google.com
  • Create a bot that sends email to $EmailTo$, CC $EmailCC$, from $EmailFrom$, subject 'Bot Started', message 'The bot has now started.'
  • Run excel macro "TestMacro" on C:\Temp\MacroFile.xls. Then switch to excel Main worksheet and get all cells.
  • Prompt for the user to select the folderpath. Loop through the selected folder including subfolders. If any excel file is found, then check for the worksheet ‘Main’. If available save it as a PDF in the same folder.
  • This example renders an automation that analyzes records in Salesforce and for each Salesforce record adds the data into the existing database. When the record contains an email the automation sends an email, and when the record has no email the automation adds a comment. Also, if an error occurs during run time the automation displays a message.

    Get records from Salesforce. For each Salesforce record, insert a record into the database. If the record contains an email, send an email. If not, add a comment. If an error occurs when the bot performs these operations show a message box.

Multiple operations separated for clarity: This example displays a complex scenario where different actions are detailed to express the coordination of data in this complex scenario. Ordered numbers help specify the sequence and instruct Co-Pilot to order these actions upon rendering.

Add try catch action. 1. Add SAP connect action with connectivity type as SAP SSO. 2. Send enter as SAP vertual key. 3. Add Delay of 3 ms. 4. Enter the delivery number 858484 by adding the SAP set text action. Field path is wou/tur. 5. Send F7 as SAP virtual key. 6. If window does not exist, update the 'status' column in the excel workbook as 'Invalid' by using Set cell action, else store the Invoice number to the variable using SAP get text action for from field path xyz/abc.

Email operations:
  • This example finds emails that match specified conditions and moves the emails to the existing specified folder.

    Move all emails to 'Finance' folder if attachments have any PDF file and the sender is 'finance@aai.com'.
  • This example renders an automation that uses the email package to connect and save emails sent specifically by established Salesforce contacts. The prompt specifies to use the email package, rather than the Outlook package and relies on the Salesforce list already existing in this user's email account.

    Connect to Outlook with email package, save any email to 'c:\temp\MyEmails' if the sender matches the email of any contact in the Salesforce list.
  • This example finds emails that match specified conditions and saves the emails at the specified path, then deletes the emails from the email folder.

    Backup all emails from HR folder to c:\temp\ExternalEmails if the domain of the sender is 'chad@automationanywhere.com', then delete from the folder.
Sharepoint operations:
  • Authenticate sharepoint with Client ID as $ClientID$, Client Secret as $ClientSecret$, Tenant ID as $TenantID$.
  • Create sharepoint folder COPILOT at /SiteName/Folders/FA.
  • Upload file to Sharepoint.
If / Else If / Else conditions:
  • If response is A, connect to database and read data. Else, send email to $EmailTo$.
  • If response is A, connect to database and read data. Else if response is B, open www.google.com. Else, send email to $EmailTo$.
Excel operations:
  • Use Excel Advanced package to load the data from 'SalesData.xlsx' located in the 'C:\Reports' folder. Write this data into XYZ oracle database.
  • Prompt user for two folders. Loop first folder to find excel files and copy them to second folder.
  • Create a bot to copy data from a table in database to excel.
  • This example renders an automation that creates a new csv file with all matching results from the two csv files specified, based on values in the target column.

    Combine two csv 'a.csv' and 'b.csv' from the folder at c:\temp by using the column AccountNo. Save only the matching result to 'c.csv'.
  • This example renders an automation that saves Excel attachments to the specified folder, sent by the specified vendor.

    Read emails from the vendor 'jsmith@aa.com' and save attachments of their emails to the folder c:\temp. Only include the files with .xlsx extension.
  • This example creates a new csv file with all values from an Excel file and a csv file, based on the target column.

    Combine the excel file 'a.xslx' and the csv 'b.csv' file from the folder at c:\temp by using the column AccountNo. Save all matched and unmatched results to 'c.csv'.
  • Copy the data from the excel file 'a.xlsx' into the excel file 'b.xlsx' for all the worksheets that have matching sheet name.
  • This example renders an automation that runs a macro for each row that meets the specified conditions, and for rows that do not meet the conditions copies that data into a different specified excel file.

    Run macro 'UpdateVendorData' if B2 is 'Pending' in c:\VenderData.xlsx 'Info' tab. Otherwise copy all the data to c:\TodaysVendorData.xlsx.
Error Handler:
  • Open excel C:\temp.xlsx. When error occurs, send an email to me@myorg.com.
  • Open excel C:\temp.xlsx and get all rows. If error occurs when performing these operations, send an email.
  • Add try-catch.
  • Add error handler.

Examples of prompting in the Process Composer

Examples:
  • Create a new customer profile in the CRM system. The name, email address, and phone number will be provided by a user via a form.
  • Read the list of automotive parts from a pdf using a document automation task, use a bot to search these parts in a website, and email the collected information.
  • Start with a form to enter patient information. Then filter out patients that are 75 years old and older. Finally, add a bot to save the information in an excel spreadsheet.
  • Get data from an invoice. If the name starts with "new", check the price. If the price is above 1000, send an email and If the price is below 500, then go to the first task. Otherwise, save the data to Excel file. If the invoice doesn't start with new, validate the document.
  • Add a form task for EntryForm.
  • Add a bot task for botInput.