Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

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

  1. When a document is forwarded
  2. Normalize submission
  3. Has an image attached
  4. Build GPT-4o vision request
  5. Parse vision result
  6. Is the document readable
  7. Store record in Postgres
  8. Reattach parsed fields
  9. Email received summary to operations
  10. Email unrecognized notice to operations
  11. Daily follow-up sweep
  12. Find open documents from yesterday or earlier
  13. Are there open documents
  14. Build follow-up summary

17 steps in total.

Similar automations