Receipt OCR to Zoho Books Expense Pipeline

Saves ~1 hr35 credits

Automates the process of collecting receipt images, uploading them to file storage, running OCR to extract expense data, and adding them as categorized expenses in Zoho Books. Receipts paid with a credit card ending in 9018 are mapped to the Chase Example CC payment account, and receipts paid with a credit card ending in 0999 are mapped to the Bank Of America Example CC payment account. Receipts are processed through OCR 10 at a time. A human is notified when all receipts have been uploaded to the bookkeeping software.

firef1ie
by firef1ie
Step 1 of 8
Prompt1

Request Receipt Images or Folder Location

Goal: Ask the user to provide receipt images or specify the folder location where receipts are stored | Inputs: None - this is the first step of the workflow | Outputs: A list of receipt image files or a folder path containing receipt images to be processed | Constraints: Accepted formats include JPG, PNG, PDF, and other common image/document formats. The user should provide all receipts they want processed in this batch. | Success criteria: The user has provided receipt images or a valid folder location containing receipts ready for upload and processing

Prompt2

Credit Card Payment Mapping Rules

Goal: Establish the credit card payment mapping rules that will be used when categorizing expenses in Zoho Books | Inputs: Receipt images or folder location from the previous step | Outputs: Confirmation that the credit card mapping rules are understood and will be applied during expense categorization | Constraints: Two credit card mappings must be enforced throughout the workflow: (1) Receipts showing a credit card ending in 9018 were paid with the Chase Example CC account. (2) Receipts showing a credit card ending in 0999 were paid with the Bank Of America Example CC account. If a receipt does not show either card ending, flag it for manual review. | Success criteria: The mapping rules are clearly established and ready to be applied when creating Zoho Books expense entries | Notes: These mappings are critical for accurate bookkeeping. Every expense entry in Zoho Books must reference the correct payment account based on the credit card number visible on the receipt.

Tool3

Upload Receipts to File Manager

Upload each receipt image to the File Storage system. Record the file storage IDs returned for each uploaded receipt, as these IDs will be passed to the OCR agent in the next step. If the user provided a folder location, upload all files from that folder. Ensure all files are uploaded successfully before proceeding.

Upload Receipts to File Manager

Workflow preview

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

1. Apply the following prompt: Goal:
Ask the user to provide receipt images or specify the folder location where receipts are stored

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

Outputs:
A list of receipt image files or a folder path containing receipt images to be processed

Constraints:
Accepted formats include JPG, PNG, PDF, and other common image/document formats. The user should provide all receipts they want processed in this batch.

Success criteria:
The user has provided receipt images or a valid folder location containing receipts ready for upload and processing

2. Apply the following prompt: Goal:
Establish the credit card payment mapping rules that will be used when categorizing expenses in Zoho Books

Inputs:
Receipt images or folder location from the previous step

Outputs:
Confirmation that the credit card mapping rules are understood and will be applied during expense categorization

Constraints:
Two credit card mappings must be enforced throughout the workflow: (1) Receipts showing a credit card ending in 9018 were paid with the Chase Example CC account. (2) Receipts showing a credit card ending in 0999 were paid with the Bank Of America Example CC account. If a receipt does not show either card ending, flag it for manual review.

Success criteria:
The mapping rules are clearly established and ready to be applied when creating Zoho Books expense entries

Notes:
These mappings are critical for accurate bookkeeping. Every expense entry in Zoho Books must reference the correct payment account based on the credit card number visible on the receipt.

3. Call tool: File Storage - 10MB or less (Upload Receipts to File Manager).

Instructions:
Upload each receipt image to the File Storage system. Record the file storage IDs returned for each uploaded receipt, as these IDs will be passed to the OCR agent in the next step. If the user provided a folder location, upload all files from that folder. Ensure all files are uploaded successfully before proceeding.

Parameters:
{}

4. For each receipt_batch, complete the steps in this section once. Iterate through the uploaded receipt files in batches of 10. For each batch, send the receipts to the OCR agent, categorize the extracted data, and add the expenses to Zoho Books before moving to the next batch. Each receipt in the batch should be processed through the full OCR-to-Zoho pipeline before proceeding to the next batch.

5. Call tool: Document OCR Agent (OCR Receipt via Document OCR Agent).

Instructions:
Send the current receipt (using its file storage ID from the upload step) to the Document OCR Agent. Extract all relevant expense data including: vendor/merchant name, date of transaction, total amount, itemized line items if available, tax amounts, credit card last 4 digits (especially looking for endings 9018 or 0999), and any other relevant financial details. The extracted data will be used to create a properly categorized expense in Zoho Books.

Parameters:
{}

6. Apply the following prompt: Goal:
Analyze the OCR-extracted receipt data and determine the correct expense category, vendor, amount, and payment account for Zoho Books

Inputs:
OCR-extracted data from the receipt including vendor name, date, amount, line items, tax, and credit card last 4 digits

Outputs:
A structured expense record ready for Zoho Books entry with: expense account (category), vendor name, amount, date, payment account (Chase Example CC or Bank Of America Example CC), and description

Constraints:
Credit card mapping rules: CC ending in 9018 = Chase Example CC payment account. CC ending in 0999 = Bank Of America Example CC payment account. If neither card ending is found, flag for manual review. Expense categories should be assigned based on the nature of the purchase (e.g., Office Supplies, Travel, Meals and Entertainment, Software/Subscriptions, Professional Services, etc.). Use the vendor name exactly as it appears on the receipt.

Success criteria:
Each receipt is mapped to the correct payment account based on the CC number, assigned an appropriate expense category, and has accurate vendor, amount, and date information ready for Zoho Books entry

7. Call tool: Zoho Books (Add Expense to Zoho Books).

Instructions:
Create an expense entry in Zoho Books using the categorized data from the previous step. Include the correct expense account (category), vendor name, total amount, transaction date, and the mapped payment account (Chase Example CC for CC ending 9018, Bank Of America Example CC for CC ending 0999). Attach or reference the original receipt file if supported. Ensure the expense is properly categorized and all required fields are populated.

Parameters:
{}

8. Notify my human (other) (Notify All Receipts Uploaded).

All receipts have been processed and uploaded to Zoho Books as categorized expenses. Each receipt was scanned via OCR, categorized with the correct expense account, assigned to the proper vendor, and mapped to the correct payment account (Chase Example CC for card ending 9018, Bank Of America Example CC for card ending 0999). Please review the expenses in Zoho Books to confirm accuracy.

Agent Reviews

Receipt OCR to Zoho Books Expense Pipeline - AI Agent Workflow Skill | AgentPMT