{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "02b63fb0-168a-47a5-abf3-aaf883760221",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        144
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "height": 1160,
        "content": "## Lookalike Company Enrichment & Lead Scoring\n\n### How it works\n1. You trigger the workflow manually and it reads your best customer domains from a Google Sheet.\n2. For each customer domain, PredictLeads finds lookalike companies with similar profiles.\n3. Each lookalike is enriched with real-time signals: recent news events, job openings, and technology stack.\n4. A growth detection step analyzes news events to flag high-growth companies based on positive signals like launches, partnerships, and new hires.\n5. All signals are combined into a composite score (0-100) weighing news recency, hiring volume, tech stack overlap, similarity, and region.\n6. High-scoring leads (above 70) trigger a Slack alert, get saved to Google Sheets, and receive an AI-generated outreach email via Gmail.\n\n### Setup\n1. Connect your **Google Sheets** credential and point the input node to a sheet with a `domain` column listing your best client domains.\n2. Connect your **PredictLeads API** credential (get one at [predictleads.com](https://predictleads.com)).\n3. Connect your **Slack** credential and select the alert channel for growth and high-score notifications.\n4. Connect your **Gmail** credential for automated outreach emails.\n5. Set the `OPENAI_API_KEY` environment variable for AI-generated email copy.\n6. Create a second sheet tab named \"Scored Lookalikes\" for output.\n\n### Customization\n- Adjust the score threshold in the Filter node (default is 70).\n- Edit target technologies in the scoring Code node (default: HubSpot, Salesforce, Marketo).\n- Modify growth signal categories in the Detect Growth Signals node.\n- Change target regions for the regional scoring bonus."
      },
      "typeVersion": 1
    },
    {
      "id": "20a41666-7378-4985-93c6-3d7dbac98d1a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        480
      ],
      "parameters": {
        "width": 492,
        "height": 312,
        "content": "## Trigger & Input\nManually starts the workflow and loads your best customer domains from Google Sheets."
      },
      "typeVersion": 1
    },
    {
      "id": "0369b151-0582-4b45-99ef-e431483713f1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        512
      ],
      "parameters": {
        "width": 732,
        "height": 296,
        "content": "## Lookalike Discovery\nLoops through each client domain, queries PredictLeads for similar companies, and extracts structured lookalike data."
      },
      "typeVersion": 1
    },
    {
      "id": "f5f99be7-a521-46a2-9890-8d80d3f1beab",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        288
      ],
      "parameters": {
        "width": 1244,
        "height": 536,
        "content": "## Signal Enrichment & Growth Detection\nEnriches each lookalike with news, jobs, and tech data. Detects growth patterns and sends Slack alerts for high-growth companies."
      },
      "typeVersion": 1
    },
    {
      "id": "7e2841f4-82d4-4fb4-80b2-6c77cfd33b17",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2768,
        528
      ],
      "parameters": {
        "width": 524,
        "height": 296,
        "content": "## Lead Scoring\nCombines news, hiring, tech, similarity, and region signals into a composite score (0-100) and filters high-scoring leads."
      },
      "typeVersion": 1
    },
    {
      "id": "f1f50fdb-7377-4fff-8614-5baef541b9f7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3472,
        256
      ],
      "parameters": {
        "width": 732,
        "height": 792,
        "content": "## Alerts, Outreach & Storage\nSends Slack alerts for top leads, saves scored results to Google Sheets, and generates AI-powered outreach emails via Gmail."
      },
      "typeVersion": 1
    },
    {
      "id": "51a6d6d6-1ce7-4013-99af-b60dd61709e4",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        144,
        640
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d0bb1298-c7a2-47ca-bcad-0626dd8a574c",
      "name": "Read Best Client Domains",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        336,
        640
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo/edit?usp=drivesdk",
          "cachedResultName": "09"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "d477b025-b330-4517-861b-68b5c4650ac9",
      "name": "Loop Clients",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        656,
        640
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "03ba160d-2fd0-4273-8aaf-86521010a07e",
      "name": "Retrieve Company",
      "type": "@predictleads/n8n-nodes-predictleads.predictLeads",
      "position": [
        880,
        656
      ],
      "parameters": {
        "domain": "={{ $json.domain }}",
        "operation": "retrieveCompany",
        "requestOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "3efadf54-da4f-4b67-a0b3-fb53281135b8",
      "name": "Extract Lookalikes",
      "type": "n8n-nodes-base.code",
      "position": [
        1088,
        656
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n\n  const mainData = item.json.data?.[0] || {};\n  const included = item.json.included || [];\n\n  // get lookalike company IDs\n  const lookalikeIds = mainData.relationships?.lookalike_companies?.data || [];\n\n  for (const rel of lookalikeIds) {\n\n    // match ID with included array\n    const match = included.find(c => c.id === rel.id);\n\n    if (!match) continue;\n\n    const domain = match.attributes?.domain || '';\n\n    // skip invalid / empty domains\n    if (!domain) continue;\n\n    results.push({\n      json: {\n        domain: domain,\n        company_name: match.attributes?.company_name || '',\n        source_domain: mainData.attributes?.domain || '',\n        similarity_score: 0.9, \n      }\n    });\n  }\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "6ea58fa3-7bb2-4c8d-a04b-830df40b5796",
      "name": "Loop Lookalikes",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1440,
        656
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "62508496-cb11-43fd-b0b6-1b4e35dc34d6",
      "name": "Retrieve Company News Events",
      "type": "@predictleads/n8n-nodes-predictleads.predictLeads",
      "position": [
        1648,
        672
      ],
      "parameters": {
        "domain": "={{ $json.domain }}",
        "resource": "newsEvents",
        "operation": "retrieveCompanyNewsEvents",
        "requestOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "6edc2b02-d228-437e-a0fb-48aef4129ba3",
      "name": "Retrieve Company Job Openings",
      "type": "@predictleads/n8n-nodes-predictleads.predictLeads",
      "position": [
        1904,
        672
      ],
      "parameters": {
        "domain": "={{ $('Extract Lookalikes').item.json.domain }}",
        "resource": "jobOpenings",
        "operation": "retrieveCompanyJobOpenings",
        "requestOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "9c9843cc-24e3-46e2-b12d-9c967b63c598",
      "name": "Retrieve Technologies",
      "type": "@predictleads/n8n-nodes-predictleads.predictLeads",
      "position": [
        2128,
        672
      ],
      "parameters": {
        "domain": "={{ $('Extract Lookalikes').item.json.domain }}",
        "resource": "technologyDetections",
        "operation": "retrieveTechnologiesUsedByCompany",
        "requestOptions": {}
      },
      "credentials": {},
      "typeVersion": 1
    },
    {
      "id": "dc8db35b-9fce-4163-95a2-0758ca7b20b7",
      "name": "Detect Growth Signals",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        432
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nconst now = new Date();\nconst thirtyDaysAgo = new Date(now - 30 * 24 * 60 * 60 * 1000);\n\n// Growth categories (IMPORTANT)\nconst positiveSignals = [\n  'launches',\n  'partners_with',\n  'integrates_with',\n  'acquires',\n  'hires',\n  'invests_into',\n  'signs_new_client'\n];\n\nconst negativeSignals = [\n  'has_issues_with',\n  'files_suit_against'\n];\n\nfor (const item of items) {\n\n  const data = item.json.data || [];\n\n  let growthSignals = [];\n  let negativeEvents = [];\n  let recentSignals = [];\n\n  for (const event of data) {\n    const attr = event.attributes || {};\n    const category = attr.category || '';\n    const date = attr.found_at ? new Date(attr.found_at) : null;\n\n    // Recent filter (last 30 days)\n    const isRecent = date && date > thirtyDaysAgo;\n\n    // Positive signals\n    if (positiveSignals.includes(category)) {\n      growthSignals.push({\n        category,\n        summary: attr.summary || '',\n        date: attr.found_at\n      });\n\n      if (isRecent) {\n        recentSignals.push(category);\n      }\n    }\n\n    // Negative signals\n    if (negativeSignals.includes(category)) {\n      negativeEvents.push({\n        category,\n        summary: attr.summary || ''\n      });\n    }\n  }\n\n  // Score logic\n  let growth_score = 0;\n\n  growth_score += recentSignals.length * 2; // recent signals strong\n  growth_score += growthSignals.length;     // total signals\n\n  if (negativeEvents.length > 0) {\n    growth_score -= negativeEvents.length * 2; // penalize\n  }\n\n  results.push({\n    json: {\n      growth_signal_count: growthSignals.length,\n      recent_signal_count: recentSignals.length,\n      negative_signal_count: negativeEvents.length,\n\n      growth_signal_categories: [...new Set(growthSignals.map(s => s.category))],\n\n      growth_signal_summary: growthSignals\n        .slice(0, 3)\n        .map(s => s.summary)\n        .join(' | '),\n\n      growth_score: growth_score,\n\n      is_high_growth: growth_score >= 5,\n\n      analyzed_at: now.toISOString()\n    }\n  });\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "c3ef931d-6b50-4c4a-b001-5f0118d2102e",
      "name": "High Growth Detected?",
      "type": "n8n-nodes-base.if",
      "position": [
        2128,
        432
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "031153cf-5b56-459a-a72e-23f48a8bf5c7",
              "operator": {
                "type": "boolean",
                "operation": "equals"
              },
              "leftValue": "={{ $json.is_high_growth }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "aaab9380-ac2e-4ff2-86b5-7b0e34630e13",
      "name": "Send Growth Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        2384,
        416
      ],
      "parameters": {
        "text": "=...",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C0AEEATQQEP",
          "cachedResultName": "buddieslab-umer"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.4
    },
    {
      "id": "c18397f1-3dad-45ca-bfdb-03ed568e543a",
      "name": "Calculate Composite Score",
      "type": "n8n-nodes-base.code",
      "position": [
        2832,
        672
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst results = [];\n\nfor (const item of items) {\n\n  const now = new Date();\n  const thirtyDaysAgo = new Date(now - 30 * 24 * 60 * 60 * 1000);\n\n  // node outputs\n  const newsRes = $('Retrieve Company News Events').first().json;\n  const jobsRes = $('Retrieve Company Job Openings').first().json;\n  const techRes = $('Retrieve Technologies').first().json;\n\n  const lookalike = $('Loop Lookalikes').first().json;\n\n  const news = newsRes.data || [];\n  const jobs = jobsRes.data || [];\n  const tech = techRes.data || [];\n  const included = techRes.included || [];\n\n  let score = 0;\n\n  // +30 Recent News\n  const recentNews = news.filter(n => {\n    const date = n.attributes?.found_at;\n    return date && new Date(date) > thirtyDaysAgo;\n  });\n\n  if (recentNews.length > 0) score += 30;\n\n  // +30 Hiring\n  const jobCount = jobs.length;\n  if (jobCount >= 5) score += 30;\n\n  // FIXED TECH NAME RESOLUTION\n  const targetTech = ['hubspot', 'salesforce', 'marketo'];\n\n  // map techId -> actual name\n  const techMap = {};\n  for (const inc of included) {\n    if (inc.type === 'technology') {\n      techMap[inc.id] = (inc.attributes?.name || '').toLowerCase();\n    }\n  }\n\n  // extract real tech names\n  const techNames = tech.map(t => {\n    const techId = t.relationships?.technology?.data?.id;\n    return techMap[techId] || '';\n  }).filter(Boolean);\n\n  const techMatch = targetTech.some(t =>\n    techNames.some(name => name.includes(t))\n  );\n\n  if (techMatch) score += 20;\n\n  // +10 similarity\n  const similarityScore = lookalike.similarity_score || 0;\n  if (similarityScore > 0.7) score += 10;\n\n  // country\n  let country = '';\n  const locEvent = news.find(n => n.attributes?.location_data?.length);\n  if (locEvent) {\n    country = locEvent.attributes.location_data[0]?.country || '';\n  }\n\n  // +10 region\n  const targetRegions = ['United States', 'United Kingdom', 'Canada'];\n  if (targetRegions.includes(country)) score += 10;\n\n  results.push({\n    json: {\n      domain: lookalike.domain || '',\n      company_name: lookalike.company_name || '',\n      source_domain: lookalike.source_domain || '',\n      similarity_score: similarityScore,\n      news_count: recentNews.length,\n      job_count: jobCount,\n      tech_names: techNames.join(', '),\n      tech_match: techMatch,\n      composite_score: score,\n      scored_at: now.toISOString()\n    }\n  });\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "15aef871-aa65-4455-a7ee-4175c304b6a7",
      "name": "Filter High Scores",
      "type": "n8n-nodes-base.if",
      "disabled": true,
      "position": [
        3056,
        672
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "4d0d80b2-ffde-4835-af87-23a69d458a22",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.composite_score }}",
              "rightValue": 70
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7312d2c1-1273-45e4-bd29-a0fffcc8ad50",
      "name": "Send High Score Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        3536,
        656
      ],
      "parameters": {
        "text": "=...",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C0AEEATQQEP",
          "cachedResultName": "buddieslab-umer"
        },
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.4
    },
    {
      "id": "dca9ac0c-96cc-49c1-8af3-b788fe5c76b3",
      "name": "Write Scored Output",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3536,
        896
      ],
      "parameters": {
        "columns": {
          "value": {
            "domain": "={{ $json.domain }}",
            "job_count": "={{ $json.job_count }}",
            "scored_at": "={{ $json.scored_at }}",
            "news_count": "={{ $json.news_count }}",
            "tech_match": "={{ $json.tech_match }}",
            "tech_names": "={{ $json.tech_names }}",
            "company_name": "={{ $json.company_name }}",
            "source_domain": "={{ $json.source_domain }}",
            "composite_score": "={{ $json.composite_score }}",
            "similarity_score": "={{ $json.similarity_score }}"
          },
          "schema": [
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "company_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "company_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "source_domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "source_domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "similarity_score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "similarity_score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "news_count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "news_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "job_count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "job_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tech_names",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tech_names",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tech_match",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tech_match",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "composite_score",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "composite_score",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "scored_at",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "scored_at",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 153216757,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo/edit#gid=153216757",
          "cachedResultName": "Scored Lookalikes"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1KDGtZcPjGlSN5OuSG5TxtTIE1BPLIDIAyTs-yIjExTo/edit?usp=drivesdk",
          "cachedResultName": "09"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f214607b-3076-4134-bceb-04f8aea2b373",
      "name": "Build Outreach Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        3536,
        432
      ],
      "parameters": {
        "jsCode": "const company = $json.company_name;\nconst domain = $json.domain;\nconst score = $json.composite_score;\n\n// SAFE email generation (fix for your error)\nconst recipientEmail = domain ? `contact@${domain}` : '';\n\nconst prompt = `Write a short B2B cold email.\n\nCompany: ${company}\nDomain: ${domain}\nLead Score: ${score}\n\nContext:\n- This company is similar to our best customers\n- Shows strong buying signals (hiring, news, tech)\n\nWrite a concise outreach email (max 120 words)\nInclude:\n- Personalized intro\n- Mention growth signals\n- CTA for quick call\n\nFormat:\nSubject: ...\nBody: ...`;\n\nreturn [{\n  json: {\n    ...$json,\n    ai_prompt: prompt,\n    recipient_email: recipientEmail\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "48724616-76e1-4780-a61e-4c59f301a2a9",
      "name": "Generate Outreach Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3744,
        432
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"gpt-4o-mini\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"You are a professional B2B sales email writer. Write concise, personalized outreach emails.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": {{ JSON.stringify($json.ai_prompt) }}\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 500\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "={{ $env.OPENAI_API_KEY ? 'Bearer ' + $env.OPENAI_API_KEY : '' }}"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5dcd7765-37cd-4a49-b76f-885b9d152d6a",
      "name": "Send Outreach Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3968,
        432
      ],
      "parameters": {
        "sendTo": "={{ $('Build Outreach Prompt').item.json.recipient_email }}",
        "message": "={{ $json.choices[0].message.content\n  .replace(/Subject:\\s*.+\\n\\n/, '')\n  .replace(/^Body:\\s*/i, '')\n}}",
        "options": {},
        "subject": "={{ $json.choices[0].message.content.match(/Subject:\\s*(.+)/)?.[1] || 'Quick idea for your team' }}",
        "emailType": "text"
      },
      "typeVersion": 2.2
    }
  ],
  "connections": {
    "Loop Clients": {
      "main": [
        [],
        [
          {
            "node": "Retrieve Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Lookalikes": {
      "main": [
        [
          {
            "node": "Loop Clients",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retrieve Company News Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Company": {
      "main": [
        [
          {
            "node": "Extract Lookalikes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Lookalikes": {
      "main": [
        [
          {
            "node": "Loop Lookalikes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter High Scores": {
      "main": [
        [
          {
            "node": "Send High Score Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Write Scored Output",
            "type": "main",
            "index": 0
          },
          {
            "node": "Build Outreach Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write Scored Output": {
      "main": [
        [
          {
            "node": "Loop Lookalikes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Outreach Prompt": {
      "main": [
        [
          {
            "node": "Generate Outreach Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Growth Signals": {
      "main": [
        [
          {
            "node": "High Growth Detected?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "High Growth Detected?": {
      "main": [
        [
          {
            "node": "Send Growth Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Technologies": {
      "main": [
        [
          {
            "node": "Calculate Composite Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Outreach Email": {
      "main": [
        [
          {
            "node": "Send Outreach Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Best Client Domains": {
      "main": [
        [
          {
            "node": "Loop Clients",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Composite Score": {
      "main": [
        [
          {
            "node": "Filter High Scores",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Company News Events": {
      "main": [
        [
          {
            "node": "Retrieve Company Job Openings",
            "type": "main",
            "index": 0
          },
          {
            "node": "Detect Growth Signals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve Company Job Openings": {
      "main": [
        [
          {
            "node": "Retrieve Technologies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Read Best Client Domains",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}