{"workflow":{"id":14137,"name":"Qualify real estate leads from Typeform to Airtable with Gemini and smart email routing","views":7,"recentViews":1,"totalViews":7,"createdAt":"2026-03-18T09:38:05.278Z","description":"# 🏠 AI Real Estate Lead Qualifier — Typeform to Airtable with Smart Email Routing\n\n### Automatically qualify property leads, score them with AI, save to Airtable, and send personalised emails — all in seconds.\n\n---\n\n## 📖 Description\n\nEvery time a prospect submits your Typeform property inquiry, this workflow kicks in automatically. It extracts their details, runs them through an AI lead scoring engine, saves the record to Airtable, and sends a personalised email — a priority response for hot leads, a nurture email for everyone else.\n\n**No manual review. No missed leads. No delayed follow-ups.**\n\nThis is built for real estate agencies, leasing companies, and property managers who receive inquiries through Typeform and want instant, intelligent responses without hiring extra staff.\n\n---\n\n## ✨ Key Features\n\n- **Instant lead capture** — triggers the moment Typeform receives a submission\n- **AI lead scoring** — Google Gemini classifies every lead as High, Medium, or Low automatically\n- **Smart email routing** — High leads get a priority response, others get a nurture sequence\n- **Airtable CRM sync** — every lead saved with full details + AI assessment\n- **Robust AI parsing** — 4-layer fallback system ensures AI output is always usable\n- **Personalised emails** — name, property type, location, budget pulled into every email automatically\n- **No-code maintenance** — update scoring rules in the prompt, email copy in the nodes\n\n---\n\n## 🔄 How It Works\n\n```\nProspect submits Typeform inquiry\n          ↓\nWebhook receives the form payload\n          ↓\nExtract Typeform Fields\n  → name, email, phone, property type\n  → purpose, location, budget, requirements\n          ↓\nAI Lead Qualifier (Google Gemini)\n  → lead_score: High / Medium / Low\n  → intent, timeline, notes\n          ↓\nParse AI Output (4-layer fallback)\n          ↓\nSave to Airtable CRM\n          ↓\nHigh Lead? (IF check)\n  ✅ YES → Priority Email (contact within 2 hours)\n  ❌ NO  → Nurture Email (contact within 1-2 days)\n```\n\n---\n\n## 🤖 AI Lead Scoring Rules\n\nThe AI automatically classifies leads based on these criteria:\n\n| Score | Criteria |\n| :--- | :--- |\n| 🔴 **High** | Has budget + specific location + clear purpose (investment or near-term buying) |\n| 🟡 **Medium** | Partial information — needs follow-up to qualify further |\n| 🟢 **Low** | Vague inquiry, missing budget or location, early exploration |\n\nThe AI also extracts:\n- **Intent** — what the lead is trying to achieve\n- **Timeline** — how urgently they need a property\n- **Notes** — assessment summary for your sales team\n\n---\n\n## 📧 Email Templates\n\n### High Lead Email\n- Subject: `🏠 [Name], we have properties matching your needs!`\n- Dark blue header — premium feel\n- Full inquiry summary (property, purpose, location, budget, timeline)\n- AI assessment notes included\n- Promise: senior agent contacts within **2 hours**\n\n### Nurture Email (Medium / Low)\n- Subject: `Thanks for reaching out, [Name]!`\n- Grey header — warm and professional\n- Inquiry summary (property, location, budget)\n- Preparation tips while they wait\n- Promise: contact within **1-2 business days**\n\n---\n\n## 🛠 Setup Requirements\n\n### 1. Typeform Setup\n\nCreate a Typeform with these fields and note their **field ref IDs** from the Typeform API:\n\n| Field | Type | Required |\n| :--- | :--- | :---: |\n| Full Name | Short text | ✅ |\n| Phone Number | Phone | ✅ |\n| Email Address | Email | ✅ |\n| Property Type | Multiple choice | ✅ |\n| Purpose | Multiple choice | ✅ |\n| Preferred Location | Short text | ✅ |\n| Budget Range | Multiple choice | ✅ |\n| Requirements | Long text | ✅ |\n| Consent | Yes/No | Optional |\n\n**Connect Typeform webhook:**\n- Typeform Dashboard → Connect → Webhooks\n- URL: your n8n webhook URL (Production URL from the Webhook node)\n- Method: POST\n\n### 2. Update Field Refs\n\nIn the **Extract Typeform Fields** Code node, update the `REF_*` constants to match your actual Typeform field reference IDs:\n\n```javascript\nconst REF_NAME     = 'your-field-ref-here';\nconst REF_EMAIL    = 'your-field-ref-here';\nconst REF_PHONE    = 'your-field-ref-here';\n// ... etc\n```\n\nFind your field refs from the Typeform API or by logging a test webhook payload.\n\n### 3. Airtable Setup\n\nCreate an Airtable base with a table containing these fields:\n\n| Field Name | Field Type |\n| :--- | :--- |\n| Full Name | Single line text |\n| Email Address | Email |\n| Mobile Phone Number | Phone |\n| Property Type | Single line text |\n| Purpose | Single line text |\n| Preferred Location | Single line text |\n| Budget Range | Single line text |\n| Requirements | Long text |\n| Submit Date | Single line text |\n| Lead Score | Single line text |\n| Intent | Single line text |\n| Timeline | Single line text |\n| Notes | Long text |\n\nUpdate the **Save to Airtable** node with your Base ID and Table ID.\n\n### 4. Credentials Required\n\n| Credential | Used for | Free? |\n| :--- | :--- | :--- |\n| **Google Gemini (PaLM) API** | AI lead scoring | Free tier available |\n| **Airtable Personal Access Token** | CRM save | Free |\n| **SMTP** | Sending emails | Depends on provider |\n\n### 5. Email Configuration\n\nIn both email nodes, update:\n- `fromEmail` — your sending address\n- SMTP credential — your email provider details\n\n**Recommended SMTP providers for testing:** Mailtrap (sandbox), Gmail, SendGrid\n\n---\n\n## ⚙️ Workflow Nodes\n\n| Node | Type | Purpose |\n| :--- | :--- | :--- |\n| Webhook | Webhook | Receives Typeform POST payload |\n| Extract Typeform Fields | Code | Parses answers by field ref ID |\n| AI Lead Qualifier | AI Agent | Scores lead using Gemini |\n| Google Gemini Chat Model | LLM | AI model for scoring |\n| Parse AI Output | Code | Extracts JSON with 4-layer fallback |\n| Save to Airtable | Airtable | Creates CRM record |\n| High Lead? | IF | Routes by lead score |\n| Priority Email | Email Send | Sends to High leads |\n| Nurture Email | Email Send | Sends to Medium/Low leads |\n\n---\n\n## 🔧 Customisation\n\n**Change scoring criteria:**\nEdit the prompt in the **AI Lead Qualifier** node. Add your own rules — e.g. score higher if budget exceeds a threshold, or if the purpose is investment.\n\n**Add more email tiers:**\nAdd a third IF branch for Low leads with a different nurture sequence, or add a Slack/WhatsApp alert for High leads.\n\n**Use a different form:**\nThe **Extract Typeform Fields** node uses Typeform's `field.ref` system. Replace it with a Google Forms or Jotform parser by adjusting how you read the incoming webhook body.\n\n**Change the AI model:**\nReplace the Google Gemini node with Claude, OpenAI, or any other LLM Chat Model node — no other changes needed.\n\n**Add lead deduplication:**\nBefore saving to Airtable, add a search step to check if the email already exists and skip or update instead of creating a duplicate.\n\n---\n\n## 🛡 Robustness Features\n\nThe **Parse AI Output** node uses a 4-layer fallback to ensure the workflow never breaks due to AI formatting issues:\n\n1. **Direct JSON parse** — if Gemini returns clean JSON\n2. **Strip markdown fences** — if Gemini wraps in ```json blocks\n3. **Regex JSON extraction** — if there's extra text around the JSON\n4. **Field-by-field regex** — if JSON is malformed, extracts each field individually\n5. **Default fallback** — if all else fails, sets `lead_score: Medium`\n\nThis means the workflow continues and saves the record even if the AI returns unexpected output.\n\n---\n\n## 📊 Sample Airtable Record\n\n```\nFull Name:         Sarah Johnson\nEmail Address:     sarah@example.com\nMobile Phone:      +91 9876543210\nProperty Type:     2BHK Apartment\nPurpose:           Investment\nPreferred Location: Bandra, Mumbai\nBudget Range:      ₹80L - ₹1.2Cr\nRequirements:      Parking, gym, sea view\nSubmit Date:       2026-03-18T10:30:00Z\nLead Score:        High\nIntent:            Serious buyer looking for investment property with strong rental yield\nTimeline:          Within 3 months\nNotes:             High-intent lead with clear budget and location. Has specific amenity requirements. Recommend immediate callback.\n```\n\n---\n\n## 📦 Requirements Summary\n\n- n8n (cloud or self-hosted)\n- Typeform account (any paid plan for webhooks)\n- Airtable account (free tier works)\n- Google AI Studio account for Gemini API key (free tier available)\n- SMTP email account\n\n---\n\n## 💡 Enhancement Ideas\n\n- **WhatsApp alert** — send instant WhatsApp to sales team for every High lead via Twilio\n- **Calendar booking link** — include a Calendly link in the High lead email\n- **Lead follow-up reminder** — add a Wait node + reminder email if no reply in 48 hours\n- **Slack notification** — ping your team channel instantly for High leads\n- **Lead scoring dashboard** — connect Airtable to a dashboard tool for weekly reports\n\n---\n\n*Built with n8n · Google Gemini AI · Typeform · Airtable · SMTP*","workflow":{"meta":{"instanceId":"18dd7b5b2a819da255b0592c0c20c9327ca21e0c36c31033c172c57edf46fb54","templateCredsSetupCompleted":true},"nodes":[{"id":"90fb7e98-29a0-4f57-9fbc-49a92ecb0bb6","name":"Google Gemini Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[5376,3904],"parameters":{"options":{}},"typeVersion":1},{"id":"c1e12098-b371-4a04-b20b-c1453ad24a5d","name":"Nurture Email — Medium/Low Lead2","type":"n8n-nodes-base.emailSend","position":[6816,3840],"webhookId":"637cbe55-ead4-4a57-80ba-7f99a2285a1e","parameters":{"html":"=<html><body style=\"font-family:Arial,sans-serif;background:#f0f4f8;padding:20px;\">\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"center\">\n<table width=\"560\" style=\"background:#fff;border-radius:8px;overflow:hidden;\">\n<tr><td style=\"background:#4a5568;padding:30px;text-align:center;\">\n<h1 style=\"color:#fff;margin:0;\">We Received Your Inquiry</h1>\n<p style=\"color:#cbd5e0;margin:8px 0 0 0;\">Our team will be in touch shortly</p>\n</td></tr>\n<tr><td style=\"padding:32px;\">\n<h2 style=\"color:#2d3748;\">Hi {{ $('Parse AI Output2').first().json.full_name }},</h2>\n<p style=\"color:#4a5568;line-height:1.7;\">Thanks for your inquiry! Based on your requirements, we may have <strong>available properties</strong> that match what you are looking for.</p>\n<p style=\"color:#4a5568;line-height:1.7;\">Would you like to <strong>schedule a showing this week?</strong></p>\n<table width=\"100%\" style=\"background:#f7fafc;border:1px solid #e2e8f0;border-radius:4px;margin:20px 0;\"><tr><td style=\"padding:16px;\">\n<p style=\"margin:0 0 10px;font-weight:bold;color:#2d3748;\">Your Inquiry Summary</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Property:</strong> {{ $('Parse AI Output2').first().json.property_type }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Location:</strong> {{ $('Parse AI Output2').first().json.location }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Budget:</strong> {{ $('Parse AI Output2').first().json.budget }}</p>\n</td></tr></table>\n<p style=\"color:#4a5568;font-weight:bold;\">While you wait:</p>\n<p style=\"color:#4a5568;\">- Browse our latest listings on our website</p>\n<p style=\"color:#4a5568;\">- Prepare your documents: ID and proof of income</p>\n<p style=\"color:#4a5568;\">- Shortlist your must-have features</p>\n<p style=\"color:#4a5568;margin-top:24px;\">We will be in touch within <strong>1-2 business days</strong>.</p>\n<p style=\"color:#4a5568;margin-top:24px;\">Warm regards,<br><strong>The Leasing Team</strong></p>\n</td></tr>\n<tr><td style=\"background:#f7fafc;padding:12px;text-align:center;\">\n<p style=\"margin:0;color:#a0aec0;font-size:12px;\">You received this because you submitted a property inquiry.</p>\n</td></tr>\n</table></td></tr></table>\n</body></html>","options":{"appendAttribution":false},"subject":"=Thanks for reaching out, {{ $('Parse AI Output2').first().json.full_name }}!","toEmail":"={{ $('Parse AI Output2').first().json.email }}","fromEmail":"user@example.com"},"typeVersion":2.1},{"id":"01540a94-d3a7-4e87-b47c-4ef9d62355c0","name":"Priority Email — High Lead2","type":"n8n-nodes-base.emailSend","position":[6816,3360],"webhookId":"82ad252a-e1be-4adc-a105-4efb3fab938e","parameters":{"html":"=<html><body style=\"font-family:Arial,sans-serif;background:#f0f4f8;padding:20px;\">\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td align=\"center\">\n<table width=\"560\" style=\"background:#fff;border-radius:8px;overflow:hidden;\">\n<tr><td style=\"background:#1a365d;padding:30px;text-align:center;\">\n<h1 style=\"color:#fff;margin:0;\">Great News!</h1>\n<p style=\"color:#bee3f8;margin:8px 0 0 0;\">We have matching properties for you</p>\n</td></tr>\n<tr><td style=\"padding:32px;\">\n<h2 style=\"color:#1a365d;\">Hi {{ $('Parse AI Output2').first().json.full_name }},</h2>\n<p style=\"color:#4a5568;line-height:1.7;\">Thanks for your inquiry! Based on your requirements, we may have <strong>available properties</strong> that are a great match.</p>\n<p style=\"color:#4a5568;line-height:1.7;\">Would you like to <strong>schedule a showing this week?</strong></p>\n<table width=\"100%\" style=\"background:#ebf8ff;border-left:4px solid #3182ce;border-radius:4px;margin:20px 0;\"><tr><td style=\"padding:16px;\">\n<p style=\"margin:0 0 10px;font-weight:bold;color:#2c5282;\">Your Inquiry Summary</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Property:</strong> {{ $('Parse AI Output2').first().json.property_type }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Purpose:</strong> {{ $('Parse AI Output2').first().json.purpose }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Location:</strong> {{ $('Parse AI Output2').first().json.location }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Budget:</strong> {{ $('Parse AI Output2').first().json.budget }}</p>\n<p style=\"margin:4px 0;color:#2d3748;\"><strong>Timeline:</strong> {{ $('Parse AI Output2').first().json.timeline }}</p>\n</td></tr></table>\n<table width=\"100%\" style=\"background:#f0fff4;border-left:4px solid #38a169;border-radius:4px;margin:0 0 20px;\"><tr><td style=\"padding:16px;\">\n<p style=\"margin:0 0 8px;font-weight:bold;color:#276749;\">Our Assessment</p>\n<p style=\"margin:0;color:#2d3748;\">{{ $('Parse AI Output2').first().json.notes }}</p>\n</td></tr></table>\n<p style=\"color:#4a5568;\">A senior agent will contact you within <strong>2 hours</strong>.</p>\n<p style=\"color:#4a5568;margin-top:24px;\">Warm regards,<br><strong>The Leasing Team</strong></p>\n</td></tr>\n<tr><td style=\"background:#f7fafc;padding:12px;text-align:center;\">\n<p style=\"margin:0;color:#a0aec0;font-size:12px;\">You received this because you submitted a property inquiry.</p>\n</td></tr>\n</table></td></tr></table>\n</body></html>","options":{"appendAttribution":false},"subject":"=🏠 {{ $('Parse AI Output2').first().json.full_name }}, we have properties matching your needs!","toEmail":"={{ $('Parse AI Output2').first().json.email }}","fromEmail":"user@example.com"},"typeVersion":2.1},{"id":"00840730-9479-431c-a116-49b158352763","name":"High Lead?2","type":"n8n-nodes-base.if","position":[6464,3600],"parameters":{"options":{},"conditions":{"options":{"version":1,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"check-high","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('Parse AI Output2').first().json.lead_score }}","rightValue":"High"}]}},"typeVersion":2.1},{"id":"5da4dd2e-a654-44b0-9801-b60ce3189924","name":"Save to Airtable2","type":"n8n-nodes-base.airtable","position":[6096,3600],"parameters":{"base":{"__rl":true,"mode":"id","value":"apphmQzLXYHppqZTB"},"table":{"__rl":true,"mode":"id","value":"tbl9t6jSZ8Eg2qn7d"},"columns":{"value":{"Notes":"={{ $json.notes }}","Intent":"={{ $json.intent }}","Purpose":"={{ $json.purpose }}","Timeline":"={{ $json.timeline }}","Full Name":"={{ $json.full_name }}","Lead Score":"={{ $json.lead_score }}","Submit Date":"={{ $json.submit_date }}","Budget Range":"={{ $json.budget }}","Requirements":"={{ $json.requirements }}","Email Address":"={{ $json.email }}","Property Type":"={{ $json.property_type }}","Preferred Location":"={{ $json.location }}","Mobile Phone Number":"={{ $json.phone }}"},"schema":[{"id":"Full Name","type":"string","display":true,"required":false,"displayName":"Full Name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Email Address","type":"string","display":true,"required":false,"displayName":"Email Address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Mobile Phone Number","type":"string","display":true,"required":false,"displayName":"Mobile Phone Number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Property Type","type":"string","display":true,"required":false,"displayName":"Property Type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Purpose","type":"string","display":true,"required":false,"displayName":"Purpose","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Preferred Location","type":"string","display":true,"required":false,"displayName":"Preferred Location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Budget Range","type":"string","display":true,"required":false,"displayName":"Budget Range","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Requirements","type":"string","display":true,"required":false,"displayName":"Requirements","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Submit Date","type":"string","display":true,"required":false,"displayName":"Submit Date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Lead Score","type":"string","display":true,"required":false,"displayName":"Lead Score","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Intent","type":"string","display":true,"required":false,"displayName":"Intent","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Timeline","type":"string","display":true,"required":false,"displayName":"Timeline","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Notes","type":"string","display":true,"required":false,"displayName":"Notes","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow"},"options":{"typecast":true},"operation":"create"},"typeVersion":2.1},{"id":"065a88d7-8ad2-421f-af63-f37d34519ccd","name":"Parse AI Output2","type":"n8n-nodes-base.code","position":[5728,3600],"parameters":{"jsCode":"const aiRaw = $input.first().json.output || '';\nconst formData = $('Extract Typeform Fields1').first().json;\n\nconsole.log('Raw AI output:', aiRaw);\n\nlet parsed = null;\n\n// Attempt 1: direct parse\ntry { parsed = JSON.parse(aiRaw.trim()); } catch(e) {}\n\n// Attempt 2: strip markdown fences\nif (!parsed) {\n  try {\n    const s = aiRaw.replace(/```json/gi,'').replace(/```/g,'').trim();\n    parsed = JSON.parse(s);\n  } catch(e) {}\n}\n\n// Attempt 3: extract JSON block\nif (!parsed) {\n  try {\n    const m = aiRaw.match(/\\{[\\s\\S]*\\}/);\n    if (m) parsed = JSON.parse(m[0]);\n  } catch(e) {}\n}\n\n// Attempt 4: regex fallback\nif (!parsed) {\n  const s = aiRaw.match(/lead_score[\"'\\s:]+([\"']?)(High|Medium|Low)\\1/i);\n  const i = aiRaw.match(/intent[\"'\\s:]+[\"']([^\"'\\n,}]{3,100})[\"']/);\n  const t = aiRaw.match(/timeline[\"'\\s:]+[\"']([^\"'\\n,}]{3,100})[\"']/);\n  const n = aiRaw.match(/notes[\"'\\s:]+[\"']([^\"'\\n,}]{3,300})[\"']/);\n  parsed = {\n    lead_score: s ? s[2] : 'Medium',\n    intent:     i ? i[1].trim() : 'Needs review',\n    timeline:   t ? t[1].trim() : 'Not specified',\n    notes:      n ? n[1].trim() : 'Manual review required'\n  };\n}\n\n// Ensure lead_score is exactly High / Medium / Low\nconst validScores = ['High', 'Medium', 'Low'];\nif (!validScores.includes(parsed.lead_score)) {\n  parsed.lead_score = 'Medium';\n}\n\nconsole.log('Final parsed:', parsed);\n\nreturn [{\n  json: {\n    full_name:     formData.name     || '',\n    email:         formData.email    || '',\n    phone:         formData.phone    || '',\n    property_type: formData.property_type || '',\n    purpose:       formData.purpose  || '',\n    location:      formData.location || '',\n    budget:        formData.budget   || '',\n    requirements:  formData.requirements || '',\n    submit_date:   formData.submit_date  || new Date().toISOString(),\n    lead_score:    parsed.lead_score,\n    intent:        parsed.intent  || '',\n    timeline:      parsed.timeline || '',\n    notes:         parsed.notes   || ''\n  }\n}];"},"typeVersion":2},{"id":"1e8ae181-0d83-4be2-a225-3f11cb7163dc","name":"AI Lead Qualifier2","type":"@n8n/n8n-nodes-langchain.agent","position":[5264,3600],"parameters":{"text":"=You are an AI leasing assistant for a real estate company.\n\nAnalyze this property inquiry and return ONLY a raw JSON object.\nNo markdown. No code fences. No explanation. Just the JSON.\n\nExact format:\n{\"lead_score\":\"High\",\"intent\":\"...\",\"timeline\":\"...\",\"notes\":\"...\"}\n\nlead_score must be exactly one of: High, Medium, Low\n\nLead Data:\n- Name: {{ $json.name }}\n- Email: {{ $json.email }}\n- Phone: {{ $json.phone }}\n- Property Type: {{ $json.property_type }}\n- Purpose: {{ $json.purpose }}\n- Location: {{ $json.location }}\n- Budget: {{ $json.budget }}\n- Requirements: {{ $json.requirements }}\n\nScoring Rules:\n- High = has budget + specific location + clear purpose (investment or near-term)\n- Medium = partial info, needs follow-up\n- Low = vague, missing budget or location\n\nReturn JSON only. No other text whatsoever.","options":{"systemMessage":"You are a real estate lead qualification AI. Return raw JSON only. No markdown. No code blocks. No explanation. Just the JSON object on a single line."},"promptType":"define"},"typeVersion":3.1},{"id":"597b672e-5187-47cd-8c11-9558c357affc","name":"Extract Typeform Fields1","type":"n8n-nodes-base.code","position":[4912,3600],"parameters":{"jsCode":"// ============================================================\n// EXACT TYPEFORM FIELD EXTRACTOR\n// Based on confirmed payload with exact field refs\n// ============================================================\n\nconst input = $input.first().json;\n\n// Typeform sends data inside form_response\nconst fr = input.body?.form_response || input.form_response || input.body || input;\nconst answers = fr.answers || [];\n\nconsole.log('Total answers received:', answers.length);\nconsole.log('Raw answers:', JSON.stringify(answers));\n\n// Known field refs from your form\nconst REF_NAME        = '12829b05-575d-4c31-9569-79ddd0d9f2c2';\nconst REF_PHONE       = 'afd6483f-643d-4656-8e9d-d343c3745356';\nconst REF_EMAIL       = 'ebf62b12-c7f5-437f-aefd-848d645794cc';\nconst REF_PROP_TYPE   = 'eebd1c48-17b6-4139-a479-c6426b0fd968';\nconst REF_PURPOSE     = '9bd9f234-e544-49ae-b8a7-db3ed0b7764e';\nconst REF_LOCATION    = '44dc617b-f453-4ec3-8737-be40897c8505';\nconst REF_BUDGET      = '15471e0f-d172-4b2f-aaf1-c7f0799fc4bf';\nconst REF_REQUIREMENTS= '60ddbcf2-dd8b-490a-a0dd-f48bd629a30d';\nconst REF_CONSENT     = '5b0075bb-75fe-47e9-9b0c-ad4364d45ea9';\n\n// Build a ref -> answer map\nconst refMap = {};\nfor (const a of answers) {\n  const ref = a.field?.ref;\n  if (ref) refMap[ref] = a;\n}\n\n// Extract value from answer object\nfunction extract(ref) {\n  const a = refMap[ref];\n  if (!a) return '';\n  if (a.type === 'text')         return a.text || '';\n  if (a.type === 'email')        return a.email || '';\n  if (a.type === 'phone_number') return a.phone_number || '';\n  if (a.type === 'choice')       return a.choice?.label || '';\n  if (a.type === 'choices')      return (a.choices?.labels || []).join(', ');\n  if (a.type === 'boolean')      return a.boolean ? 'Yes' : 'No';\n  if (a.type === 'number')       return String(a.number || '');\n  return '';\n}\n\nconst name         = extract(REF_NAME);\nconst phone        = extract(REF_PHONE);\nconst email        = extract(REF_EMAIL);\nconst propertyType = extract(REF_PROP_TYPE);\nconst purpose      = extract(REF_PURPOSE);\nconst location     = extract(REF_LOCATION);\nconst budget       = extract(REF_BUDGET);\nconst requirements = extract(REF_REQUIREMENTS);\nconst consent      = extract(REF_CONSENT);\nconst submitDate   = fr.submitted_at || new Date().toISOString();\n\nconsole.log('Extracted:', { name, phone, email, propertyType, purpose, location, budget, requirements });\n\nreturn [{\n  json: {\n    name,\n    email,\n    phone,\n    property_type: propertyType,\n    purpose,\n    location,\n    budget,\n    requirements,\n    consent,\n    submit_date: submitDate\n  }\n}];"},"typeVersion":2},{"id":"1e8565dd-9538-4875-b31a-da53b69b849d","name":"Webhook1","type":"n8n-nodes-base.webhook","position":[4528,3600],"webhookId":"1676a463-d7fc-43e0-8eba-c654b1e31599","parameters":{"path":"1676a463-d7fc-43e0-8eba-c654b1e31599","options":{},"httpMethod":"POST"},"typeVersion":2.1},{"id":"156265b2-b77d-4a56-9b4b-bfffda64f055","name":"Overview","type":"n8n-nodes-base.stickyNote","position":[4448,3072],"parameters":{"width":1100,"height":280,"content":"## 🏠 Real Estate Lead Qualifier\n\nTypeform submission → AI scores the lead (High / Medium / Low) → saves to Airtable CRM → sends the right email automatically. No manual triage needed.\n\n**Setup checklist:**\n- Paste the Webhook production URL into Typeform → Connect → Webhooks\n- Add your Google Gemini API key to the Gemini Chat Model node (or swap for GPT-4o / Claude)\n- Connect your Airtable credential and replace the Base ID + Table ID in the Airtable node\n- Update `fromEmail` in both Send Email nodes before going live\n- If you rebuild the Typeform, update the `REF_` constants in the Extract Fields node"},"typeVersion":1},{"id":"fa3971b5-6761-46a1-aeae-896470486ee0","name":"Webhook note","type":"n8n-nodes-base.stickyNote","position":[4448,3408],"parameters":{"color":5,"width":290,"height":402,"content":"**Webhook**\n\nTypeform POSTs here on every submission. Copy the production URL from this node and paste it into:\nTypeform → Connect → Webhooks"},"typeVersion":1},{"id":"13394412-3d94-4d79-aa57-ad7fbd837e9e","name":"Extractor note","type":"n8n-nodes-base.stickyNote","position":[4816,3408],"parameters":{"color":5,"width":322,"height":400,"content":"**Extract Typeform Fields**\n\nTypeform sends field *reference IDs*, not names. This node maps refs → values.\n\n⚠️ If you rebuild the form, update the REF_ constants at the top of this node. Log a test webhook payload to find the new refs."},"typeVersion":1},{"id":"5e4aedfb-c1ef-406e-9452-8ae477e49a16","name":"AI note","type":"n8n-nodes-base.stickyNote","position":[5184,3408],"parameters":{"color":6,"width":370,"height":388,"content":"**AI Lead Qualifier**\n\nGemini reads the lead and returns JSON:\n• `lead_score` — High / Medium / Low\n• `intent` — what they actually want\n• `timeline` — how urgent\n• `notes` — summary for sales\n\nEdit scoring rules in the prompt."},"typeVersion":1},{"id":"602203da-a46e-49fd-817e-932827389390","name":"Model note","type":"n8n-nodes-base.stickyNote","position":[5104,3856],"parameters":{"color":6,"width":450,"height":186,"content":"Connect your Gemini credential here.\nCan swap for GPT-4o or Claude "},"typeVersion":1},{"id":"13568e8f-2eab-491f-8ecc-9d5bded2dac9","name":"Parse note","type":"n8n-nodes-base.stickyNote","position":[5600,3408],"parameters":{"color":6,"width":322,"height":388,"content":"**Parse AI Output**\n\nGemini sometimes wraps JSON in backticks or adds extra text. This node tries 4 approaches to extract clean JSON — direct parse, strip fences, regex, field-by-field fallback.\n\nIf score is wrong, check the execution log here first."},"typeVersion":1},{"id":"0185f9e7-eecc-448b-90ca-e03473cca03d","name":"Airtable note","type":"n8n-nodes-base.stickyNote","position":[5968,3376],"parameters":{"color":3,"width":370,"height":418,"content":"**Save to Airtable**\n\nCreates a new CRM record with all lead data + AI assessment.\n\nYour base needs these fields: Full Name, Email, Phone, Property Type, Purpose, Location, Budget, Requirements, Submit Date, Lead Score, Intent, Timeline, Notes.\n\n`typecast: true` handles field type mismatches."},"typeVersion":1},{"id":"5e628d9e-6d5f-4728-992c-c8c45b4ab2ca","name":"Route note","type":"n8n-nodes-base.stickyNote","position":[6384,3376],"parameters":{"color":3,"width":264,"height":418,"content":"**Route by score**\n\nHigh → priority email\nAnything else → nurture email\n\nWant a third path for Low leads? Add another IF after this one."},"typeVersion":1},{"id":"c1592048-2cb9-43d3-8c84-bfd95f96c384","name":"High email note","type":"n8n-nodes-base.stickyNote","position":[6720,3200],"parameters":{"color":7,"width":348,"height":374,"content":"**Priority email — High leads**\n\nGoes out immediately. Promises callback within 2 hours — make sure your team is ready when this fires.\n\nUpdate `fromEmail` before going live."},"typeVersion":1},{"id":"5c324e57-fba4-47c5-9db3-8965d9a4acdc","name":"Nurture email note","type":"n8n-nodes-base.stickyNote","position":[6720,3664],"parameters":{"color":7,"width":348,"height":354,"content":"**Nurture email — Medium & Low**\n\nWarmer tone, no urgency. Promises 1–2 business days.\n\nSame SMTP credential as the priority email above."},"typeVersion":1}],"pinData":{},"connections":{"Webhook1":{"main":[[{"node":"Extract Typeform Fields1","type":"main","index":0}]]},"High Lead?2":{"main":[[{"node":"Priority Email — High Lead2","type":"main","index":0}],[{"node":"Nurture Email — Medium/Low Lead2","type":"main","index":0}]]},"Parse AI Output2":{"main":[[{"node":"Save to Airtable2","type":"main","index":0}]]},"Save to Airtable2":{"main":[[{"node":"High Lead?2","type":"main","index":0}]]},"AI Lead Qualifier2":{"main":[[{"node":"Parse AI Output2","type":"main","index":0}]]},"Extract Typeform Fields1":{"main":[[{"node":"AI Lead Qualifier2","type":"main","index":0}]]},"Google Gemini Chat Model2":{"ai_languageModel":[[{"node":"AI Lead Qualifier2","type":"ai_languageModel","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":19,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.code":{"count":2},"n8n-nodes-base.webhook":{"count":1},"n8n-nodes-base.airtable":{"count":1},"n8n-nodes-base.emailSend":{"count":2},"n8n-nodes-base.stickyNote":{"count":10},"@n8n/n8n-nodes-langchain.agent":{"count":1},"@n8n/n8n-nodes-langchain.lmChatGoogleGemini":{"count":1}}},"status":"published","readyToDemo":null,"user":{"name":"Nirav Gajera","username":"niravgajera","bio":"Full-stack Developer | PHP | Laravel | Vue.js | CodeIgniter | Nova | AWS | AI Automation ","verified":true,"links":["https://www.linkedin.com/in/nirav-gajera1/"],"avatar":"https://gravatar.com/avatar/7157fd8f0a74088248a6780d0536d9062ebdfb7cf7ed879b5ccee0b23403095d?r=pg&d=retro&size=200"},"nodes":[{"id":2,"icon":"file:airtable.svg","name":"n8n-nodes-base.airtable","codex":{"data":{"resources":{"generic":[{"url":"https://n8n.io/blog/2021-goals-level-up-your-vocabulary-with-vonage-and-n8n/","icon":"🎯","label":"2021 Goals: Level Up Your Vocabulary With Vonage and n8n"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/building-an-expense-tracking-app-in-10-minutes/","icon":"📱","label":"Building an expense tracking app in 10 minutes"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/learn-to-build-powerful-api-endpoints-using-webhooks/","icon":"🧰","label":"Learn to Build Powerful API Endpoints Using Webhooks"},{"url":"https://n8n.io/blog/sending-sms-the-low-code-way-with-airtable-twilio-programmable-sms-and-n8n/","icon":"📱","label":"Sending SMS the Low-Code Way with Airtable, Twilio Programmable SMS, and n8n"},{"url":"https://n8n.io/blog/automating-conference-organization-processes-with-n8n/","icon":"🙋‍♀️","label":"Automating Conference Organization Processes with n8n"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.airtable/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/airtable/"}]},"categories":["Data & Storage"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\"]","defaults":{"name":"Airtable"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMDAgMTcwIj48cGF0aCBmaWxsPSIjZmNiNDAwIiBkPSJNODkgNC44IDE2LjIgMzQuOWMtNC4xIDEuNy00IDcuNC4xIDkuMWw3My4yIDI5YzYuNCAyLjYgMTMuNiAyLjYgMjAgMGw3My4yLTI5YzQuMS0xLjYgNC4xLTcuNC4xLTkuMWwtNzMtMzAuMUMxMDMuMiAyIDk1LjcgMiA4OSA0LjgiLz48cGF0aCBmaWxsPSIjMThiZmZmIiBkPSJNMTA1LjkgODguOXY3Mi41YzAgMy40IDMuNSA1LjggNi43IDQuNWw4MS42LTMxLjdjMS45LS43IDMuMS0yLjUgMy4xLTQuNVY1Ny4yYzAtMy40LTMuNS01LjgtNi43LTQuNUwxMDkgODQuM2MtMS45LjgtMy4xIDIuNi0zLjEgNC42Ii8+PHBhdGggZmlsbD0iI2Y4MmI2MCIgZD0ibTg2LjkgOTIuNi0yNC4yIDExLjctMi41IDEuMkw5LjEgMTMwYy0zLjIgMS42LTcuNC0uOC03LjQtNC40VjU3LjVjMC0xLjMuNy0yLjQgMS42LTMuM3EuNi0uNiAxLjItLjljMS4yLS43IDMtLjkgNC40LS4zbDc3LjUgMzAuN2M0IDEuNSA0LjMgNy4xLjUgOC45Ii8+PHBhdGggZmlsbD0iI2JhMWU0NSIgZD0ibTg2LjkgOTIuNi0yNC4yIDExLjctNTkuNC01MHEuNi0uNiAxLjItLjljMS4yLS43IDMtLjkgNC40LS4zbDc3LjUgMzAuN2M0IDEuNCA0LjMgNyAuNSA4LjgiLz48L3N2Zz4="},"displayName":"Airtable","typeVersion":2,"nodeCategories":[{"id":3,"name":"Data & Storage"}]},{"id":11,"icon":"fa:envelope","name":"n8n-nodes-base.emailSend","codex":{"data":{"alias":["SMTP","email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.sendemail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/sendemail/"}]},"categories":["Communication","HITL","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"output\"]","defaults":{"name":"Send Email","color":"#00bb88"},"iconData":{"icon":"envelope","type":"icon"},"displayName":"Send Email","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":9,"name":"Core Nodes"},{"id":28,"name":"HITL"}]},{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.","resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"If","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"If","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":47,"icon":"file:webhook.svg","name":"n8n-nodes-base.webhook","codex":{"data":{"alias":["HTTP","API","Build","WH"],"resources":{"generic":[{"url":"https://n8n.io/blog/learn-how-to-automatically-cross-post-your-content-with-n8n/","icon":"✍️","label":"Learn how to automatically cross-post your content with n8n"},{"url":"https://n8n.io/blog/running-n8n-on-ships-an-interview-with-maranics/","icon":"🛳","label":"Running n8n on ships: An interview with Maranics"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/what-are-apis-how-to-use-them-with-no-code/","icon":" 🪢","label":"What are APIs and how to use them with no code"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/the-ultimate-guide-to-automate-your-video-collaboration-with-whereby-mattermost-and-n8n/","icon":"📹","label":"The ultimate guide to automate your video collaboration with Whereby, Mattermost, and n8n"},{"url":"https://n8n.io/blog/how-to-automatically-give-kudos-to-contributors-with-github-slack-and-n8n/","icon":"👏","label":"How to automatically give kudos to contributors with GitHub, Slack, and n8n"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/creating-custom-incident-response-workflows-with-n8n/","label":"How to automate every step of an incident response workflow"},{"url":"https://n8n.io/blog/learn-to-build-powerful-api-endpoints-using-webhooks/","icon":"🧰","label":"Learn to Build Powerful API Endpoints Using Webhooks"},{"url":"https://n8n.io/blog/learn-how-to-use-webhooks-with-mattermost-slash-commands/","icon":"🦄","label":"Learn how to use webhooks with Mattermost slash commands"},{"url":"https://n8n.io/blog/how-goomer-automated-their-operations-with-over-200-n8n-workflows/","icon":"🛵","label":"How Goomer automated their operations with over 200 n8n workflows"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.webhook/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"trigger\"]","defaults":{"name":"Webhook"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCI+PHBhdGggZmlsbD0iIzM3NDc0ZiIgZD0iTTM1IDM3Yy0yLjIgMC00LTEuOC00LTRzMS44LTQgNC00IDQgMS44IDQgNC0xLjggNC00IDQiLz48cGF0aCBmaWxsPSIjMzc0NzRmIiBkPSJNMzUgNDNjLTMgMC01LjktMS40LTcuOC0zLjdsMy4xLTIuNWMxLjEgMS40IDIuOSAyLjMgNC43IDIuMyAzLjMgMCA2LTIuNyA2LTZzLTIuNy02LTYtNmMtMSAwLTIgLjMtMi45LjdsLTEuNyAxTDIzLjMgMTZsMy41LTEuOSA1LjMgOS40YzEtLjMgMi0uNSAzLS41IDUuNSAwIDEwIDQuNSAxMCAxMFM0MC41IDQzIDM1IDQzIi8+PHBhdGggZmlsbD0iIzM3NDc0ZiIgZD0iTTE0IDQzQzguNSA0MyA0IDM4LjUgNCAzM2MwLTQuNiAzLjEtOC41IDcuNS05LjdsMSAzLjlDOS45IDI3LjkgOCAzMC4zIDggMzNjMCAzLjMgMi43IDYgNiA2czYtMi43IDYtNnYtMmgxNXY0SDIzLjhjLS45IDQuNi01IDgtOS44IDgiLz48cGF0aCBmaWxsPSIjZTkxZTYzIiBkPSJNMTQgMzdjLTIuMiAwLTQtMS44LTQtNHMxLjgtNCA0LTQgNCAxLjggNCA0LTEuOCA0LTQgNCIvPjxwYXRoIGZpbGw9IiMzNzQ3NGYiIGQ9Ik0yNSAxOWMtMi4yIDAtNC0xLjgtNC00czEuOC00IDQtNCA0IDEuOCA0IDQtMS44IDQtNCA0Ii8+PHBhdGggZmlsbD0iI2U5MWU2MyIgZD0ibTE1LjcgMzQtMy40LTIgNS45LTkuN2MtMi0xLjktMy4yLTQuNS0zLjItNy4zIDAtNS41IDQuNS0xMCAxMC0xMHMxMCA0LjUgMTAgMTBjMCAuOS0uMSAxLjctLjMgMi41bC0zLjktMWMuMS0uNS4yLTEgLjItMS41IDAtMy4zLTIuNy02LTYtNnMtNiAyLjctNiA2YzAgMi4xIDEuMSA0IDIuOSA1LjFsMS43IDF6Ii8+PC9zdmc+"},"displayName":"Webhook","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjEyNyA0NjQgMTk2LjUgNDY0SDE2Mi4yODNDMTQ5LjAyOCA0NjQgMTM4LjI4MyA0NTMuMjU1IDEzOC4yODMgNDQwVjMzNkMxMzguMjgzIDMwOS4wMjIgMTI4LjAxMSAyODQuNDQzIDExMS4xNjQgMjY1Ljk2MUMxMDYuMTA5IDI2MC40MTYgMTA2LjEwOSAyNTEuNTg0IDExMS4xNjQgMjQ2LjAzOUMxMjguMDExIDIyNy41NTcgMTM4LjI4MyAyMDIuOTc4IDEzOC4yODMgMTc2VjgwQzEzOC4yODMgNjIuMzI2OSAxNTIuNjEgNDggMTcwLjI4MyA0OFoiIGZpbGw9IiNGRjk5MjIiLz4KPHBhdGggZD0iTTMwNSAzNkMzMDUgNDIuNjI3NCAzMTAuMzczIDQ4IDMxNyA0OEgzNDIuOTc5QzM2MC42NTIgNDggMzc0Ljk3OCA2Mi4zMjY5IDM3NC45NzggODBWMTc2QzM3NC45NzggMjAyLjk3OCAzODUuMjUxIDIyNy41NTcgNDAyLjA5OCAyNDYuMDM5QzQwNy4xNTMgMjUxLjU4NCA0MDcuMTUzIDI2MC40MTYgNDAyLjA5OCAyNjUuOTYxQzM4NS4yNTEgMjg0LjQ0MyAzNzQuOTc4IDMwOS4wMjIgMzc0Ljk3OCAzMzZWNDMyQzM3NC45NzggNDQ5LjY3MyAzNjAuNjUyIDQ2NCAzNDIuOTc5IDQ2NEgzMTdDMzEwLjM3MyA0NjQgMzA1IDQ2OS4zNzMgMzA1IDQ3NlY1MDBDMzA1IDUwNi42MjcgMzEwLjM3MyA1MTIgMzE3IDUxMkgzNDIuOTc5QzM4Ny4xNjEgNTEyIDQyMi45NzggNDc2LjE4MyA0MjIuOTc4IDQzMlYzMzZDNDIyLjk3OCAzMDUuMDcyIDQ0OC4wNTEgMjgwIDQ3OC45NzkgMjgwSDQ5MEM0OTYuNjI3IDI4MCA1MDIgMjc0LjYyOCA1MDIgMjY4VjI0NEM1MDIgMjM3LjM3MyA0OTYuNjI4IDIzMiA0OTAgMjMyTDQ3OC45NzkgMjMyQzQ0OC4wNTEgMjMyIDQyMi45NzggMjA2LjkyOCA0MjIuOTc4IDE3NlY4MEM0MjIuOTc4IDM1LjgxNzIgMzg3LjE2MSAwIDM0Mi45NzkgMEgzMTdDMzEwLjM3MyAwIDMwNSA1LjM3MjU4IDMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":1119,"icon":"fa:robot","name":"@n8n/n8n-nodes-langchain.agent","codex":{"data":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"AI Agent","color":"#404040"},"iconData":{"icon":"robot","type":"icon"},"displayName":"AI Agent","typeVersion":3,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1262,"icon":"file:google.svg","name":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglegemini/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]}}},"group":"[\"transform\"]","defaults":{"name":"Google Gemini Chat Model"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNDggNDgiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNDQuNSAyMEgyNHY4LjVoMTEuOEMzNC43IDMzLjkgMzAuMSAzNyAyNCAzN2MtNy4yIDAtMTMtNS44LTEzLTEzczUuOC0xMyAxMy0xM2MzLjEgMCA1LjkgMS4xIDguMSAyLjlsNi40LTYuNEMzNC42IDQuMSAyOS42IDIgMjQgMiAxMS44IDIgMiAxMS44IDIgMjRzOS44IDIyIDIyIDIyYzExIDAgMjEtOCAyMS0yMiAwLTEuMy0uMi0yLjctLjUtNCIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBmaWxsPSIjRkJCQzA1IiBkPSJNMCAzN1YxMWwxNyAxM3oiIGNsaXAtcGF0aD0idXJsKCNiKSIvPjxwYXRoIGZpbGw9IiNFQTQzMzUiIGQ9Im0wIDExIDE3IDEzIDctNi4xTDQ4IDE0VjBIMHoiIGNsaXAtcGF0aD0idXJsKCNiKSIvPjxwYXRoIGZpbGw9IiMzNEE4NTMiIGQ9Im0wIDM3IDMwLTIzIDcuOSAxTDQ4IDB2NDhIMHoiIGNsaXAtcGF0aD0idXJsKCNiKSIvPjxwYXRoIGZpbGw9IiM0Mjg1RjQiIGQ9Ik00OCA0OCAxNyAyNGwtNC0zIDM1LTEweiIgY2xpcC1wYXRoPSJ1cmwoI2IpIi8+PC9zdmc+"},"displayName":"Google Gemini Chat Model","typeVersion":1,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]}],"categories":[{"id":37,"name":"Lead Generation"},{"id":49,"name":"AI Summarization"}],"image":[]}}