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
- Gmail Trigger
- Set Field Parameters
- Parse Email Fields
- Process Email Batches
- Finalize Email Batch
- Search Email Record in Airtable
- Check for New Email
- Exclude Duplicate Emails
- Record Email Processing
- Generate Email Reply
- OpenRouter Response Model
- Parse Output Structure
- Verify AI Response
- Store AI Results
29 steps in total.
Similar automations
Email AutomationTriage Gmail inbox, label emails, and draft replies with OpenAI10 stepsCustomer Support & HelpdeskTriage complaints and draft cited replies with Gmail, Airtable and Claude46 stepsCustomer Support & HelpdeskTriage Gmail emails with Jev scoring and draft OpenAI replies18 stepsCustomer Support & HelpdeskDraft Google review replies with OpenRouter and send approvals via Gmail and Sheets15 steps