Email Automation
Turn forwarded business document images into structured records with gpt-5.6-terra
When an API call/webhook arrives, it handles email with OpenAI / ChatGPT and Claude using Gmail, Postgres.
What it does
## 08-23-01 turn forwarded business documents into structured records with AI ### How it works 1. Forward any business document (receipt, invoice, contract, ID, bank statement, bill) as a photo or screenshot to a webhook. 2. The workflow validates that an image arrived, then sends it to GPT-4o Vision to classify the document type and extract the key fields into a structured record. 3. The record is stored in Postgres, then posted to a Discord channel and emailed to the operations inbox. 4. If the image is unreadable, the team is alerted on Discord and by email so nothing is lost. 5. A daily 8am sweep finds documents still open from the previous day or earlier and sends a follow-up reminder on Discord and by email, or an all-clear when nothing is pending. ### Setup steps 1. Create the Postgres table biz_documents (see notes in registry). 2. Point the webhook at your capture channel (Zapier, Make, email parser, or a phone number that forwards to the URL). 3. Set the Discord channel, the operations email, and the OpenAI credential (gpt-4o vision). 4. Activate. Forward a test receipt and confirm it appears in Postgres, Discord, and email. ### Customization - Change doc_type routing to push invoices to accounting and contracts to legal. - Add an Airtable or Sheets mirror for non-technical reporting. - Swap the vision model for Gemini or Claude if you prefer.
The steps
- When a document is forwarded
- Normalize submission
- Has an image attached
- Build GPT-4o vision request
- Parse vision result
- Is the document readable
- Store record in Postgres
- Reattach parsed fields
- Email received summary to operations
- Email unrecognized notice to operations
- Daily follow-up sweep
- Find open documents from yesterday or earlier
- Are there open documents
- Build follow-up summary
17 steps in total.
Similar automations
Email AutomationSplit shared rental utility bills with gpt-5.6-terra Vision, Postgres and Gmail29 stepsEmail AutomationVerify photo proof of delivery with gpt-5.6-terra, Google Sheets, Gmail and Telegram47 stepsEmail AutomationChase missing tax documents with Airtable, gpt-5.6-terra, Gmail and Telegram32 stepsEmail AutomationGenerate move-out deposit statements with gpt-5.6-terra, Gmail, and Google Sheets26 steps