Receipt-to-Expense Analysis: Multi-Bot Automation Pipeline
Connect three specialized Poe bots into a zero-code document pipeline. In this worked guide, we take a photographed receipt, extract clean structured JSON, validate the merchant tax ID format, and query quarterly expense aggregates using natural language.
Pipeline Architecture
Step 1: Ingest
OCR-Doc-Parser
Image → Validated JSON
Step 2: Validate
Regex-Gen-Tester
Format Check on Tax ID / SKU
Step 3: Analyze
English-To-SQL
Schema Query in SQLite Sandbox
Step 1: Extract Receipt to Structured JSON with OCR-Doc-Parser
Upload your receipt image to @OCR-Doc-Parser with this prompt:
Extract this receipt to structured JSON with vendor, date, line items, and tax reconciliation.
Verified Result extracted from sample bill:
{
"vendor": "OFFICE SUPPLY DEPOT",
"tax_id": "27AAPFU0912K1ZV",
"date": "2026-03-12",
"items": [
{ "name": "Laser Toner Cartridge", "qty": 2, "price": 45.00 },
{ "name": "Recycled Paper Box", "qty": 5, "price": 8.50 }
],
"subtotal": 132.50,
"tax": 11.93,
"total": 144.43,
"reconciliation": "balanced"
}
Step 2: Validate Tax ID Format with Regex-Gen-Tester
Verify the 15-character GST/Tax format extracted above via @Regex-Gen-Tester:
Write regex for 15-character GSTIN tax ID: 2 digits state code, 10 alphanumeric PAN, 1 entity code, 1 Z, 1 check digit. Test sample: 27AAPFU0912K1ZV
Pattern generated and executed:
Pattern: ^[0-9]{2}[A-Z]{5}[0-9]{4}[A-Z]{1}[1-9A-Z]{1}Z[0-9A-Z]{1}$
Sample: 27AAPFU0912K1ZV -> MATCH (Verified format)
Step 3: Analyze Spending Trends with English-To-SQL
Now insert the validated JSON row into an expenses table and run natural language queries in @English-To-SQL:
Copyable Schema & Prompt
CREATE TABLE expenses ( id INTEGER PRIMARY KEY, vendor TEXT, category TEXT, expense_date DATE, amount REAL ); INSERT INTO expenses VALUES (1, 'OFFICE SUPPLY DEPOT', 'Supplies', '2026-03-12', 144.43), (2, 'CLOUD HOSTING INC', 'Software', '2026-03-01', 350.00), (3, 'COFFEE ROASTERS', 'Meals', '2026-03-05', 42.10), (4, 'OFFICE SUPPLY DEPOT', 'Supplies', '2026-02-18', 85.00); Question: What is total spend by category, and what percentage of total spend does each represent?
Verified Result executed in sandbox:
SELECT category, ROUND(SUM(amount), 2) AS total_spent, ROUND(SUM(amount) * 100.0 / (SELECT SUM(amount) FROM expenses), 1) AS pct_of_total FROM expenses GROUP BY category ORDER BY total_spent DESC; Verified Results: | category | total_spent | pct_of_total | | Software | 350.00 | 56.3% | | Supplies | 229.43 | 36.9% | | Meals | 42.10 | 6.8% |
Start Automating on Poe Today
All three bots are live, free to test, and require zero credit cards or backend infrastructure setup.