Fetch supplier invoices from vendor portals into Xero

By General Input

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.

Integrations

  • Browser Use Cloud
  • Xero
  • Slack Bot

Type

Agentic Task

Categories

  • Finance
  • Operations

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.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seats