Skip to content

berendsshalai/onboarding-pilot-ai

Onboarding Pilot AI

Onboarding Pilot AI is a privacy-conscious, configuration-driven Python framework for converting structured records into validated, routed, templated and auditable email workflows.

Overview

The project provides a reusable engine for CSV, JSON, Excel and optional Google Sheets sources; declarative YAML workflows; header-based mapping; safe rules; recipient routing; Jinja2 templates; dry-run delivery; transport adapters; SQLite state; idempotency; and a transactional outbox.

Check my socials.

Every public link below belongs to the same body of work: code, professional context, live portfolio, learning notes and public identity.

GitHub: @berendsshalai LinkedIn: Sha-Lai Berends X: @berendsshalai Facebook: Sha-Lai Berends Instagram: @berendsshalai EasyEquities investor profile Portfolio website: Sha-Lai Berends

Why the Project Changed

The first public edition was an onboarding showcase. This branch generalizes the design into a community framework while preserving onboarding as a complete example workflow.

Core Capabilities

  • YAML workflow configuration validated by JSON Schema.
  • Header-based mapping with aliases, type conversion and required fields.
  • Safe rule evaluation without arbitrary code execution.
  • Configurable routing to direct recipients and recipient groups.
  • Jinja2 rendering with autoescaping and StrictUndefined.
  • Mock, filesystem, SMTP and Outlook transport adapters.
  • SQLite state, idempotency, outbox and retry/dead-letter foundations.
  • Privacy-safe logging helpers and redaction utilities.

Use Cases

Education administration, customer support, recruitment and onboarding, event registration, sales follow-up, project reporting, volunteer coordination, membership administration, invoice reminders, inventory alerts and internal approvals.

Architecture

flowchart LR
    A[Source Adapter] --> B[Schema Mapping]
    B --> C[Validation]
    C --> D[Transformations]
    D --> E[Rule Engine]
    E --> F[Recipient Router]
    F --> G[Jinja Renderer]
    G --> H[Safety Validator]
    H --> I[Transactional Outbox]
    I --> J[Transport Adapter]
    J --> K[SQLite Audit State]
Loading

Quick Start

python -m pip install -e ".[dev,excel]"
onboarding-pilot validate examples/onboarding/workflow.yml
onboarding-pilot preview examples/onboarding/workflow.yml
onboarding-pilot run examples/onboarding/workflow.yml --once

Installation

The package supports Python 3.11, 3.12 and 3.13. Optional integrations are installed through extras:

pip install -e ".[excel,google,outlook,dev]"

Creating a Workflow

Run onboarding-pilot init to create a starter workflow using synthetic data. Workflow files are declarative YAML and cannot execute Python code.

Workflow Configuration

Workflows define identity, source adapter, header mapping, conditions, routing, templates, delivery transport, safety limits, state and idempotency.

Source Adapters

Core adapters: json, csv, excel and optional google_sheets. Google Sheets is read-only and requires local credentials supplied outside the repository.

Routing Rules

Routes can use direct recipient templates, fixed groups, conditional rules, defaults, recipient deduplication, recipient limits and domain allowlists.

Email Templates

Templates use Jinja2 with autoescaping, strict missing-variable handling and safe filters such as format_date, default_text, join_values, mask_email and mask_phone.

Delivery Transports

mock is the default demonstration transport. filesystem writes local .eml files to ignored output folders. smtp and outlook are opt-in live transports.

Dry-Run and Live-Delivery Safety

Live delivery requires workflow safety settings and explicit CLI authorization. Tests and examples use mock or filesystem delivery only.

Privacy Model

Fixtures are synthetic and use .invalid domains. Logs avoid raw message bodies and include hashing/redaction helpers for identifiers and sensitive fields.

State and Idempotency

SQLite is the default state backend. It stores record fingerprints, hashed source identifiers, outbox rows and dead-letter metadata without raw record fields by default.

Example Workflows

  • examples/onboarding
  • examples/invoice-reminders
  • examples/course-registration
  • examples/event-confirmations
  • examples/customer-support-routing
  • examples/volunteer-coordination

CLI Reference

Commands: init, validate, preview, run --once, run --watch, doctor, replay and migrate-state.

Testing

ruff format --check .
ruff check .
mypy src
pytest --cov=onboarding_pilot --cov-report=term-missing
bandit -r src
pip-audit
python -m build

Plugin Development

Adapters and transports implement small protocols under onboarding_pilot.adapters. New integrations must keep external credentials outside workflow files and default to safe behavior.

Security

Never submit secrets, personal data or organizational records in public issues or pull requests. See SECURITY.md.

Contributing

Synthetic data, tests and documentation are required for contributions. See CONTRIBUTING.md.

Licence

Licensed under the Apache License, Version 2.0.

Independence and Non-Affiliation

This project is independently maintained and does not represent or imply affiliation with any employer, client, company, institution, professional group or third party.

Releases

Packages

Used by

Contributors

Languages