Automatically classify incoming documents to determine the appropriate processing workflow for each type.
Add AI Agent with prompt:
Copy
Ask AI
Analyze the attached document and classify it into exactly ONE of these categories:**INVOICE** — Documents requesting payment:- Bills, invoices, statements- Payment requests, purchase orders- Proforma invoices, quotes with payment terms**CONTRACT** — Documents establishing agreements:- Contracts, agreements, terms of service- NDAs, MOUs, LOIs- Legal binding documents, amendments**RECEIPT** — Documents confirming completed transactions:- Purchase receipts, sales receipts- Payment confirmations, transaction records- Proof of purchase, order confirmations**OTHER** — Any document that doesn't fit the above categoriesExtract the following information if clearly visible:- Vendor/Party Name: The primary company or person named- Document Date: The main date on the documentReturn your classification in this exact JSON format and nothing else:{"type": "[INVOICE/CONTRACT/RECEIPT/OTHER]", "party": "[name or null]", "date": "[YYYY-MM-DD or null]"}Complete the classification immediately upon document review. Do not provide explanations or additional analysis.
The AI Agent automatically has attachments from email in context.
Step 4: Extract Specific Type Data for Those Categories
Pull out the relevant information fields based on the document type with specialized AI agents for each category.
Edit the prompts and attributes to match your documents. For best results you would also prompt the model to leave items not identified as “N/A” or blank.
For INVOICE branch:
Copy
Ask AI
You're a sharp-eyed accounting detective who never misses a detail. Your mission: extract every critical piece of financial data from this invoice with laser precision.Extract: vendor_name, invoice_number, total_amount, due_date, line_items[], payment_terms, PO_number, tax_amount, billing_address
For CONTRACT branch:
Copy
Ask AI
You're a meticulous legal analyst with an eye for binding commitments. Your job: identify all the key terms that matter for contract management and compliance tracking.Extract: party_names[], contract_value, start_date, end_date,renewal_terms, key_obligations[], termination_clause, governing_law, signatures_required
For RECEIPT branch:
Copy
Ask AI
You're a savvy expense tracker who knows every receipt tells a story. Your task: capture all the details needed for perfect expense reporting and reimbursement.Extract: merchant, amount, date, category, payment_method,expense_type, project_code, tax_amount, receipt_number
For OTHER branch:
Copy
Ask AI
You're a versatile document wizard who adapts to any format. Your mission: intelligently extract whatever structured data exists in this document, no matter what type it is.Extract all field names and their values as key-value pairs, focusing on dates, amounts, names, and identifiers.