Web agent
Before you start
A Web agent step drives a browser through a list of actions, then hands the result back to the workflow. Use it to sign in to a supplier portal and download this month’s invoices when the portal has no API.
When should I use the Web agent?
Section titled “When should I use the Web agent?”Use it only when the website offers no API. An API through REST API or Integration is faster and steadier. The step appears in the picker only if your workspace has the Web agent add-on.
Add a Web agent step
Section titled “Add a Web agent step”- Click + and choose Web agent. It sits in the Connect group.
- Under Steps, click Add a step and choose Open a page. Type the Web address.
- Add the steps that follow, such as Sign in, Click or Wait for a download. Reorder with the arrows.
- Under What it brings back, turn on This job downloads a file if the job downloads one.
- Click Save.
What are the nine step types?
Section titled “What are the nine step types?”| Group | Step | What it does |
|---|---|---|
| Go to | Open a page | Goes to a web address |
| Go to | Sign in | Types a username and password and submits |
| Act | Type into a field | Fills in a box on the page |
| Act | Choose an option | Picks a value in a dropdown |
| Act | Click | Clicks a button or link |
| Wait | Wait for something | Pauses until an element shows up or goes away |
| Wait | Wait for a table | Pauses until a table has enough rows |
| Wait | Wait for a download | Pauses until a file starts downloading |
| Capture | Take a screenshot | Saves a picture of the page for the job result |
Boxes on the page are found with a CSS selector, such as #username. Each step shows How do I find a selector?.
What can the job bring back?
Section titled “What can the job bring back?”With This job downloads a file on, you set the File type and an optional File name pattern, then choose what happens to the file:
- Pass the file to later steps under a name. Later steps read it as that name, then
.urlor.fileName. - Attach the file to a record, in a file field of a module.
- Read the table in the Excel file, for Excel files. The rows become a list you can loop over. You can set the sheet, the rows to skip, the header row and filters such as is, contains and is greater than.
Worked example: fetch an invoice report
Section titled “Worked example: fetch an invoice report”Sara’s job opens portal.example.com/invoices, signs in, clicks Export, and waits for a download. She chooses Excel (.xlsx), turns on Read the table in the Excel file and names the list portalInvoices. After the step, a Loop goes over the rows.
What should I watch for?
Section titled “What should I watch for?”- The file reaches the workflow only while Keep the file on the server is on. Turning on the download turns it on.
- Type the text each browser step needs exactly as the page expects it.
- Once saved, a password is never shown again. Typing a new one replaces it.
- Use a readable Excel file with a header row, so the list fills with its rows.