Book bank statement PDF as journal
pdf_bank_to_journalConvert digital bank statement PDFs into journal entries or Norma 43 files, validating balances and flagging mismatched rows for reliable bookkeeping import.
Instructions
Read a digital bank statement PDF (Revolut, Wise, N26, CaixaBank, BBVA, Santander... downloaded from online banking, with selectable text) and turn it into journal entries or a Norma 43 file.
Deterministic: the movements table is located by its header (Fecha, Concepto, Cargo/Abono or Importe, Saldo)
and each value is read from its column. No OCR and no AI: scanned PDFs are refused, not guessed. Every row is
checked: previous balance + amount = printed balance, and opening + money in - money out = closing balance.
Rows that do not add up are booked but listed in flagged_rows with status "mismatch"; rows whose sign
(cargo/abono) cannot be proven go to status "review" and are NOT booked. Check balance_check.balanced.
Args: content_base64: The PDF file bytes in base64. target_format: contasol (APU.ods, default) | a3 | contaplus_csv | contaplus_ascii | csv | quickbooks_iif | quickbooks_csv | xero_csv | norma43 (a .n43 file to import in any program that reads Cuaderno 43). bank_account: The 572 subaccount of the bank (default 57200001). rules / suspense_account / open_items / window_days: As in bank_to_journal. strict_balance: true refuses to produce any file (and charges nothing) unless every row and the closing balance add up. account_ccc: For norma43 when the PDF has no Spanish IBAN: 20-digit CCC for record 11. holder: Account holder name for the Norma 43 header (optional).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content_base64": "<content_base64>"
},
"name": "pdf_bank_to_journal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | No | ||
| holder | No | ||
| a3_format | No | ||
| date_style | No | ||
| open_items | No | ||
| account_ccc | No | ||
| window_days | No | ||
| bank_account | No | 57200001 | |
| company_code | No | 00001 | |
| account_split | No | ||
| decimal_comma | No | ||
| target_format | No | contasol | |
| xero_tax_rate | No | No VAT | |
| account_digits | No | ||
| content_base64 | Yes | ||
| strict_balance | No | ||
| use_value_date | No | ||
| suspense_account | No | ||
| start_entry_number | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||