Email Automation
Qualify bilingual leads with OpenAI, Google Sheets, and Gmail
When a form is submitted, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets.
What it does
## Log, gate and route Parse Score and Prepare Rows prepares a Leads row for each submission, plus a Rejected or Review row when applicable. Write One Tab at a Time sends one row per loop iteration to Append Lead and Audit Rows. Its done output passes accumulated write results to Build Safe Delivery Tasks. The Sheets node uses explicit column mappings and RAW cell format. Build Safe Delivery Tasks checks returned errors, row count and submission IDs. A detected logging failure creates an owner-only failure task and blocks lead acknowledgments. Partial writes are possible; successful logging is not guaranteed during API failures. Route Score and Intent has five rules: hot, warm, cold, review and failure. Hot creates an owner alert containing the lead message, score and AI summary, plus a personalized lead acknowledgment. Warm creates a lead acknowledgment with a question. Cold creates a generic lead acknowledgment. Review/failure tasks go only to the owner. Rejected matches no rule and stops after logging attempts. Generated HTML escapes lead text; Arabic templates set lang=ar and dir=rtl and include UTF-8 metadata. Actual MIME encoding and client rendering need a live Gmail test. Detect Unconfirmed Email Sends checks Gmail errors or a missing message ID and attempts one owner alert. If Gmail itself is unavailable, that alert may fail and the final node leaves an execution error. No automatic resend of lead emails is configured. Check execution data and Gmail Sent before retrying. Sheet status is the routing decision, not delivery confirmation.
The steps
- Receive Lead Form
- Config
- Clean and Validate Lead
- Accept Valid Lead
- Score Lead with OpenAI
- Parse Score and Prepare Rows
- Append Lead and Audit Rows
- Build Safe Delivery Tasks
- Route Score and Intent
- Send Routed Emails
- Detect Unconfirmed Email Sends
- Alert Owner of Delivery Failure
- Write One Tab at a Time
- OpenAI Chat Model
Similar automations
Email AutomationQualify website leads with OpenAI and log replies in Gmail and Sheets38 stepsEmail AutomationQualify and reply to form leads using OpenRouter, Gmail, and Google Sheets10 stepsCRM & Sales PipelineQualify agency leads and draft email replies with OpenAI, HubSpot, Gmail and Slack24 stepsRAG & Knowledge BasesQualify website leads with an OpenAI chatbot, Supabase, Sheets and Twilio23 steps