About Services Tools Blog Contact us

Billing Portal Invoice Download

Scheduled jobs sign in to supplier billing pages in Safari and save only the invoice PDFs that are not already in the archive.

  • Browser & Desktop Automation
  • Professional services
  • Scheduled worker
  • Productised
  • Local/private
  • 2026

The problem

Some suppliers will not email a stable invoice file, so someone has to take the PDF from a logged-in billing page every month. Without a record of what was already saved, the next run would archive the same file again.

What it does

A job opens the billing history in Safari. If the session has signed out, a companion tool finds buttons by their on-screen text and clicks them, including a human-check box, then reads a sign-in code from email when one is sent. New PDFs are saved under a dated name, and the next run skips any invoice already on the record.

Outcomes

  • Only new invoice PDFs are saved.
  • A signed-out portal is signed in again from the desktop session.
  • Public payment links and in-page downloads share one record of saved invoices.

Simplified mockup

Interactive preview with sample data. Nothing is sent to a server.

Billing history

Session signed in
On the portals
6
Already archived
2
Not in the manifest
4
Two suppliers, one manifest
DateSupplierRouteRefAmountState
12 Apr 2026North Quay StudioIn-pageNQ-4418£186.00 Kept
12 May 2026North Quay StudioIn-pageNQ-4490£186.00 New
12 Jun 2026North Quay StudioIn-pageNQ-4602£214.80 New
2 Mar 2026Field LedgerLinkFL-2201£49.00 Kept
2 Jul 2026Field LedgerLinkFL-2388£49.00 New
2 Aug 2026Field LedgerLinkFL-2410£49.00 New
In-page is the download control on the billing page. Link is a public payment URL. Both write the same manifest.
This run
Ready. Two identities are already archived.

Logged-out portal

Field Ledger drops the session. The job finds Sign in by the on-screen words, sends a real click to the human-check box, then reads the code from the mailbox.

Field Ledger · billing history · signed out

Sign in to download invoices

This box ignores synthetic clicks. The companion clicks it from the screen.

Waiting to sign in

Dated archive

Files are named by invoice date, because a supplier reference can repeat. The manifest stores the identity, so the next run skips it.

2026-04-12-north-quay.pdf
NQ-4418 · in-page download
Kept
2026-03-02-field-ledger.pdf
FL-2201 · public link
Kept

How it works

  1. Open the supplier billing history in Safari.
  2. If signed out, click through the sign-in, including a box that ignores automated clicks.
  3. Read a sign-in code from email when the supplier sends one.
  4. Download each invoice, from a public payment link or from the page's own button.
  5. Name the file by date and add the invoice to the record of what is saved.
  6. Skip any invoice already archived on the next run.

Pipeline

flowchart LR
  A[BillingPage] --> B[Session]
  B --> C[SignIn]
  C --> D[Download]
  D --> E[Manifest]
  E --> F[Archive]
  E --> G[Skip]