# Fetch supplier invoices from vendor portals into Xero

> Every weekday at 6am an AI browser agent logs into your supplier billing portals, downloads new invoices, and drafts each one as a bill in Xero for approval.

- Workflow type: agent
- Services: Browser Use Cloud, Xero, Slack Bot
- Categories: Finance, Operations
- Published: 2026-08-14

## What it does

- Logs into each of your supplier billing portals every weekday morning and downloads any invoice issued since the last run, using a saved browser profile so nobody has to re-enter passwords and verification codes every time.
- Reads the supplier, invoice number, issue and due dates, tax and total off each invoice, then checks the invoice number against Xero so the same bill never gets raised twice.
- Raises anything genuinely new as a draft bill in Xero against the right supplier, with line items, tax, due date and a link to the original PDF. Nothing is approved or paid automatically.
- Posts a Slack summary to your finance channel listing every bill it drafted, plus any portal it could not log into, any figure it was unsure about, and any invoice well above that supplier's usual amount.

## What you'll need

- A Browser Use Cloud account, which is what runs the AI browser agent
- Login details for each supplier portal you want collected, saved once into a browser profile so the agent can reuse them on later runs
- A Xero organisation connected with permission to read your contacts and to read and create bills
- A Slack workspace and the finance channel where the summary should be posted
- A list of the portals to cover, for example AWS, Google Workspace, Adobe, your telecom and utility accounts, and your trade wholesalers

## Prompt

Every weekday at 6am, collect the supplier invoices that never arrive by email because they only exist behind a vendor billing portal login. These are accounts like AWS, Google Workspace, Adobe, telecom and utility providers, and trade wholesalers. This workflow is deliberately the portal half of accounts payable, so it should not read any inbox or touch email at all.

Keep the portals in a configurable list I can extend without rewriting the workflow. Each entry has a supplier name, the portal URL, the Browser Use profile to use, and a note on where the billing or invoice history section lives on that site. Also store the timestamp of the last successful run per portal so each run only picks up what is new.

Use Browser Use for the collection. Look up the saved browser profile for each portal with List Profiles and Get Profile, and use Create Profile if one does not exist yet. The saved profile is the thing that makes this work in production, because it persists cookies and login state so a normal run does not re-trigger login and MFA on every site. Dispatch one Run Agent Task per portal against its profile, set keepAlive so a single browser session can walk several portals instead of paying a cold start each time, point the task at a persistent workspace so downloaded files survive between runs, and set maxCostUsd as a guard because this fans out across many sites.

Each agent task should navigate to the billing or invoice history section, download every invoice issued since that portal's last successful run into the persistent workspace, and read off the supplier, invoice number, issue date, due date, currency, subtotal, tax and total for each one. If a value is not clearly stated on the page, record it as unconfident rather than guessing.

Poll Get Session until the session leaves the running state, then read output and isTaskSuccessful to decide whether that portal succeeded. Once it has finished, call List Workspace Files with download URLs enabled so you get a presigned link to each downloaded PDF.

Before creating anything in Xero, check each invoice number against existing bills with List Invoices so nothing is raised twice, including invoices someone already entered by hand. For anything genuinely new, match the supplier to its Xero contact with List Contacts, then use Create Invoices to raise an ACCPAY bill with status DRAFT, with the line items, tax and due date filled in and the PDF download link in the reference field. Never approve, authorise or pay anything automatically. Everything lands as a draft so finance approves it, which is what makes this safe to run unattended.

Finish with a Slack message to the finance channel. List each drafted bill with supplier, amount and due date. Then call out separately, in their own clearly labelled sections, any portal login that failed or timed out, any field the agent could not read confidently, and any invoice more than 50 percent above that supplier's recent average based on their last few bills in Xero, so a human checks it before approving. Report failures loudly rather than skipping them quietly, because a portal that silently fails means a missed bill and a late payment, which is the exact failure mode this workflow exists to prevent.

## How to customize

- Change the schedule. Every weekday at 6am suits most finance teams, but you can run it once a week or only on the days your bills usually land.
- Add or remove portals. Any billing site a person can log into by hand can be added to the list, and each one gets its own pass.
- Move the review threshold. By default anything more than 50 percent above that supplier's recent average gets flagged for a human, and you can tighten or loosen that.
- Swap the accounting system. QuickBooks Online works the same way if you do not use Xero.

## FAQ

### Will this work if my supplier portal asks for a verification code?

Yes. You log in by hand once and that login state is saved into a browser profile the agent reuses on every later run, so a normal morning does not re-trigger login or two-factor at all. If a portal does force a fresh code, the run does not fail silently, that portal is called out in the Slack message so someone can log in again.

### Can it approve or pay any of these bills?

No. Every bill lands in Xero as a draft. A person still reviews and approves it, which is exactly what makes this safe to leave running unattended.

### What happens if a portal changes its layout?

The agent reads pages the way a person does rather than following a fixed script, so ordinary redesigns are usually fine. If it genuinely cannot find the billing section or download the file, that portal is reported in the Slack summary instead of being quietly skipped.

### Will it create duplicates if someone already entered an invoice by hand?

No. Every invoice number is checked against the bills already in Xero before anything is created, so an invoice you keyed in yourself is recognised and skipped.

### How is this different from forwarding invoice emails to my accounting system?

Email based workflows only ever see invoices that arrive in an inbox. This one covers the other half, the invoices that only exist behind a portal login and never get emailed to anyone, which is usually where late payments and missed bills come from.

Use this prompt in General Input: https://www.generalinput.com/prompts/fetch-supplier-invoices-from-vendor-portals-into-xero