> 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_blocks_create{ "workflow_id": "wf_bank_stmt", "type": "parse", "label": "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_blocks_create{ "workflow_id": "wf_bank_stmt", "type": "extract", "config": { "json_schema": "bank_statement_v1" } }
⎿fields: account_number · period_start_at · period_end_at · transactions[]
↳workflows_blocks_create{ "workflow_id": "wf_bank_stmt", "type": "function", "label": "balance_check" }
⎿✓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", "version": "draft", "inputs": { "start": "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_blocks_update{ "block_id": "extract_transactions", "config": { "review": { "predicate": { "kind": "validation_failed" } } } }
⎿✓config.review · triggers only on reconciliation failures
●Workflow drafted: bank statement reconciliation.[PDF bank statement]
|
v
[parse pages] -> [extract fields + transactions]
| |
v v
[balance check] ----fail----> [review gate]
| pass
v
[clean transaction JSON] ▎