أثرِ بيانات العملاء الجدد بمعلومات شركاتهم ← HubSpot

الذكاء الاصطناعي يقرأ موقع شركة العميل ويحفظ نشاطها ومجالها وحجمها في HubSpot.

متقدم توفّر ~8 ساعة شهريًا المبيعات وإدارة العملاءبواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: Webhook — عميل جديد من نموذجك
  1. استقبل اسم العميل وبريد العمل.
  2. تجاهل مزودي البريد المجاني؛ وإلا خذ نطاق الشركة.
  3. اجلب الصفحة الرئيسية للشركة ودع الذكاء الاصطناعي يلخص نشاطها ومجالها وحجمها.
  4. أنشئ جهة الاتصال في HubSpot أو حدّثها بالملخص.

المخطط

trueNew leadWebhook{ }Find company siteCode⑂Work email?IfFetch company siteHTTP Request</>Extract page textHTMLSummarize companyBasic LLM ChainClaude modelAnthropic Chat Mo…HSave to HubSpotHubSpot
مشغّل تطبيق منطق كود ذكاء اصطناعي

الكود

كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.

Find company site · عقدة Code
// Mode: Run Once for Each Item
// Gets the company website from a work email. Free email providers are skipped.
const FREE = ["gmail.com", "yahoo.com", "hotmail.com", "outlook.com", "icloud.com", "live.com", "aol.com", "proton.me"];
const lead = $json.body || {};
const domain = String(lead.email || "").split("@")[1]?.toLowerCase() || "";

return {
  json: {
    ...lead,
    domain,
    hasCompanySite: Boolean(domain) && !FREE.includes(domain),
  },
};

ابنِها بأداتك

اختر أداتك — نفس الأتمتة، خطوة بخطوة.

انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_. خطوات الذكاء الاصطناعي تستخدم نموذج Claude، ويمكنك استبداله بـ OpenAI أو Gemini أو Ollama.

ملف Workflow JSON
عرض الكود (263 سطر)
{
  "name": "أثرِ بيانات العملاء الجدد بمعلومات شركاتهم ← HubSpot (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## أثرِ بيانات العملاء الجدد بمعلومات شركاتهم ← HubSpot\nالذكاء الاصطناعي يقرأ موقع شركة العميل ويحفظ نشاطها ومجالها وحجمها في HubSpot.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-enrich",
        "options": {}
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "New lead",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        0,
        0
      ],
      "webhookId": "310bce97-ca1c-4fa1-afb0-742e29aedd75"
    },
    {
      "parameters": {
        "jsCode": "// Mode: Run Once for Each Item\n// Gets the company website from a work email. Free email providers are skipped.\nconst FREE = [\"gmail.com\", \"yahoo.com\", \"hotmail.com\", \"outlook.com\", \"icloud.com\", \"live.com\", \"aol.com\", \"proton.me\"];\nconst lead = $json.body || {};\nconst domain = String(lead.email || \"\").split(\"@\")[1]?.toLowerCase() || \"\";\n\nreturn {\n  json: {\n    ...lead,\n    domain,\n    hasCompanySite: Boolean(domain) && !FREE.includes(domain),\n  },\n};",
        "mode": "runOnceForEachItem"
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Find company site",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.hasCompanySite }}",
              "rightValue": "",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Work email?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "url": "=https://{{ $json.domain }}",
        "options": {}
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Fetch company site",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        0
      ],
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "text",
              "cssSelector": "body"
            }
          ]
        },
        "options": {
          "trimValues": true,
          "cleanUpText": true
        }
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Extract page text",
      "type": "n8n-nodes-base.html",
      "typeVersion": 1.2,
      "position": [
        1200,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=From this homepage text, write: what the company does (1 sentence), likely industry, and approximate size (small/medium/large) if you can tell — say 'unknown' if not.\n\n{{ ($json.text || '').slice(0, 5000) }}"
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Summarize company",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        1500,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        1500,
        220
      ]
    },
    {
      "parameters": {
        "authentication": "appToken",
        "resource": "contact",
        "operation": "upsert",
        "email": "={{ $('Find company site').item.json.email }}",
        "additionalFields": {
          "firstName": "={{ $('Find company site').item.json.name }}",
          "website": "=https://{{ $('Find company site').item.json.domain }}",
          "message": "={{ $json.text }}"
        }
      },
      "id": "310bce97-ca1c-4fa1-afb0-742e29aedd75",
      "name": "Save to HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2.1,
      "position": [
        1800,
        0
      ]
    }
  ],
  "connections": {
    "New lead": {
      "main": [
        [
          {
            "node": "Find company site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find company site": {
      "main": [
        [
          {
            "node": "Work email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Work email?": {
      "main": [
        [
          {
            "node": "Fetch company site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch company site": {
      "main": [
        [
          {
            "node": "Extract page text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract page text": {
      "main": [
        [
          {
            "node": "Summarize company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize company": {
      "main": [
        [
          {
            "node": "Save to HubSpot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize company",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

← افتحها في ساحة التجربة لتعديلها

نصائح

  • أضف خطوة تقييم بعد الملخص لترتيب أولوية العملاء الأنسب.

أتمتات مشابهة