8
n8n 中文网amn8n.com

AI 智能体潜在客户处理器

中级

这是一个Lead Generation, AI Summarization领域的自动化工作流,包含 12 个节点。主要使用 If, Set, Gmail, Airtable, FormTrigger 等节点。 使用 OpenAI、Gmail 和 Airtable CRM 自动筛选房地产潜在客户

前置要求
  • Google 账号和 Gmail API 凭证
  • Airtable API Key
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "gFQYkoSGHEW9QiCU",
  "meta": {
    "instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
    "templateCredsSetupCompleted": true
  },
  "name": "AI 智能体潜在客户处理器",
  "tags": [],
  "nodes": [
    {
      "id": "5d431bce-7614-4890-a72a-625d7565c89b",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -120,
        -220
      ],
      "webhookId": "6a3bc9b4-7cd8-4e0d-bf61-d241e3e077ef",
      "parameters": {
        "options": {
          "appendAttribution": false
        },
        "formTitle": "Property Form",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Full Name",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "requiredField": true
            },
            {
              "fieldLabel": "Budget Range",
              "requiredField": true
            },
            {
              "fieldLabel": "Preferred Location",
              "requiredField": true
            },
            {
              "fieldLabel": "Purchase Timeline",
              "requiredField": true
            },
            {
              "fieldLabel": "Property Type",
              "requiredField": true
            }
          ]
        },
        "formDescription": "Fill the form to buy!"
      },
      "typeVersion": 2.2
    },
    {
      "id": "f69f0530-4554-4911-99bb-85d9cabd512c",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -120,
        0
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "WbMi3ZLLBnECFAAV",
          "name": "Temp"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1ef89976-db25-463c-83e1-5849aefd27e8",
      "name": "信息提取器",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        100,
        -220
      ],
      "parameters": {
        "text": "=You are a real estate assistant. Based on the input, classify the lead quality, extract structured info, and give a lead score (0-100).\n\nInput:\nName: {{ $json['Full Name'] }}\nEmail: {{ $json.Email }}\nBudget: {{ $json['Budget Range'] }}\nLocation: {{ $json['Preferred Location'] }}\nTimeline: {{ $json['Purchase Timeline'] }}\nProperty Type: {{ $json['Property Type'] }}\n\nInstructions:\n- Parse the budget into numeric range\n- Estimate urgency from timeline\n- Score lead (0-100) based on high budget, urgency, and location being Sydney\n- Return JSON like:\n{\n  \"name\": \"...\",\n  \"email\": \"...\",\n  \"budget_min\": ...,\n  \"budget_max\": ...,\n  \"location\": \"...\",\n  \"timeline\": \"...\",\n  \"urgency\": \"high | medium | low\",\n  \"score\": ...,\n  \"qualified\":",
        "options": {},
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n  \"name\": \"\",\n  \"email\": \"\",\n  \"budget_min\": \"\",\n  \"budget_max\": \"\",\n  \"location\": \"\",\n  \"timeline\": \"\",\n  \"urgency\": \"high | medium | low\",\n  \"score\": \"\"\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "384abf4b-6f25-451d-b0ee-b6089a2a7251",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        696,
        -220
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "79c024d4-0727-4b53-bc8a-d87502b4cefd",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.qualified }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "45c42d95-ffe3-4aae-b4ff-77bfaf83bd32",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        476,
        -220
      ],
      "parameters": {
        "options": {
          "ignoreConversionErrors": true
        },
        "assignments": {
          "assignments": [
            {
              "id": "c199e2d3-6202-4db7-8912-be72a411b484",
              "name": "qualified",
              "type": "boolean",
              "value": "={{ $json[\"output\"][\"score\"] >= 70 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "745a47a0-47ae-40e1-988c-dc2d6493ba88",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1000,
        -460
      ],
      "webhookId": "3c05319c-15b1-4caf-9fe5-f5db4dba9070",
      "parameters": {
        "sendTo": "email",
        "message": "=Name: {{ $('Information Extractor').item.json.output.name }}\nEmail: {{ $('Information Extractor').item.json.output.email }}\nLocation: {{ $('Information Extractor').item.json.output.location }}\nBudget: {{ $('Information Extractor').item.json.output.budget_min }}\nTimeline: {{ $('Information Extractor').item.json.output.timeline }}\nScore: {{ $('Information Extractor').item.json.output.score }}",
        "options": {},
        "subject": "🔥 NEW QUALIFIED LEAD"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "QFfaHpKmgq4YPiRN",
          "name": "Temp"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "938a489a-e785-40e9-9b2c-93503423ab4c",
      "name": "Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1000,
        60
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "value": {
            "Name": "={{ $('Information Extractor').item.json.output.name }}",
            "Email": "={{ $('Information Extractor').item.json.output.email }}",
            "Score": "={{ $('Information Extractor').item.json.output.score }}",
            "budget": "={{ $('Information Extractor').item.json.output.budget_min }}",
            "Location": "={{ $('Information Extractor').item.json.output.location }}",
            "Timeline": "={{ $('Information Extractor').item.json.output.timeline }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "budget",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "budget",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Location",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Location",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Timeline",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Timeline",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Score",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "CLqWz0zZEI8Oc8z1",
          "name": "Temp"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "bc72a77a-99ea-48d3-b5ea-11ed0d942cd3",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -280
      ],
      "parameters": {
        "width": 1100,
        "height": 220,
        "content": "## 流程"
      },
      "typeVersion": 1
    },
    {
      "id": "4ae2ea9f-e369-4dad-9b4c-6be96d7bdeda",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -40
      ],
      "parameters": {
        "color": 3,
        "width": 200,
        "content": "## 引擎"
      },
      "typeVersion": 1
    },
    {
      "id": "6be7b903-9375-45a1-b678-b72a17769468",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 260,
        "height": 220,
        "content": "## 客户关系管理系统"
      },
      "typeVersion": 1
    },
    {
      "id": "f12e0a18-e41e-4b79-8449-795e8750a805",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        920,
        -520
      ],
      "parameters": {
        "color": 5,
        "width": 260,
        "height": 220,
        "content": "## 跟进"
      },
      "typeVersion": 1
    },
    {
      "id": "70cecac6-50ea-4046-bb53-20553ea87f7a",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -540
      ],
      "parameters": {
        "color": 7,
        "width": 360,
        "height": 760,
        "content": "## AI 智能体潜在客户处理器"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c06fd443-1b58-4f75-b58e-3f32bac9d023",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Airtable",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级 - 潜在客户开发, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量12
分类2
节点类型8
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

外部链接
在 n8n.io 查看

分享此工作流