12 - 增强intelligent潜在client信息

Intermédiaire

Ceci est unAI Summarization, Multimodal AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme If, Code, Merge, Hubspot, Agent. 基于AIde潜在client信息增强:deTypeformetCalendlyàHubSpot CRM

Prérequis
  • Clé API HubSpot
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "12 - Intelligent Prospect Enricher",
  "tags": [],
  "nodes": [
    {
      "id": "4dcd168b-82b8-46d1-93b8-b8939e13af53",
      "name": "🧾 Déclencheur Typeform",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        -280,
        0
      ],
      "webhookId": "WEBHOOK_ID_PLACEHOLDER",
      "parameters": {
        "formId": "YOUR_TYPEFORM_ID"
      },
      "credentials": {
        "typeformApi": {
          "id": "CREDENTIAL_ID_PLACEHOLDER",
          "name": "Typeform account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e1d060c4-8025-4418-a560-63a79c0b2788",
      "name": "📅 Déclencheur Calendly",
      "type": "n8n-nodes-base.calendlyTrigger",
      "position": [
        -280,
        200
      ],
      "webhookId": "WEBHOOK_ID_PLACEHOLDER",
      "parameters": {
        "events": [
          "invitee.created"
        ]
      },
      "credentials": {
        "calendlyApi": {
          "id": "CREDENTIAL_ID_PLACEHOLDER",
          "name": "Calendly account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a063356b-8248-4d72-ac54-2069653a788c",
      "name": "🔀 Fusionner les Sources de Prospects",
      "type": "n8n-nodes-base.merge",
      "position": [
        -60,
        100
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "00b454c8-a16c-4697-9567-3bbb5725188b",
      "name": "🛠️ Standardiser les Données Prospects",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        100
      ],
      "parameters": {
        "jsCode": "let input = items[0].json;\nlet output = {};\n\n// Utility: Extract domain from email\nfunction extractDomain(email) {\n  return typeof email === 'string' && email.includes('@')\n    ? email.split('@')[1].toLowerCase()\n    : null;\n}\n\n// Case 1: Direct object (Typeform-style)\nif (input?.Name && input?.Email) {\n  output = {\n    name: input[\"Name\"] || null,\n    email: input[\"Email\"] || null,\n    phone: input[\"Phone Number\"] || null,\n    message: input[\"Message\"] || null,\n    domain: extractDomain(input[\"Email\"]),\n    source: \"Typeform\"\n  };\n}\n\n// Case 2: Array of one object (Typeform-style)\nelse if (Array.isArray(input) && input[0]?.Name && input[0]?.Email) {\n  const data = input[0];\n  output = {\n    name: data[\"Name\"] || null,\n    email: data[\"Email\"] || null,\n    phone: data[\"Phone Number\"] || null,\n    message: data[\"Message\"] || null,\n    domain: extractDomain(data[\"Email\"]),\n    source: \"Typeform\"\n  };\n}\n\n// Case 3: Calendly payload\nelse if (input?.event === \"invitee.created\" && input?.payload) {\n  const payload = input.payload;\n  const email = payload.email || null;\n  output = {\n    name: payload.name || `${payload.first_name || \"\"} ${payload.last_name || \"\"}`.trim(),\n    email: email,\n    phone: payload.text_reminder_number || null,\n    message: payload.questions_and_answers?.[0]?.answer || null,\n    domain: extractDomain(email),\n    source: \"Calendly\"\n  };\n}\n\n// Else: unsupported\nelse {\n  output = {\n    error: \"Unsupported input format\",\n    inputType: typeof input,\n    preview: JSON.stringify(input)\n  };\n}\n\nreturn [{ json: output }];"
      },
      "typeVersion": 2
    },
    {
      "id": "9720f9d6-047c-46bc-b703-9f47acddd5c2",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -200
      ],
      "parameters": {
        "color": 6,
        "width": 700,
        "height": 700,
        "content": "## Lead Intake & Standardization\n\n*Captures leads from multiple sources (form + calendar).\n\nAll incoming data is merged and standardized into a consistent format:\nName, Email, Phone, Message, and Email Domain.*"
      },
      "typeVersion": 1
    },
    {
      "id": "31a89eaf-a2e2-49c4-b688-231e53d137d5",
      "name": "⚖️ Filtre de Domaine Email",
      "type": "n8n-nodes-base.if",
      "position": [
        380,
        100
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "412e4bc6-7d47-4786-bafc-85e68b898b22",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.domain }}",
              "rightValue": "gmail.com"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "cab2469b-cdb9-4d8d-8193-bfa8225b56a9",
      "name": "🤖 Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        600,
        100
      ],
      "parameters": {
        "text": "=You are a company research assistant. I will give you a domain name.\n\nHere's the domain: {{ $json.domain }}\n\nYour task is to return a JSON object with the following details about the company:\n\ncompany_name: Full name of the company\n\nindustry: The primary industry the company belongs to\n\nheadquarters: City and country of the company headquarters\n\nemployee_count: Approximate number of employees (numeric or range)\n\nwebsite: Official website URL\n\nlinkedin: LinkedIn profile link (if available)\n\ndescription: 1-2 sentence summary of the company and what it does\n\nOnly use verified, credible information. Respond only in JSON. ",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "12b43543-207a-46d0-93fd-400d8729b493",
      "name": "💬 LLM (OpenAI / Claude)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        688,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "CREDENTIAL_ID_PLACEHOLDER",
          "name": "OpenAI account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "0202fe5f-f6d1-4a05-9c2e-f077aef85a29",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        -200
      ],
      "parameters": {
        "width": 540,
        "height": 700,
        "content": "## Domain Check & AI Enrichment\n\n*Filters out free/public email domains (e.g., Gmail, Yahoo).\nIf it's a business domain, AI is used to enrich the data with:\n\nCompany Name, Industry, HQ, Website, LinkedIn\n\nCompany Size, and a Short Description\n\nThe AI is instructed to return data in structured JSON.*"
      },
      "typeVersion": 1
    },
    {
      "id": "4da58027-c7ca-4fe5-8236-210d66f206bb",
      "name": "🧬 Combiner Prospect + Sortie IA",
      "type": "n8n-nodes-base.code",
      "position": [
        976,
        100
      ],
      "parameters": {
        "jsCode": "// Access data from previous nodes using correct n8n syntax\n// Replace \"If\" and \"AI Agent\" with your actual node names\n\n// Method 1: Try accessing by node name (replace with your actual node names)\nlet leadData = {};\nlet aiEnrichment = {};\n\ntry {\n  // Try to get data from IF node - replace \"If\" with your actual node name\n  const ifNodeData = $node[\"⚖️ Email Domain Filter\"].json;\n  if (Array.isArray(ifNodeData)) {\n    leadData = ifNodeData[0];\n  } else {\n    leadData = ifNodeData;\n  }\n  console.log('Lead data from If node:', leadData);\n} catch (error) {\n  console.log('Could not access If node:', error.message);\n}\n\ntry {\n  // Try to get data from AI Agent node - replace \"AI Agent\" with your actual node name  \n  const aiNodeData = $node[\"🤖 AI Agent\"].json;\n  let aiOutput = '';\n  \n  if (Array.isArray(aiNodeData)) {\n    aiOutput = aiNodeData[0].output || aiNodeData[0];\n  } else {\n    aiOutput = aiNodeData.output || aiNodeData;\n  }\n  \n  console.log('AI output:', aiOutput);\n  \n  // Parse AI output if it's in JSON format\n  if (typeof aiOutput === 'string') {\n    const jsonMatch = aiOutput.match(/```json\\n([\\s\\S]*?)\\n```/);\n    if (jsonMatch && jsonMatch[1]) {\n      aiEnrichment = JSON.parse(jsonMatch[1]);\n    } else {\n      try {\n        aiEnrichment = JSON.parse(aiOutput);\n      } catch (parseError) {\n        aiEnrichment = { raw_output: aiOutput };\n      }\n    }\n  } else {\n    aiEnrichment = aiOutput;\n  }\n  \n  console.log('Parsed AI enrichment:', aiEnrichment);\n} catch (error) {\n  console.log('Could not access AI Agent node:', error.message);\n  aiEnrichment = { error: 'Could not access AI data' };\n}\n\n// Combine the data (no duplication)\nconst enrichedLead = {\n  // Original lead data\n  name: leadData.name || '',\n  email: leadData.email || '',\n  phone: leadData.phone || '',\n  message: leadData.message || '',\n  domain: leadData.domain || '',\n  source: leadData.source || '',\n  \n  // AI enrichment data\n  company_name: aiEnrichment.company_name || 'Unknown',\n  industry: aiEnrichment.industry || 'Unknown',\n  headquarters: aiEnrichment.headquarters || '',\n  employee_count: aiEnrichment.employee_count || '',\n  website: aiEnrichment.website || '',\n  linkedin: aiEnrichment.linkedin || '',\n  company_description: aiEnrichment.description || '',\n  \n  // Metadata\n  enriched_at: new Date().toISOString(),\n  workflow_id: $workflow.id\n};\n\nconsole.log('Final enriched lead:', enrichedLead);\n\nreturn { json: enrichedLead };"
      },
      "typeVersion": 2
    },
    {
      "id": "b766d9b2-450a-465d-a047-2d0fa5bc18ce",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        900,
        -200
      ],
      "parameters": {
        "color": 4,
        "height": 700,
        "content": "## Merge Lead & Enrichment Data\n\n*Merges lead details with AI-generated insights.\nHandles both string and JSON outputs from AI.\nAdds metadata like timestamp and workflow ID for tracking.\nEnsures a single clean payload is ready for downstream use.*"
      },
      "typeVersion": 1
    },
    {
      "id": "bfb6c543-5b49-4a58-b51b-12afd6a10a1d",
      "name": "💼 Intégration CRM",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1196,
        100
      ],
      "parameters": {
        "email": "={{ $json.email }}",
        "options": {},
        "authentication": "appToken",
        "additionalFields": {
          "country": "={{ $json.headquarters }}",
          "message": "={{ $json.message }}",
          "industry": "={{ $json.industry }}",
          "firstName": "={{ $json.name }}",
          "websiteUrl": "={{ $json.website }}",
          "companyName": "={{ $json.company_name }}",
          "phoneNumber": "={{ $json.phone }}",
          "customPropertiesUi": {
            "customPropertiesValues": [
              {
                "value": "={{ $json.linkedin }}",
                "property": "company_s_linkedin"
              },
              {
                "value": "={{ $json.company_description }}",
                "property": "company_descreption"
              }
            ]
          }
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "CREDENTIAL_ID_PLACEHOLDER",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": false
    },
    {
      "id": "b055d32e-692a-49b1-9a8b-31ff95d9cc66",
      "name": "Note adhésive3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1160,
        -200
      ],
      "parameters": {
        "color": 3,
        "width": 220,
        "height": 700,
        "content": "## CRM Sync (e.g., HubSpot)\n\n*Enriched lead data is synced into a CRM platform.\nFields include contact info and enriched company details.\nCustom fields are mapped using dynamic expressions.*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "TEMPLATE_VERSION_ID",
  "connections": {
    "cab2469b-cdb9-4d8d-8193-bfa8225b56a9": {
      "main": [
        [
          {
            "node": "4da58027-c7ca-4fe5-8236-210d66f206bb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bfb6c543-5b49-4a58-b51b-12afd6a10a1d": {
      "main": [
        []
      ]
    },
    "e1d060c4-8025-4418-a560-63a79c0b2788": {
      "main": [
        [
          {
            "node": "a063356b-8248-4d72-ac54-2069653a788c",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "4dcd168b-82b8-46d1-93b8-b8939e13af53": {
      "main": [
        [
          {
            "node": "a063356b-8248-4d72-ac54-2069653a788c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a063356b-8248-4d72-ac54-2069653a788c": {
      "main": [
        [
          {
            "node": "00b454c8-a16c-4697-9567-3bbb5725188b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "31a89eaf-a2e2-49c4-b688-231e53d137d5": {
      "main": [
        [
          {
            "node": "cab2469b-cdb9-4d8d-8193-bfa8225b56a9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "12b43543-207a-46d0-93fd-400d8729b493": {
      "ai_languageModel": [
        [
          {
            "node": "cab2469b-cdb9-4d8d-8193-bfa8225b56a9",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "00b454c8-a16c-4697-9567-3bbb5725188b": {
      "main": [
        [
          {
            "node": "31a89eaf-a2e2-49c4-b688-231e53d137d5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4da58027-c7ca-4fe5-8236-210d66f206bb": {
      "main": [
        [
          {
            "node": "bfb6c543-5b49-4a58-b51b-12afd6a10a1d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Résumé IA, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie2
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
Avkash Kakdiya

Avkash Kakdiya

@itechnotion

🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34