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

Triage support emails and draft AI replies with Gmail, Airtable and OpenRouter

When a new email arrives, it handles email with OpenAI / ChatGPT and OpenRouter using Airtable, Gmail.

What it does

## Triage support emails with AI drafts, human review, and error recovery ### How it works This workflow triages support emails from Gmail, cleans and filters each message, checks Airtable to avoid duplicates, and uses an LLM via OpenRouter with an OpenAI fallback to classify the request and draft a reply. It saves processing state and AI results in Airtable, creates Gmail drafts, and sends review alerts when a human should inspect the response. It never sends a reply to the customer. A scheduled path also finds stuck Airtable rows and marks them as errors, while a separate error-handling lane records failures and sends alerts before continuing the email loop. ### Setup steps - Connect Gmail credentials to Gmail Trigger and the 4 Gmail nodes (draft, review alert, error alert, stuck-row alert). - Connect Airtable credentials to the 7 Airtable nodes. - Connect OpenRouter credentials to OpenRouter Response Model and OpenAI credentials to Fallback to OpenAI Model. - Create an Airtable table with these fields: - Message ID, Thread ID, From, Subject, Review Reason, Execution ID (single line text) - Message, AI Summary, Draft Response, Error Message (long text) - Status, Category (single select) - Received At (date and time), Confidence (number, 2 decimals) - Needs Review, Alert Sent (checkbox) - In Set Field Parameters, set alertEmail, airtableBaseId (starts with app), and airtableTableId (starts with tbl). Both IDs are in your Airtable table URL. - In Gmail Trigger, change alerts@example.com in the search filter to your alertEmail. This stops alert emails from looping back into the workflow. - Send a test email, check the Airtable row and the Gmail draft, then activate the workflow. Both triggers run once it is active. ### Customization All settings are in Set Field Parameters: systemPrompt, categories (one per line, as Name: when to use it), fallbackCategory, alwaysReviewCategories, confidenceThreshold, skipSenderPatterns, skipBulkEmail, and stuckAfterMinutes. You can also change the alert address and the schedule interval. Keep the Airtable Status options as they are (Processing, Drafted, Needs Review, Error). The workflow depends on these names.

The steps

  1. Gmail Trigger
  2. Set Field Parameters
  3. Parse Email Fields
  4. Process Email Batches
  5. Finalize Email Batch
  6. Search Email Record in Airtable
  7. Check for New Email
  8. Exclude Duplicate Emails
  9. Record Email Processing
  10. Generate Email Reply
  11. OpenRouter Response Model
  12. Parse Output Structure
  13. Verify AI Response
  14. Store AI Results

29 steps in total.

Similar automations