AutomationFlowsMarketing & Ads › Track New Complementary-tool Adopters with Predictleads, Google Sheets,…

Track New Complementary-tool Adopters with Predictleads, Google Sheets,…

Original n8n title: Track New Complementary-tool Adopters with Predictleads, Google Sheets, Openai and Gmail

ByYaron Been @yaron-nofluff on n8n.io

Track companies adopting tools that complement yours and send AI-drafted co-marketing outreach emails to new adopters.

Cron / scheduled trigger★★★★☆ complexity18 nodesGoogle SheetsHTTP RequestGmail
Marketing & Ads Trigger: Cron / scheduled Nodes: 18 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #14099 — we link there as the canonical source.

This workflow follows the Gmail → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "0hIiPKtrPg4gXg8M",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Complementary Tool Enrichment & Co-Marketing Outreach with PredictLeads",
  "tags": [],
  "nodes": [
    {
      "id": "771fd4bc-bc7e-432a-9656-1ae503c4c93d",
      "name": "About This Workflow",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2480,
        192
      ],
      "parameters": {
        "color": 4,
        "width": 420,
        "height": 400,
        "content": "ABOUT THIS WORKFLOW\n\nTracks companies adopting tools that complement yours and sends AI-drafted co-marketing outreach emails to new adopters.\n\nSetup: Google Sheet with tool names and PredictLeads tech IDs, Gmail OAuth2, OpenAI API key, PredictLeads API.\n\nUse case: You have an analytics tool that pairs well with HubSpot. This detects new HubSpot adopters and sends a partnership pitch offering a joint webinar or integration guide.\n\nPredictLeads API: https://predictleads.com\nQuestions: https://www.linkedin.com/in/yaronbeen"
      },
      "typeVersion": 1
    },
    {
      "id": "eb4a3316-45e9-4170-bc4b-973609eeb54b",
      "name": "\ud83d\udccb Trigger & Input",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1936,
        -96
      ],
      "parameters": {
        "color": 5,
        "width": 480,
        "height": 664,
        "content": "## 1\ufe0f\u20e3 Trigger & Tool Source\n\n**Nodes:**  \n\u23f0 Daily Schedule \u2192 \ud83d\udcd1 Read Complementary Tools List\n\n**Description:**  \nThe workflow starts with a scheduled trigger that runs every day.  \nIt reads a list of complementary tools from Google Sheets. Each row contains the **tool name** and **PredictLeads technology ID**.  \n\nThis sheet acts as the source dataset that defines which technologies should be monitored.  \nThe goal is to detect companies that start using these tools because they may be strong **co-marketing or partnership prospects**."
      },
      "typeVersion": 1
    },
    {
      "id": "49085e0d-a898-4e27-873d-00fda6aa1c05",
      "name": "\ud83d\udd04 Discovery & Change Detection",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        -112
      ],
      "parameters": {
        "color": 5,
        "width": 1196,
        "height": 680,
        "content": "## 2\ufe0f\u20e3 Technology Discovery & Change Detection\n\n**Nodes:**  \n\ud83d\udd00 Split by Tool \u2192 \ud83d\udd0d Discover Technology Adopters \u2192 \ud83d\udcd1 Read Previous Scan Data \u2192 \u2699\ufe0f Compare & Detect New Adoptions \u2192 \u2705 New Adoption Detected?\n\n**Description:**  \nEach tool from the sheet is processed individually using **Split in Batches**.  \n\nThe workflow calls the **PredictLeads Technology Detections API** to retrieve companies that recently adopted the specified technology.  \nIt then loads previously scanned domains from another Google Sheet tab to avoid duplicate processing.  \n\nA code node compares the newly detected companies with the previously stored domains and identifies **new technology adopters**.  \nOnly companies that appear for the first time are allowed to continue through the workflow."
      },
      "typeVersion": 1
    },
    {
      "id": "6c3ed27a-2365-48ce-a625-a574e17c68fb",
      "name": "\ud83e\udd16 AI Outreach",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 796,
        "height": 696,
        "content": "## 3\ufe0f\u20e3 Company Enrichment & AI Outreach Preparation\n\n**Nodes:**  \nLimit \u2192 \ud83d\udd0d Enrich Company \u2192 \u2699\ufe0f Build AI Prompt \u2192 \ud83e\udd16 Draft Co-Marketing Email\n\n**Description:**  \nThe workflow optionally limits the number of companies processed per run to control outreach volume.  \n\nFor each new adopter, additional company details are fetched from the **PredictLeads company API**.  \nThis enriched data is used to generate a structured prompt describing the company, the detected tool adoption, and the potential partnership context.  \n\nThe prompt is then sent to **OpenAI**, which generates a personalized co-marketing outreach email tailored to the company."
      },
      "typeVersion": 1
    },
    {
      "id": "bece53e7-ee09-4c66-a457-75c0f3023a83",
      "name": "\ud83d\udce4 Output",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -96
      ],
      "parameters": {
        "color": 5,
        "width": 544,
        "height": 664,
        "content": "## 4\ufe0f\u20e3 Outreach & Data Logging\n\n**Nodes:**  \n\ud83d\udce7 Send Co-Marketing Email \u2192 \ud83d\udcd1 Update Previous Scan Data\n\n**Description:**  \nThe AI-generated email is sent through Gmail to the target company.  \n\nAfter sending the email, the workflow logs the domain, tool name, detection timestamp, and email status into Google Sheets.  \nThis log acts as a **historical database of detected adopters**, ensuring the workflow does not send duplicate outreach emails in future runs."
      },
      "typeVersion": 1
    },
    {
      "id": "db3013a4-0a51-4893-93d8-6ef156f1cf9e",
      "name": "\u23f0 Daily Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1856,
        336
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "55062280-f4da-4810-9bd1-b49ec29ec7df",
      "name": "\ud83d\udcd1 Read Complementary Tools List",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1648,
        336
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit#gid=0",
          "cachedResultName": "Complementary Tools"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID_05",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit?usp=drivesdk",
          "cachedResultName": "05"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "3d2d85da-557d-43ca-8bda-76e8a3bce8d4",
      "name": "\ud83d\udd00 Split by Tool",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1296,
        336
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "6183c254-804d-499a-8778-1a0911c64295",
      "name": "\ud83d\udd0d Discover Technology Adopters",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1056,
        352
      ],
      "parameters": {
        "url": "=https://predictleads.com/api/v3/discover/technologies/{{ $json.tech_id }}/technology_detections",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "YOUR_PREDICTLEADS_API_KEY"
            },
            {
              "name": "X-Api-Token",
              "value": "YOUR_PREDICTLEADS_API_TOKEN"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "04d285d8-9355-484c-ae26-83c9c4790445",
      "name": "\ud83d\udcd1 Read Previous Scan Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -832,
        352
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 423252497,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit#gid=423252497",
          "cachedResultName": "Previous Scan"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID_05",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit?usp=drivesdk",
          "cachedResultName": "05"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5,
      "alwaysOutputData": true
    },
    {
      "id": "8f7ac7af-4e7b-4e28-8ae8-10541b6541f2",
      "name": "\u2699\ufe0f Compare & Detect New Adoptions",
      "type": "n8n-nodes-base.code",
      "position": [
        -592,
        352
      ],
      "parameters": {
        "jsCode": "// Get current technology detection results\nconst currentDetections = $('\ud83d\udd0d Discover Technology Adopters').first().json.data || [];\n\n// Get previous scan domains from Google Sheets\nconst previousItems = $('\ud83d\udcd1 Read Previous Scan Data').all();\nconst previousDomains = new Set(\n  previousItems.map(item => item.json.domain).filter(Boolean)\n);\n\n// Find new adoptions (domains not seen before)\nconst newAdoptions = currentDetections.filter(\n  detection => !previousDomains.has(detection.attributes?.domain)\n);\n\n// Return new adoptions for downstream processing\nreturn newAdoptions.map(detection => ({\n  json: {\n    domain: detection.attributes?.domain || detection.domain,\n    tool_name: $('\ud83d\udd00 Split by Tool').first().json.tool_name,\n    tech_id: $('\ud83d\udd00 Split by Tool').first().json.tech_id,\n    detected_at: detection.attributes?.first_detected_at || new Date().toISOString(),\n    is_new: true\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "262e554e-cf12-4c00-88ad-6f3eaf14b717",
      "name": "\u2705 New Adoption Detected?",
      "type": "n8n-nodes-base.if",
      "position": [
        -400,
        352
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f2a3b4c5-d6e7-4f80-9102-1324a5b6c7d8",
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.is_new }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "50c4d2ac-930e-47d8-b55d-2db7327f686d",
      "name": "\ud83d\udd0d Enrich Company",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        128,
        336
      ],
      "parameters": {
        "url": "=https://predictleads.com/api/v3/companies/{{ $('\ud83d\udcd1 Read Previous Scan Data').first().json.domain }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "YOUR_PREDICTLEADS_API_KEY"
            },
            {
              "name": "X-Api-Token",
              "value": "YOUR_PREDICTLEADS_API_TOKEN"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c4a28b31-c2f1-4411-89c9-6f0415c785fa",
      "name": "\u2699\ufe0f Build AI Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        336
      ],
      "parameters": {
        "jsCode": "const results = [];\n\nconst toolName = $('\u2699\ufe0f Compare & Detect New Adoptions').first().json.tool_name;\n\nfor (const item of $input.all()) {\n\n  const company = item.json.data?.[0]?.attributes || {};\n\n  const domain = company.domain || '';\n  const companyName = company.company_name || company.friendly_company_name || domain;\n\n  const industry = company.industry || 'technology';\n  const size = company.employee_count || 'unknown';\n  const description = company.description || '';\n\n  const prompt = `You are a B2B partnerships expert. Draft a concise, friendly co-marketing outreach email.\n\nContext:\n- We noticed that ${companyName} (${domain}) recently adopted ${toolName}.\n- Our product is complementary to ${toolName} and we believe there is a strong co-marketing opportunity.\n- Company industry: ${industry}\n- Company size: ${size} employees\n- Company description: ${description}\n\nRequirements:\n- Subject line included at the top as \"Subject: ...\"\n- Professional but warm tone\n- Mention the complementary nature of our tools\n- Propose a specific co-marketing idea (joint webinar, co-authored content, integration showcase)\n- Keep it under 200 words\n- End with a clear call-to-action`;\n\n  results.push({\n    json: {\n      prompt,\n      company_name: companyName,\n      domain: domain,\n      tool_name: toolName,\n      industry: industry,\n      employee_count: size\n    }\n  });\n\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "40bd56a4-9920-4c1a-a62c-a3c1017514a1",
      "name": "\ud83e\udd16 Draft Co-Marketing Email",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        528,
        336
      ],
      "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 B2B co-marketing outreach specialist. Write concise, personalized partnership emails.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": {{ JSON.stringify($json.prompt) }}\n    }\n  ],\n  \"temperature\": 0.7,\n  \"max_tokens\": 500\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "86468b61-ad14-43e2-bed7-f5fd65c5459b",
      "name": "\ud83d\udce7 Send Co-Marketing Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        896,
        336
      ],
      "parameters": {
        "sendTo": "={{ $('\u2699\ufe0f Build AI Prompt').item.json.domain.split('.')[0] + '@example.com' }}",
        "message": "={{ $json.choices[0].message.content }}",
        "options": {},
        "subject": "=Co-Marketing Partnership Opportunity - {{ $('\u2699\ufe0f Build AI Prompt').item.json.company_name }}",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "f31971ae-f387-4f36-94d0-f4204aa72c0d",
      "name": "\ud83d\udcd1 Update Previous Scan Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1104,
        336
      ],
      "parameters": {
        "columns": {
          "value": {
            "domain": "={{ $('\u2699\ufe0f Build AI Prompt').item.json.domain }}",
            "tool_name": "={{ $('\u2699\ufe0f Build AI Prompt').item.json.tool_name }}",
            "email_sent": "true",
            "detected_at": "={{ $now.toISO() }}"
          },
          "schema": [
            {
              "id": "domain",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "domain",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tool_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "tool_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "detected_at",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "detected_at",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_sent",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email_sent",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 423252497,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit#gid=423252497",
          "cachedResultName": "Previous Scan"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID_05",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID_05/edit?usp=drivesdk",
          "cachedResultName": "05"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "49f3612a-fac1-48e7-b710-0f3bc945241f",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        -48,
        336
      ],
      "parameters": {
        "maxItems": 2
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "d5960a23-f181-4436-9014-5a626271e1a8",
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "\ud83d\udd0d Enrich Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u23f0 Daily Schedule": {
      "main": [
        [
          {
            "node": "\ud83d\udcd1 Read Complementary Tools List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd00 Split by Tool": {
      "main": [
        [],
        [
          {
            "node": "\ud83d\udd0d Discover Technology Adopters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd0d Enrich Company": {
      "main": [
        [
          {
            "node": "\u2699\ufe0f Build AI Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2699\ufe0f Build AI Prompt": {
      "main": [
        [
          {
            "node": "\ud83e\udd16 Draft Co-Marketing Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2705 New Adoption Detected?": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\ud83d\udd00 Split by Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcd1 Read Previous Scan Data": {
      "main": [
        [
          {
            "node": "\u2699\ufe0f Compare & Detect New Adoptions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce7 Send Co-Marketing Email": {
      "main": [
        [
          {
            "node": "\ud83d\udcd1 Update Previous Scan Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83e\udd16 Draft Co-Marketing Email": {
      "main": [
        [
          {
            "node": "\ud83d\udce7 Send Co-Marketing Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcd1 Update Previous Scan Data": {
      "main": [
        [
          {
            "node": "\ud83d\udd00 Split by Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd0d Discover Technology Adopters": {
      "main": [
        [
          {
            "node": "\ud83d\udcd1 Read Previous Scan Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udcd1 Read Complementary Tools List": {
      "main": [
        [
          {
            "node": "\ud83d\udd00 Split by Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2699\ufe0f Compare & Detect New Adoptions": {
      "main": [
        [
          {
            "node": "\u2705 New Adoption Detected?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Track companies adopting tools that complement yours and send AI-drafted co-marketing outreach emails to new adopters.

Source: https://n8n.io/workflows/14099/ — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Marketing & Ads

I created this workflow with great care to help you simplify your daily reporting routine. If you manage Meta Ads campaigns, you know how time-consuming it can be to open Ads Manager, filter data, and

Google Sheets, Facebook Graph Api, Gmail +1
Marketing & Ads

This workflow monitors Meta Ads and Google Ads campaigns on a daily schedule to detect performance drops. It fetches yesterday’s campaign data, standardizes metrics, and calculates CTR and ROAS agains

Google Sheets, HTTP Request, Slack +3
Marketing & Ads

Automatically qualify, score, and route inbound B2B leads using GPT-4o-mini — no manual review needed.

HTTP Request, Slack, Gmail +1
Marketing & Ads

This workflow transforms your Meta Ads creatives into a rich dataset of actionable insights. It's designed for data-driven marketers, performance agencies, and analysts who want to move beyond basic m

Facebook Graph Api, HTTP Request, Google Sheets
Marketing & Ads

I built this workflow to remove the daily pain of Meta Ads reporting. If you manage multiple ad accounts, you know how time-consuming it is to open Ads Manager, export campaign data, clean spreadsheet

Google Sheets, HTTP Request, Telegram