Bank Statement OCR and Account Reconciliation

Saves ~45 min45 credits

Automates bank account reconciliation in Zoho Books. Accepts bank statement files (PDF, images, scans) from the user, uploads them to file storage, runs OCR to extract transaction data, then cross-references extracted transactions against unmatched bank feed transactions in Zoho Books. For each unmatched transaction, finds potential matching records (expenses, invoices, payments) and reconciles them. Generates a reconciliation summary and notifies the user when complete.

firef1ie
by firef1ie
Step 1 of 12
Prompt1

Request Bank Statements and Account

Goal: Ask the user to provide bank statement files and identify which Zoho Books bank account these statements belong to | Inputs: None - this is the first step of the workflow | Outputs: Bank statement files (PDFs, images, or scans) and the name or ID of the Zoho Books bank account to reconcile | Constraints: Accepted formats include PDF, JPG, PNG, and other common document formats. The user must specify which bank account in Zoho Books these statements correspond to (e.g., Chase Example CC, Bank Of America Example CC, BMG - Mercury - Checking, etc.). If the user is unsure, list the available bank accounts from Zoho Books to help them choose. | Success criteria: The user has provided one or more bank statement files and clearly identified the target Zoho Books bank account for reconciliation

Tool2

Upload Statements to File Storage

Upload each bank statement file to File Storage. Record the file storage IDs for each uploaded statement, as these will be passed to the OCR agent. Ensure all files are uploaded successfully before proceeding.

Upload Statements to File Storage
Tool3

OCR Bank Statements

Send each uploaded bank statement to the Document OCR Agent using document_type 'bank_statement' for specialized extraction. Extract all transaction data including: transaction dates, descriptions/payees, amounts, debit/credit type, running balances, and any reference numbers. Process up to 10 statement pages at a time using the file_ids array parameter.

OCR Bank Statements

Workflow preview

What the agent will follow (tools, prompts, and workflow steps).

1. Apply the following prompt: Goal:
Ask the user to provide bank statement files and identify which Zoho Books bank account these statements belong to

Inputs:
None - this is the first step of the workflow

Outputs:
Bank statement files (PDFs, images, or scans) and the name or ID of the Zoho Books bank account to reconcile

Constraints:
Accepted formats include PDF, JPG, PNG, and other common document formats. The user must specify which bank account in Zoho Books these statements correspond to (e.g., Chase Example CC, Bank Of America Example CC, BMG - Mercury - Checking, etc.). If the user is unsure, list the available bank accounts from Zoho Books to help them choose.

Success criteria:
The user has provided one or more bank statement files and clearly identified the target Zoho Books bank account for reconciliation

2. Call tool: File Storage - 10MB or less (Upload Statements to File Storage).

Instructions:
Upload each bank statement file to File Storage. Record the file storage IDs for each uploaded statement, as these will be passed to the OCR agent. Ensure all files are uploaded successfully before proceeding.

Parameters:
{}

3. Call tool: Document OCR Agent (OCR Bank Statements).

Instructions:
Send each uploaded bank statement to the Document OCR Agent using document_type 'bank_statement' for specialized extraction. Extract all transaction data including: transaction dates, descriptions/payees, amounts, debit/credit type, running balances, and any reference numbers. Process up to 10 statement pages at a time using the file_ids array parameter.

Parameters:
{"document_type": "bank_statement"}

4. Apply the following prompt: Goal:
Parse the raw OCR-extracted bank statement data into a clean, structured list of individual transactions

Inputs:
Raw OCR output from the bank statement including extracted text, entities, and line items

Outputs:
A structured list of transactions, each with: date, description/payee, amount, type (debit or credit), and reference number if available

Constraints:
Every transaction on the statement must be captured. Amounts must be accurate to the cent. Debits and credits must be correctly identified. If the OCR output is ambiguous for any transaction, flag it for manual review rather than guessing. Sort transactions by date.

Success criteria:
All transactions from the bank statement are parsed into a clean structured format ready for matching against Zoho Books records

5. Call tool: Zoho Books (List Uncategorized Bank Transactions in Zoho).

Instructions:
List the uncategorized (unmatched) bank transactions in Zoho Books for the bank account the user specified. Use action 'list_records' with resource 'banktransactions' and filter by the target bank account ID and status 'uncategorized'. Retrieve all unmatched transactions using pagination if needed (per_page: 200). These are the transactions from the bank feed that need to be matched to existing Zoho Books records (expenses, invoices, payments, etc.).

Parameters:
{}

6. Apply the following prompt: Goal:
Cross-reference the OCR-extracted bank statement transactions against the uncategorized Zoho Books bank feed transactions to identify matching pairs ready for reconciliation

Inputs:
1) Structured list of transactions parsed from the OCR'd bank statement. 2) List of uncategorized bank transactions from Zoho Books bank feed.

Outputs:
A list of matched transaction pairs (statement transaction matched to Zoho bank feed transaction ID), plus a list of unmatched transactions from either side that need manual review

Constraints:
Match transactions by comparing date, amount, and description/payee. Amounts must match exactly. Dates should match within 1-2 business days to account for processing delays. If multiple potential matches exist for a single transaction, flag it for manual review rather than auto-matching. Track three categories: (1) confident matches, (2) ambiguous matches needing review, (3) completely unmatched transactions.

Success criteria:
Every uncategorized Zoho bank transaction is either matched to a statement transaction with high confidence, flagged as ambiguous, or identified as unmatched. No false matches.

7. For each matched_transaction, complete the steps in this section once. Iterate through each confidently matched transaction pair. For each one, look up potential matching records in Zoho Books and execute the reconciliation. Skip any transactions flagged as ambiguous - those will be reported to the human for manual review.

8. Call tool: Zoho Books (Get Matching Records from Zoho Books).

Instructions:
For the current uncategorized bank transaction, use action 'bank_get_matching_transactions' with the transaction's record_id to find existing Zoho Books records (expenses, invoices, bills, payments) that could match this bank transaction. The API returns potential matches ranked by confidence.

Parameters:
{}

9. Apply the following prompt: Goal:
Evaluate the potential matching records returned by Zoho Books and select the best match for reconciliation

Inputs:
List of potential matching records from bank_get_matching_transactions, plus the original bank statement transaction data from OCR

Outputs:
Either: (1) the selected best match with its transaction_id and transaction_type ready for bank_match_transaction, or (2) a flag indicating no confident match was found and this transaction should be reported for manual review

Constraints:
Only select a match if the amount matches exactly and the date is within a reasonable range (1-3 business days). Verify the payee/description is consistent. If multiple records match equally well, flag for manual review. If no matches are returned or none are confident, skip this transaction and add it to the manual review list.

Success criteria:
A single best matching record is selected with high confidence, or the transaction is correctly flagged for manual review

10. Call tool: Zoho Books (Reconcile Transaction in Zoho Books).

Instructions:
Execute the reconciliation using action 'bank_match_transaction'. Pass the uncategorized bank transaction's record_id and the payload containing the selected matching record: {"transactions_to_be_matched": [{"transaction_id": "<matched_record_id>", "transaction_type": "<type>"}]}. The transaction_type should be the Zoho Books record type (e.g., 'expense', 'invoice', 'bill', 'vendor_payment', 'customer_payment'). Only execute if the evaluate step selected a confident match - skip if flagged for manual review.

Parameters:
{}

11. Apply the following prompt: Goal:
Generate a clear reconciliation summary report showing what was matched, what was flagged, and what remains unmatched

Inputs:
Results from all reconciliation attempts: successful matches, skipped/ambiguous transactions, unmatched transactions from both the bank statement and Zoho Books

Outputs:
A structured reconciliation report with: (1) count and list of successfully reconciled transactions with amounts, (2) count and list of ambiguous transactions needing manual review with the reason, (3) count and list of completely unmatched transactions, (4) total reconciled amount vs total statement amount, (5) reconciliation completion percentage

Constraints:
The report must be accurate and account for every transaction. Do not overstate the reconciliation rate. Clearly explain why any transaction was flagged or left unmatched.

Success criteria:
A complete, accurate reconciliation report that gives the user full visibility into what was done and what still needs attention

12. Notify my human (other) (Notify Reconciliation Complete).

Bank account reconciliation is complete. A reconciliation summary has been generated showing all matched, flagged, and unmatched transactions. Please review the summary and manually handle any transactions that were flagged for review or left unmatched. Check your Zoho Books bank feed to verify the reconciled transactions.

Agent Reviews