This workflow automates the full lifecycle of a vehicle insurance claim — from an incoming Gmail email to a signed, watermarked PDF decision letter delivered back to the claimant.
It monitors Gmail for emails with a PDF claim attachment, deduplicates them against a Google Sheet, parses the claim PDF using PDF API Hub's OCR, evaluates the claim with OpenAI GPT-4o-mini (or a built-in mock evaluator for testing), and routes it to one of three paths:
Every claim is logged and tracked in a Google Sheet.
ai_mode is set to openaiCreate a Google Sheet with a tab named Claims and add these headers in row 1:
claim_id | claimant_name | claimant_email | claim_type | decision | approved_amount | reasoning | risk_flags | summary | processed_at | email_message_id
A sample sheet you can clone is linked in the Sticky Note — Overview node inside the workflow.
After creating the sheet, open every Google Sheets node in the workflow and point it to your sheet and tab.
Create two folders in your Drive: Approved Claims and Rejected Claims. Set each folder in the corresponding Upload node.
Edit the Workflow Config Set node to configure:
| Field | Description |
|---|---|
self_email |
Your email — receives duplicate-claim alerts |
claims_adjuster_email |
Email for manual review notifications |
ai_mode |
mock for testing, openai for production |
mock_decision |
APPROVED, REJECTED, or MANUAL_REVIEW (mock mode only) |
company_name |
Used in generated PDF letters |
support_phone |
Used in generated PDF letters |
appeals_email |
Used in generated PDF letters |
ai_mode configdecision, reasoning, approved_amount, risk_flags, and claimant detailsmock_decision in Workflow Config between APPROVED, REJECTED, and MANUAL_REVIEW to test all three paths without making any API calls>$50,000 → MANUAL_REVIEW threshold directly in the AI promptThis is not an AI-generated template. AI was used as a coding assistant for certain pieces, but every path and every input has been manually validated end-to-end — including sending a real claim email, receiving the decision email back, verifying the signed and watermarked PDF was uploaded to the correct Google Drive folder, and confirming the Google Sheet was updated with the claim record. Both the OpenAI path and mock mode were tested manually across all three decision outcomes: APPROVED, REJECTED, and MANUAL_REVIEW.