{
  "id": "HwjLSOZT3wBzXHIX",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "B2B Lead Generation",
  "tags": [],
  "nodes": [
    {
      "id": "55f22d58-5f9b-4642-ad6e-48a1d2e81070",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -2220,
        20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f89824ee-e8e5-4417-8cd2-465a9b4241e6",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -1780,
        20
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "organic_results"
      },
      "typeVersion": 1
    },
    {
      "id": "dfc26b49-1a53-46b7-8240-d9987b42be1d",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1120,
        20
      ],
      "parameters": {
        "text": "={{ $json }}",
        "options": {
          "systemMessage": "Analyze this processed company website content and extract B2B lead information. Return ONLY valid JSON:\n\nCompany URL: {{ $json.url }}\nCompany Name: {{ $json.company_name }}\nProcessed Website Content: {{ $json.content }}\nContent Quality Assessment: {{ $json.content_quality }}\nPre-extracted Contact Information: \n- Emails: {{ $json.extracted_emails }}\n- Phones: {{ $json.extracted_phones }}\nMetadata Information: {{ $json.metadata_info }}\nProcessing Details:\n- Raw content length: {{ $json.raw_content_length }} characters\n- Processed content length: {{ $json.processed_content_length }} characters\n- Processing status: {{ $json.processing_status }}\n\nBased on this structured data, extract and qualify this B2B lead. Return ONLY valid JSON:\n\n{\n  \"company_name\": \"Official company name from content\",\n  \"industry\": \"Primary industry/sector identified\", \n  \"company_size\": \"Employee count or size category (startup/SMB/mid-market/enterprise)\",\n  \"location\": \"Headquarters location or primary market\",\n  \"contact_email\": \"Best general or sales email from extracted emails\",\n  \"phone\": \"Primary phone number from extracted phones\",\n  \"key_services\": [\"Main services/products offered based on content\"],\n  \"target_market\": \"Who they serve (B2B/B2C, SMB/Enterprise, specific industries)\",\n  \"technologies\": [\"Tech stack, platforms, or tools mentioned\"],\n  \"funding_stage\": \"Funding stage if mentioned (seed/series A/B/C/public/private)\",\n  \"business_model\": \"Revenue model (SaaS/consulting/product/marketplace)\",\n  \"social_presence\": {\n    \"linkedin\": \"LinkedIn company URL if found in content\",\n    \"twitter\": \"Twitter handle if found\"\n  },\n  \"lead_score\": 8.5,\n  \"qualification_reasons\": [\"Specific reasons why this lead is qualified or not\"],\n  \"decision_makers\": [\"Names and titles of key contacts found\"],\n  \"next_actions\": [\"Recommended follow-up strategies based on company profile\"],\n  \"content_insights\": {\n    \"website_quality\": \"Professional/Basic/Poor based on content richness\",\n    \"recent_activity\": \"Any recent news, funding, or updates mentioned\",\n    \"competitive_positioning\": \"How they position vs competitors\"\n  }\n}\n\nEnhanced Scoring Criteria (1-10):\n- 9-10: Perfect ICP fit + complete contact info + high growth signals + professional content\n- 7-8: Good ICP fit + some contact info + stable company + quality content  \n- 5-6: Moderate fit + limited contact info + basic content + needs research\n- 3-4: Poor fit + minimal info + low-quality content + wrong target market\n- 1-2: Not qualified + no contact info + processing failed + irrelevant\n\nScoring Factors to Consider:\n- Content Quality Score: {{ $json.content_quality.content_richness_score }}/10\n- Contact Information: {{ $json.content_quality.email_count }} emails, {{ $json.content_quality.phone_count }} phones\n- Content Completeness: {{ $json.content_quality.has_about_section }}, {{ $json.content_quality.has_services_section }}\n- Processing Success: {{ $json.processing_status }}\n- Content Volume: {{ $json.content_quality.word_count }} words\n\nInstructions:\n- Use ONLY the pre-extracted contact information from extracted_emails and extracted_phones\n- Base company_name on the processed company_name field, not the raw content\n- Factor in the content_quality metrics when determining lead_score\n- If processing_status is not \"SUCCESS\", lower the score significantly\n- Use null for any missing information - do not hallucinate data\n- Be conservative with scoring - better to underscore than overscore\n- Focus on B2B relevance and ICP fit based on the structured content provided"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "824b3e22-552e-4147-a2ba-119d3a912846",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        -1140,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-20250514",
          "cachedResultName": "Claude 4 Sonnet"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "efd84a24-ecdf-4aa9-9d4a-93a9aed13af6",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        0
      ],
      "parameters": {
        "url": "",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"embeds\": [\n    {\n      \"title\": \"\ud83c\udfaf New Qualified Lead Found!\",\n      \"description\": \"**{{ $json.company_name || 'Unknown Company' }}** (Score: {{ $json.lead_score || 0 }}/10)\",\n      \"color\": 3066993,\n      \"fields\": [\n        {\n          \"name\": \"Industry\",\n          \"value\": \"{{ $json.industry || 'Not specified' }}\",\n          \"inline\": true\n        },\n        {\n          \"name\": \"Size\",\n          \"value\": \"{{ $json.company_size || 'Not specified' }}\",\n          \"inline\": true\n        },\n        {\n          \"name\": \"Location\", \n          \"value\": \"{{ $json.location || 'Not specified' }}\",\n          \"inline\": true\n        },\n        {\n          \"name\": \"Contact\",\n          \"value\": \"{{ $json.contact_email || 'No email found' }}\",\n          \"inline\": false\n        },\n        {\n          \"name\": \"Phone\",\n          \"value\": \"{{ $json.phone || 'No phone found' }}\",\n          \"inline\": false\n        },\n        {\n          \"name\": \"Services\",\n          \"value\": \"{{ $json.key_services && $json.key_services.length > 0 ? $json.key_services.slice(0, 3).join(', ') : 'Not specified' }}\",\n          \"inline\": false\n        },\n        {\n          \"name\": \"Website\",\n          \"value\": \"[Visit Website]({{ $node['Analyze and Clean the data'].json.url || '#' }})\",\n          \"inline\": false\n        },\n        {\n          \"name\": \"Why Qualified\",\n          \"value\": \"{{ $json.qualification_reasons && $json.qualification_reasons.length > 0 ? $json.qualification_reasons.slice(0, 2).join(' \u2022 ') : 'Standard qualification criteria met' }}\",\n          \"inline\": false\n        }\n      ],\n      \"footer\": {\n        \"text\": \"Generated by n8n Lead Generation Workflow\"\n      },\n      \"timestamp\": \"\"\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a60059d8-8826-4d9c-9e4a-8f0050056293",
      "name": "scrape the keywords data",
      "type": "n8n-nodes-scrapeless.scrapeless",
      "position": [
        -2000,
        20
      ],
      "parameters": {
        "q": "\"software companies\" \"enterprise clients\" employees:50-200   \"marketing agencies\" \"B2B services\" \"digital transformation\"   \"SaaS startups\" \"Series A\" \"venture backed\"   \"manufacturing companies\" \"digital solutions\" ISO"
      },
      "credentials": {
        "scrapelessApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bf7b8159-dff3-47b1-8d97-c7f6e0e25964",
      "name": "Crawl every link",
      "type": "n8n-nodes-scrapeless.scrapeless",
      "position": [
        -1560,
        20
      ],
      "parameters": {
        "url": "={{ $json.link }}",
        "resource": "crawler",
        "operation": "crawl",
        "limitCrawlPages": 1
      },
      "credentials": {
        "scrapelessApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c6e18faa-e649-46c4-878e-59a781c45f67",
      "name": "Check the results correct or not",
      "type": "n8n-nodes-base.if",
      "position": [
        -440,
        20
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "b1f2df5e-f171-4394-aadd-5085fdc912f6",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.lead_score }}",
              "rightValue": "=6"
            },
            {
              "id": "f353fe0c-8e12-4b73-a34d-2987158eafca",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.claude_processing_status }}",
              "rightValue": "SUCCESS"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "bed1a04d-035f-42ef-9c41-8dc1c97eb970",
      "name": "Extract needed info",
      "type": "n8n-nodes-base.code",
      "position": [
        -1320,
        20
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Code pour traiter les donn\u00e9es du Scrapeless Crawler\n// Structure r\u00e9elle: TABLEAU d'objets avec propri\u00e9t\u00e9 \"markdown\"\n\nconsole.log(\"=== PROCESSING SCRAPELESS CRAWLER DATA ===\");\n\ntry {\n  // Les donn\u00e9es arrivent sous forme de tableau\n  const crawlerDataArray = $json;\n  \n  console.log(\"Data type:\", typeof crawlerDataArray);\n  console.log(\"Is array:\", Array.isArray(crawlerDataArray));\n  console.log(\"Array length:\", crawlerDataArray?.length || 0);\n  \n  // V\u00e9rifier si le tableau est vide\n  if (!Array.isArray(crawlerDataArray) || crawlerDataArray.length === 0) {\n    console.log(\"\u274c Empty or invalid crawler data\");\n    return {\n      url: \"unknown\",\n      company_name: \"No Data\",\n      content: \"\",\n      error: \"Empty crawler response\",\n      processing_failed: true,\n      skip_reason: \"No data returned from crawler\"\n    };\n  }\n  \n  // Prendre le premier \u00e9l\u00e9ment du tableau\n  const crawlerResponse = crawlerDataArray[0];\n  \n  // Extraction du contenu markdown\n  const markdownContent = crawlerResponse?.markdown || \"\";\n  \n  // Extraction des m\u00e9tadonn\u00e9es (si disponibles)\n  const metadata = crawlerResponse?.metadata || {};\n  \n  // Informations de base\n  const sourceURL = metadata.sourceURL || metadata.url || extractURLFromContent(markdownContent);\n  const companyName = metadata.title || metadata.ogTitle || extractCompanyFromContent(markdownContent);\n  const description = metadata.description || metadata.ogDescription || \"\";\n  \n  console.log(`Processing: ${companyName}`);\n  console.log(`URL: ${sourceURL}`);\n  console.log(`Content length: ${markdownContent.length} characters`);\n  \n  // V\u00e9rification de la qualit\u00e9 du contenu\n  if (!markdownContent || markdownContent.length < 100) {\n    return {\n      url: sourceURL,\n      company_name: companyName,\n      content: \"\",\n      error: \"Insufficient content from crawler\",\n      processing_failed: true,\n      raw_content_length: markdownContent.length,\n      skip_reason: \"Content too short or empty\"\n    };\n  }\n  \n  // Nettoyage et structuration du contenu markdown\n  let cleanedContent = cleanMarkdownContent(markdownContent);\n  \n  // Extraction des informations de contact\n  const contactInfo = extractContactInformation(cleanedContent);\n  \n  // Extraction des sections business importantes\n  const businessSections = extractBusinessSections(cleanedContent);\n  \n  // Construction du contenu pour Claude AI\n  const contentForAI = buildContentForAI({\n    companyName,\n    sourceURL,\n    description,\n    businessSections,\n    contactInfo,\n    cleanedContent\n  });\n  \n  // M\u00e9triques de qualit\u00e9 du contenu\n  const contentQuality = assessContentQuality(cleanedContent, contactInfo);\n  \n  const result = {\n    url: sourceURL,\n    company_name: companyName,\n    content: contentForAI,\n    raw_content_length: markdownContent.length,\n    processed_content_length: contentForAI.length,\n    extracted_emails: contactInfo.emails,\n    extracted_phones: contactInfo.phones,\n    content_quality: contentQuality,\n    metadata_info: {\n      has_title: !!metadata.title,\n      has_description: !!metadata.description,\n      site_name: metadata.ogSiteName || \"\",\n      page_title: metadata.title || \"\"\n    },\n    processing_timestamp: new Date().toISOString(),\n    processing_status: \"SUCCESS\"\n  };\n  \n  console.log(`\u2705 Successfully processed ${companyName}`);\n  return result;\n  \n} catch (error) {\n  console.error(\"\u274c Error processing crawler data:\", error);\n  return {\n    url: \"unknown\",\n    company_name: \"Processing Error\",\n    content: \"\",\n    error: error.message,\n    processing_failed: true,\n    processing_timestamp: new Date().toISOString()\n  };\n}\n\n// ========== FONCTIONS UTILITAIRES ==========\n\nfunction extractURLFromContent(content) {\n  // Tenter d'extraire l'URL du contenu markdown\n  const urlMatch = content.match(/https?:\\/\\/[^\\s\\)]+/);\n  return urlMatch ? urlMatch[0] : \"unknown\";\n}\n\nfunction extractCompanyFromContent(content) {\n  // Tenter d'extraire le nom de la compagnie du contenu\n  const titleMatch = content.match(/^#\\s+(.+)$/m);\n  if (titleMatch) return titleMatch[1];\n  \n  // Rechercher des emails pour extraire le domaine\n  const emailMatch = content.match(/@([a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})/);\n  if (emailMatch) {\n    const domain = emailMatch[1].replace('www.', '');\n    return domain.split('.')[0].charAt(0).toUpperCase() + domain.split('.')[0].slice(1);\n  }\n  \n  return \"Unknown Company\";\n}\n\nfunction cleanMarkdownContent(markdown) {\n  return markdown\n    // Suppression des \u00e9l\u00e9ments de navigation\n    .replace(/^\\[Skip to content\\].*$/gmi, '')\n    .replace(/^\\[.*\\]\\(#.*\\)$/gmi, '')\n    // Suppression des liens markdown mais conservation du texte\n    .replace(/\\[([^\\]]+)\\]\\([^)]+\\)/g, '$1')\n    // Suppression des images et base64\n    .replace(/!\\[([^\\]]*)\\]\\([^)]*\\)/g, '')\n    .replace(/<Base64-Image-Removed>/g, '')\n    // Suppression des mentions de cookies/privacy\n    .replace(/.*?(cookie|privacy policy|terms of service).*?\\n/gi, '')\n    // Nettoyage des espaces multiples\n    .replace(/\\s+/g, ' ')\n    // Suppression des lignes vides multiples\n    .replace(/\\n\\s*\\n\\s*\\n/g, '\\n\\n')\n    .trim();\n}\n\nfunction extractContactInformation(content) {\n  // Regex pour emails\n  const emailRegex = /[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g;\n  \n  // Regex pour t\u00e9l\u00e9phones (avec support international)\n  const phoneRegex = /(?:\\+\\d{1,3}\\s?)?\\d{3}\\s?\\d{3}\\s?\\d{3,4}|\\(\\d{3}\\)\\s?\\d{3}-?\\d{4}/g;\n  \n  const emails = [...new Set((content.match(emailRegex) || [])\n    .filter(email => !email.includes('example.com'))\n    .slice(0, 3))];\n  \n  const phones = [...new Set((content.match(phoneRegex) || [])\n    .filter(phone => phone.replace(/\\D/g, '').length >= 9)\n    .slice(0, 2))];\n  \n  return { emails, phones };\n}\n\nfunction extractBusinessSections(content) {\n  const sections = {};\n  \n  // Recherche de sections importantes\n  const lines = content.split('\\n');\n  let currentSection = '';\n  let currentContent = '';\n  \n  for (let i = 0; i < lines.length; i++) {\n    const line = lines[i].trim();\n    \n    // D\u00e9tection des titres (headers)\n    if (line.startsWith('#')) {\n      // Sauvegarder la section pr\u00e9c\u00e9dente\n      if (currentSection && currentContent) {\n        sections[currentSection] = currentContent.trim().substring(0, 500);\n      }\n      \n      // Nouvelle section\n      const title = line.replace(/^#+\\s*/, '').toLowerCase();\n      if (title.includes('about') || title.includes('service') || \n          title.includes('contact') || title.includes('company')) {\n        currentSection = title.includes('about') ? 'about' :\n                        title.includes('service') ? 'services' :\n                        title.includes('contact') ? 'contact' : 'company';\n        currentContent = '';\n      } else {\n        currentSection = '';\n      }\n    } else if (currentSection && line) {\n      currentContent += line + '\\n';\n    }\n  }\n  \n  // Sauvegarder la derni\u00e8re section\n  if (currentSection && currentContent) {\n    sections[currentSection] = currentContent.trim().substring(0, 500);\n  }\n  \n  return sections;\n}\n\nfunction buildContentForAI({ companyName, sourceURL, description, businessSections, contactInfo, cleanedContent }) {\n  let aiContent = `COMPANY ANALYSIS REQUEST\\n\\n`;\n  aiContent += `Company: ${companyName}\\n`;\n  aiContent += `Website: ${sourceURL}\\n`;\n  \n  if (description) {\n    aiContent += `Description: ${description}\\n`;\n  }\n  \n  aiContent += `\\nCONTACT INFORMATION:\\n`;\n  if (contactInfo.emails.length > 0) {\n    aiContent += `Emails: ${contactInfo.emails.join(', ')}\\n`;\n  }\n  if (contactInfo.phones.length > 0) {\n    aiContent += `Phones: ${contactInfo.phones.join(', ')}\\n`;\n  }\n  \n  aiContent += `\\nBUSINESS SECTIONS:\\n`;\n  for (const [section, content] of Object.entries(businessSections)) {\n    if (content) {\n      aiContent += `\\n${section.toUpperCase()}:\\n${content}\\n`;\n    }\n  }\n  \n  // Ajout du contenu principal (limit\u00e9)\n  aiContent += `\\nFULL CONTENT PREVIEW:\\n`;\n  aiContent += cleanedContent.substring(0, 2000);\n  \n  // Limitation finale pour Claude API\n  return aiContent.substring(0, 6000);\n}\n\nfunction assessContentQuality(content, contactInfo) {\n  const wordCount = content.split(/\\s+/).length;\n  \n  return {\n    word_count: wordCount,\n    has_contact_info: contactInfo.emails.length > 0 || contactInfo.phones.length > 0,\n    has_about_section: /about|company|who we are/gi.test(content),\n    has_services_section: /services|products|solutions/gi.test(content),\n    has_team_section: /team|leadership|staff/gi.test(content),\n    content_richness_score: Math.min(10, Math.floor(wordCount / 50)),\n    email_count: contactInfo.emails.length,\n    phone_count: contactInfo.phones.length,\n    estimated_quality: wordCount > 200 && contactInfo.emails.length > 0 ? \"HIGH\" : \n                      wordCount > 100 ? \"MEDIUM\" : \"LOW\"\n  };\n}"
      },
      "typeVersion": 2
    },
    {
      "id": "423238c5-5438-4362-8fdb-3043a258cac5",
      "name": "Analyze and Clean the data",
      "type": "n8n-nodes-base.code",
      "position": [
        -740,
        20
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// Code pour parser la r\u00e9ponse JSON de Claude AI\nconsole.log(\"=== PARSING CLAUDE AI RESPONSE ===\");\n\ntry {\n  // La r\u00e9ponse de Claude arrive dans le champ \"output\"\n  const claudeOutput = $json.output || \"\";\n  \n  console.log(\"Claude output length:\", claudeOutput.length);\n  console.log(\"Claude output preview:\", claudeOutput.substring(0, 200));\n  \n  // Extraction du JSON depuis la r\u00e9ponse markdown de Claude\n  let jsonString = claudeOutput;\n  \n  // Suppression des backticks markdown si pr\u00e9sents\n  if (jsonString.includes('```json')) {\n    const jsonMatch = jsonString.match(/```json\\s*([\\s\\S]*?)\\s*```/);\n    if (jsonMatch && jsonMatch[1]) {\n      jsonString = jsonMatch[1].trim();\n    }\n  } else if (jsonString.includes('```')) {\n    // Fallback pour les cas o\u00f9 il n'y a que ```\n    const jsonMatch = jsonString.match(/```\\s*([\\s\\S]*?)\\s*```/);\n    if (jsonMatch && jsonMatch[1]) {\n      jsonString = jsonMatch[1].trim();\n    }\n  }\n  \n  // Nettoyage suppl\u00e9mentaire\n  jsonString = jsonString.trim();\n  \n  console.log(\"Extracted JSON string:\", jsonString.substring(0, 300));\n  \n  // Parse du JSON\n  const leadData = JSON.parse(jsonString);\n  \n  console.log(\"Successfully parsed lead data for:\", leadData.company_name);\n  console.log(\"Lead score:\", leadData.lead_score);\n  console.log(\"Contact email:\", leadData.contact_email);\n  \n  // Validation et nettoyage des donn\u00e9es\n  const cleanedLead = {\n    company_name: leadData.company_name || \"Unknown\",\n    industry: leadData.industry || null,\n    company_size: leadData.company_size || null,\n    location: leadData.location || null,\n    contact_email: leadData.contact_email || null,\n    phone: leadData.phone || null,\n    key_services: Array.isArray(leadData.key_services) ? leadData.key_services : [],\n    target_market: leadData.target_market || null,\n    technologies: Array.isArray(leadData.technologies) ? leadData.technologies : [],\n    funding_stage: leadData.funding_stage || null,\n    business_model: leadData.business_model || null,\n    social_presence: leadData.social_presence || { linkedin: null, twitter: null },\n    lead_score: typeof leadData.lead_score === 'number' ? leadData.lead_score : 0,\n    qualification_reasons: Array.isArray(leadData.qualification_reasons) ? leadData.qualification_reasons : [],\n    decision_makers: Array.isArray(leadData.decision_makers) ? leadData.decision_makers : [],\n    next_actions: Array.isArray(leadData.next_actions) ? leadData.next_actions : [],\n    content_insights: leadData.content_insights || {},\n    \n    // M\u00e9ta-informations pour le filtrage\n    is_qualified: leadData.lead_score >= 6 && leadData.contact_email !== null,\n    has_contact_info: !!(leadData.contact_email || leadData.phone),\n    processing_timestamp: new Date().toISOString(),\n    claude_processing_status: \"SUCCESS\"\n  };\n  \n  console.log(`\u2705 Lead processed: ${cleanedLead.company_name} (Score: ${cleanedLead.lead_score}, Qualified: ${cleanedLead.is_qualified})`);\n  \n  return cleanedLead;\n  \n} catch (error) {\n  console.error(\"\u274c Error parsing Claude response:\", error);\n  console.error(\"Raw output:\", $json.output);\n  \n  // Retour d'erreur structur\u00e9\n  return {\n    company_name: \"Claude Parsing Error\",\n    industry: null,\n    company_size: null,\n    location: null,\n    contact_email: null,\n    phone: null,\n    key_services: [],\n    target_market: null,\n    technologies: [],\n    funding_stage: null,\n    business_model: null,\n    social_presence: { linkedin: null, twitter: null },\n    lead_score: 0,\n    qualification_reasons: [`Claude parsing failed: ${error.message}`],\n    decision_makers: [],\n    next_actions: [\"Fix Claude response parsing\", \"Check JSON format\"],\n    content_insights: {},\n    is_qualified: false,\n    has_contact_info: false,\n    processing_timestamp: new Date().toISOString(),\n    claude_processing_status: \"FAILED\",\n    parsing_error: error.message,\n    raw_claude_output: $json.output || \"No output received\"\n  };\n}"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c52dc85a-4797-499c-aa17-b9166415530a",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Analyze and Clean the data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Crawl every link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Crawl every link": {
      "main": [
        [
          {
            "node": "Extract needed info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract needed info": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "scrape the keywords data": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze and Clean the data": {
      "main": [
        [
          {
            "node": "Check the results correct or not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check the results correct or not": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "scrape the keywords data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}