Convert Bank Statement
convert_statementConvert bank statement PDFs into structured financial data — transactions, accounts, and balances — with output in JSON, CSV, XLSX, QBO, or Xero. Turn statements into spreadsheets for analysis.
Instructions
Convert a bank statement PDF into structured data or a spreadsheet. When the user attaches a PDF in the conversation, it arrives automatically as pdf_file — never encode it yourself. Otherwise, pass pdf_url for a public HTTPS link. If your host has no way to reference the attached file at all (no pdf_file/pdf_url equivalent), call request_upload first and pass its upload_id here instead. The base64 pdf parameter is a last resort only, for a caller with no other way to reference the file. To convert several statements in one call, pass upload_ids (the array from a single request_upload call made with count set) instead of pdf/pdf_url/pdf_file/upload_id — mutually exclusive with those four. This batch form only ADMITS each file (queues it, or reports an already-completed duplicate) and returns immediately with a compact per-file status list plus a summary — it never waits for conversion, so call get_statement per document_id once ready rather than expecting inline results here. Returns accounts, transactions, and metadata. output_format "json" (default) returns the data inline, renderable in chat. The other formats (csv, xlsx, qbo, xero) return a time-limited download link instead: present it as a normal link. Every response includes a "summary" field: use it as the single source of truth for what happened. If the conversation is not in English, translate it faithfully into the conversation language; never add details it doesn't contain. Never echo raw status values (e.g. "completed") or field names. Consumes credits (1 per page). Page limit depends on your plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | Base64-encoded PDF content — last resort only; prefer pdf_file for an attachment or pdf_url for a link | ||
| pdf_url | No | HTTPS URL to fetch the PDF from | |
| password | No | Password for encrypted PDFs | |
| pdf_file | No | An attached PDF (populated automatically by ChatGPT — do not construct this yourself). | |
| upload_id | No | An upload_id from request_upload, after PUTting the file to its upload_url. Use this only when your host has no other way to reference the attached file (no pdf_file/pdf_url equivalent). | |
| upload_ids | No | Batch of upload_ids from a single request_upload(count) call, each already PUT to its own upload_url — converts many statements in one call. Mutually exclusive with pdf, pdf_url, pdf_file, and upload_id. Admission only: the response reports per-file status immediately, never waiting for conversion — fetch results per document_id via get_statement. | |
| output_format | No | Output format | json |