← All work
Client engagement · 2023–24

Browser-Automation Bot for Government Tax-Filing Portals

An SMB accounting/fintech platform

Overview

A Cypress-driven automation service that logs into Ireland’s Revenue Online Service (ROS) tax portal on behalf of accounting clients, navigates the legacy filing UI, and extracts statutory returns and statements. Although built on a testing framework, it functions as a production RPA worker: a Hapi server fronts a BullMQ job queue that dispatches browser automation runs and pushes the harvested data back into the platform’s n8n pipelines.

The Challenge

Government tax portals expose no API. Pulling VAT, PAYE, Corporation Tax (CT1) and income data for hundreds of small-business clients meant a person logging in and clicking through the same screens repeatedly. The portal’s markup is fragile and session handling is finicky, so the automation had to be both unattended and robust.

What We Built

A suite of Cypress specs each modelling a distinct filing flow, vat-rtd_return, ct1_payment, ct1_return, ct1_financial_statement, income_payment, income_return, paye-emp_payment, paye-emp_return, statement, and registration-details. Custom commands (cy.rosLogin, cy.tryDifferentTaxLogin, cy.downloadCsvAndUploadToN8N) encapsulate authentication, tax-type switching, CSV download and hand-off to downstream workflows. The runner is wrapped by a Hapi web service (index.js) with a Bull Board dashboard and a BullMQ/fastq worker (worker.js) so jobs can be enqueued, monitored and retried; the whole thing ships as a Docker image with docker-compose for deployment.

Technologies & Approach

Cypress 13 provides the deterministic browser driver and download handling (via cypress-delete-downloads-folder); Hapi plus @hapi/basic exposes the control API and the Bull Board UI; BullMQ and fastq give durable, concurrency-controlled job processing. Parameterised registration numbers and environment-driven config let one codebase service many client accounts. Containerisation makes the headless-browser fleet reproducible.

Outcome / Impact

Turned a manual, error-prone portal-scraping chore into an unattended, queue-managed service that feeds the accounting platform’s document and tax pipelines. Demonstrated that a QA framework can be repurposed into reliable production RPA for systems that offer no integration surface.

Capabilities Demonstrated

  • Automating legacy, API-less government and enterprise web portals end to end
  • Repurposing Cypress as a hardened RPA engine rather than a test tool
  • Queue-backed, observable worker architecture (BullMQ + Bull Board + Hapi)
  • Dockerised, reproducible headless-browser automation
  • Integrating browser automation with downstream workflow orchestration
More work See all →