Qualify bilingual leads with OpenAI, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs when someone submits an n8n form (“Service inquiry | استفسار عن خدمة”). Along the way it connects Google Sheets, Gmail and OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Service inquiry | استفسار عن خدمة”).
- Config (Edit Fields (Set)): sets or maps fields
- Clean and Validate Lead (Code): runs custom JavaScript code
- Accept Valid Lead (If): checks a condition and branches into true / false
- Score Lead with OpenAI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- Parse Score and Prepare Rows (Code): runs custom JavaScript code
- Write One Tab at a Time (Loop Over Items (Split in Batches)): loops over the items in batches
- Build Safe Delivery Tasks (Code): runs custom JavaScript code
- Append Lead and Audit Rows (Google Sheets): append (sheet)
- Route Score and Intent (Switch): routes items into 5 branches
- Send Routed Emails (Gmail): send (message)
…plus 2 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Google Sheets
n8n-nodes-base.googleSheets - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
Quick overview This workflow collects Arabic or English service inquiries via an n8n Form, validates and scores them with OpenAI, logs each submission to Google Sheets, and routes bilingual acknowledgment and owner alert emails through Gmail based on intent,…