> Create a workflow to extract data from bank statements
●Let's inspect this bank statement and turn the repeatable parts into a workflow.
↳files_inspect{ "file_id": "stmt_042", "args": { "kind": "pdf_image", "pages": [1] } }
⎿3-page statement · checking account · May 2026 · two-column transaction table
●I need the stable anchors first: account holder, statement period, balances, and transaction rows.
↳files_grep{ "file_id": "stmt_042", "pattern": "Opening balance|Closing balance|Deposits|Withdrawals" }
⎿✓anchors found · opening balance · deposits · withdrawals · closing balance
●The layout is consistent. I'll create a workflow, then add a parse step that preserves line order before extraction.
↳workflows_create{ "name": "bank_statement_reconciliation" }
⎿✓workflow_id: wf_bank_stmt · draft created
↳workflows_nodes_add{ "workflow_id": "wf_bank_stmt", "kind": "parse", "name": "parse_statement_pages" }
⎿✓parse_statement_pages · page text and table lines preserved
●Next I need structured fields and transaction rows with dates, descriptions, debit, credit, and running balance.
↳workflows_nodes_add{ "kind": "extract", "schema": "bank_statement_v1" }
⎿fields: account_number · period_start_at · period_end_at · transactions[]
↳workflows_nodes_add{ "kind": "validate", "rule": "opening + credits - debits = closing" }
⎿✓balance_check · duplicate transaction guard · required date guard
●Let's run the sample through the draft workflow and see if the validation catches anything.
↳workflows_runs_create{ "workflow_id": "wf_bank_stmt", "file_id": "stmt_042" }
⎿run_91bd · parsing pages · extracting transactions
↳workflows_runs_get{ "run_id": "run_91bd" }
⎿✓status: completed · 143 transactions · balance_check passed
●Good. I'll add a review gate only for balance mismatches or rows with missing dates.
↳workflows_nodes_add{ "kind": "human_review", "when": "balance_check.failed || transactions[].date.missing" }
⎿✓review_bank_statement · triggers only on reconciliation failures
●Workflow drafted: bank statement reconciliation.[PDF bank statement]
|
v
[parse pages] -> [extract fields + transactions]
| |
v v
[balance check] ----fail----> [human review]
| pass
v
[clean transaction JSON] ▎