Schedule icon
Write icon
IonToExcel icon
ExcelToIon icon
Labels icon
Switch icon
SlackIncomingWebhook icon
Log icon

Excel Spreadsheet Data Drift and Integrity Sentinel

Audit financial Excel spreadsheets for data drift, extract multi-tab workbooks via streaming, verify round-trip fidelity, and alert Slack on corrupted records.

Categories
Data

Enterprise finance, accounting, and revenue operations (FP&A, SOX compliance reporting, commission reconciliation, and budgeting) rely overwhelmingly on Microsoft Excel (.xlsx) workbooks to exchange critical business metrics. Despite their ubiquity, spreadsheets are highly error-prone: unannounced column renaming, deleted tabs, formula calculation errors, empty rows, and silent formatting drift frequently corrupt downstream data warehouses and financial ledgers.

This sentinel workflow automates the validation and integrity gating of enterprise Excel spreadsheets. Using Kestra native Excel serialization tasks (ExcelToIon and IonToExcel), the workflow parses multi-sheet workbooks in streaming mode, enforces sheet presence and row threshold validation, performs bidirectional round-trip compilation to guarantee zero attribute loss, classifies spreadsheet health into tri-state operational tiers via Pebble logic, dispatches targeted Slack alerts, isolates corrupted files to quarantine, and records an immutable audit ledger.

How it works

  1. An automated Schedule trigger awakens the workflow periodically to inspect staged financial workbooks.
  2. Input financial datasets representing separate departmental ledgers (e.g., Q4_Revenue and Cost_Center_Expenses) are staged into internal storage.
  3. The compilation task io.kestra.plugin.serdes.excel.IonToExcel synthesizes a multi-sheet .xlsx workbook mapping each dataset to its designated sheet tab.
  4. The streaming parser io.kestra.plugin.serdes.excel.ExcelToIon reads the workbook with POI streaming optimization, parses named sheets, extracts structured records to individual Amazon Ion streams, and calculates total converted row counts.
  5. A verification task io.kestra.plugin.serdes.excel.IonToExcel re-compiles the parsed streams into a verification workbook, proving 100% bidirectional serialization fidelity.
  6. A Labels execution task evaluates extracted record volumes and sheet presence against required thresholds, assigning an operational status tier (COMPLIANT_SPREADSHEET, WARNING_THRESHOLD_DEFICIT, or CRITICAL_WORKBOOK_CORRUPTION).
  7. A Switch flow-control task directs execution: corrupted workbooks trigger immediate Slack incident alerts and payload quarantine, while compliant sheets trigger confirmation of readiness for downstream financial ledger loading.
  8. A final Log task outputs structured audit telemetry recording sheet URIs, converted record volumes, and execution timestamps.

What you get

  • Automated streaming validation of multi-tab Excel workbooks without requiring desktop Excel or heavy Windows environments.
  • Guaranteed zero-loss verification by asserting round-trip parity between raw spreadsheet cells and structured records.
  • Proactive detection of missing tabs, truncated data dumps, or corrupted workbooks before loading into data warehouses.
  • Instant Slack alerts sent to financial operations teams with root-cause diagnostic metadata and execution references.
  • Immutable audit ledger tracking every spreadsheet verification cycle, record count, and quarantine event.

Who it's for

  • Financial Operations (FinOps) and FP&A Engineers managing corporate budget models and revenue reporting.
  • Data Engineers building ingestion pipelines from partner and vendor Excel drops into Snowflake or BigQuery.
  • Compliance and Risk Officers requiring auditable verification of financial data integrity and spreadsheet governance.

Why orchestrate this with Kestra

  • Declarative YAML orchestration replaces fragile Python pandas/openpyxl scripts with maintainable, automated workflows.
  • Built-in pure-Java streaming Excel primitives (ExcelToIon, IonToExcel) eliminate external container dependencies and Python memory leaks on large sheets.
  • Native internal storage abstraction manages large workbooks and quarantined artifacts securely across distributed worker clusters.
  • Centralized namespace secrets management securely masks webhook credentials and accounting service tokens.

Prerequisites

  • Kestra instance with default storage enabled (local or cloud storage backend).
  • An incoming Slack webhook URL for alert routing.

Secrets

  • SLACK_WEBHOOK_URL: Incoming webhook URL for posting financial spreadsheet integrity alerts to the operations channel (required).

Quick start

  1. Configure the SLACK_WEBHOOK_URL secret in your Kestra namespace.
  2. Import this blueprint into your Kestra instance.
  3. Click Execute with default parameters (simulate_corrupted_workbook: false) to verify multi-tab compilation, streaming extraction, round-trip re-compilation, and audit logging.
  4. Run an execution with simulate_corrupted_workbook: true to verify that the sentinel catches corrupted workbooks, creates quarantine artifacts, and dispatches Slack incident alerts.
  5. Enable the scheduled trigger for continuous automated spreadsheet monitoring.

How to extend

  • Connect downstream database loading tasks (e.g., PostgreSQL, Snowflake, ClickHouse) inside the COMPLIANT_SPREADSHEET branch to load verified sheets into data warehouse tables.
  • Add column schema validation rules using Pebble conditions to verify specific financial headers (e.g., deal_id, amount, currency).
  • Integrate automated PagerDuty alerts inside the CRITICAL_WORKBOOK_CORRUPTION branch for critical month-end close accounting deadlines.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.