Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jbms/finance-dl/llms.txt

Use this file to discover all available pages before exploring further.

The finance_dl.ultipro_google scraper retrieves Google employee payroll statements in PDF format from the Ultipro portal using selenium and chromedriver. This page covers all configuration parameters, the output file naming convention, a ready-to-use config example, and how to invoke the scraper from the interactive shell.
This module is specifically designed for Google’s Ultipro setup at googlemypay.ultipro.com and uses Google’s OAuth login flow. It is not a generic Ultipro scraper and will not work for other organizations without modification.

Configuration Parameters

credentials
dict
required
A dictionary containing your Google account login credentials used to authenticate with the Ultipro portal.
output_directory
string
required
Path on the local filesystem where downloaded PDF payroll statements will be saved. The directory will be created automatically if it does not already exist.
profile_dir
string
Path to a persistent Chrome browser profile directory. This must be a path used exclusively for this scraper configuration — do not point it at your regular browser profile. When omitted, a fresh temporary profile is created on every run.
dir_per_year
bool
When True, payroll statement PDFs are organized into per-year subdirectories under output_directory (e.g., output_directory/2024/). When omitted or False, all PDFs are written directly into output_directory.
headless
bool
default:"True"
Controls whether Chrome runs in headless mode. Defaults to True, but setting this to False is recommended for more reliable scraping — see the tip below.
Set headless=False for greater reliability. The Ultipro scraper can encounter timing and rendering issues in headless mode. Running with a visible browser window (as shown in the example config) significantly reduces failed or incomplete downloads.

Output Format

Each payroll statement is saved as a PDF file in output_directory (or a per-year subdirectory if dir_per_year=True). Files are named using the following pattern:
%Y-%m-%d.statement-<id>.pdf
Where %Y-%m-%d is the pay date and <id> is the document number from the Pay History list on the Ultipro portal. The scraper skips statements that have already been downloaded, making subsequent runs fast and incremental.
In some cases, due to a bug in the Ultipro portal, the document number shown in the Pay History list may differ from the document number printed inside the actual PDF. These discrepancies are handled downstream by the beancount_import.source.ultipro_google module.

Config Example

def CONFIG_google_payroll():
    return dict(
        module='finance_dl.ultipro_google',
        credentials={
            'username': 'XXXXXX',
            'password': 'XXXXXX',
        },
        output_directory=os.path.join(data_dir, 'documents', 'Income', 'Google'),

        # profile_dir is optional but recommended.
        profile_dir=os.path.join(profile_dir, 'google_payroll'),

        # Recommended for greater reliability.
        headless=False,
    )

Interactive Shell

From the finance-dl interactive shell, start the scraper by calling:
self.run()

Build docs developers (and LLMs) love