Prerequisites
- Python 3.12+
- A Google Cloud SQL Postgres instance (and a service account JSON with access)
- An Azure AD app registration with
Mail.ReadandMail.ReadWritepermissions on the shared Outlook mailbox - Network access to:
graph.microsoft.comlogin.microsoftonline.comsqladmin.googleapis.com(for Cloud SQL Connector)
Set up the venv
src/ are picked up without re-installing.
Dependencies
Pulled in frompyproject.toml:
Dev deps:
pytest, pytest-cov.
Configure environment variables
Create a.env in the pipeline/ directory (or set them in your shell). Required variables:
Create the database tables
First-time setup:Base.metadata.create_all(engine) and exits. It’s idempotent — re-running on an existing schema is a no-op.
The 17 tables it creates:
Verify the install
Run a single email through end-to-end without touching Outlook:--file reads the body from disk, runs Parse → Map → Write, and exits. Useful for testing without consuming a real mailbox message.
Run the tests
PRAGMA foreign_keys=ON — no PostgreSQL needed.
See also
- Running — operational invocation patterns
- Configuration — every env var
- ETL stages — what happens internally