AutomationFlowsAI & RAG › Generate Ideal Customer Profile Leads & Personalized Pitches with…

Generate Ideal Customer Profile Leads & Personalized Pitches with…

Original n8n title: Generate Ideal Customer Profile Leads & Personalized Pitches with Gpt-4o-mini, Perplexity and Apify

Byneightn011 @neightn011 on n8n.io

This n8n workflow automates the entire lead generation and personalized email creation process for businesses. It analyzes a company's profile, identifies ideal customer profiles (ICP), finds matching leads, and generates customized outreach emails.

Event trigger★★★★☆ complexityAI-powered14 nodesJot Form TriggerHTTP RequestOpenAI
AI & RAG Trigger: Event Nodes: 14 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the HTTP Request → OpenAI 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": "BYoMCe7Hcdg2bajF",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "jotform",
  "tags": [],
  "nodes": [
    {
      "id": "511c3ef7-63ec-4ff7-b718-e3932830f4ad",
      "name": "JotForm Trigger",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -352,
        368
      ],
      "parameters": {
        "form": "252802732808054"
      },
      "credentials": {
        "jotFormApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8e5db775-0fe8-45a2-b79e-010e479216db",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        448,
        368
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8b5e28c4-1912-4a3a-865a-f9cd3f8c271c",
              "name": "ICP",
              "type": "string",
              "value": "={{ $('ICP finder').item.json.message.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c85c8737-d208-410d-bee5-f15b1aee6694",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1440,
        368
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "25c016e8-900e-43b4-9cda-e48ce8437089",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        288
      ],
      "parameters": {
        "width": 208,
        "height": 240,
        "content": "Fill the form about the business you want ot generate leads for"
      },
      "typeVersion": 1
    },
    {
      "id": "c669483f-c29a-4430-8b29-27f00a81ae0d",
      "name": "perplexity",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -128,
        368
      ],
      "parameters": {
        "url": "https://api.perplexity.ai/search",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"query\": [\n    \"{{ $json.website }}\"\n  ]\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": ""
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b8044010-b8af-493f-a35c-793a22104aa0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        288
      ],
      "parameters": {
        "height": 240,
        "content": "Analyze the company in a detailed way"
      },
      "typeVersion": 1
    },
    {
      "id": "46422213-8ec6-4998-b4d7-d6d2737fb3a9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        288
      ],
      "parameters": {
        "height": 240,
        "content": "Creates ICP that suited best for the company"
      },
      "typeVersion": 1
    },
    {
      "id": "5d061958-aa1b-4312-b98a-aaf5192f97c9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        288
      ],
      "parameters": {
        "height": 240,
        "content": "Finds the industry for the ideal prosppects"
      },
      "typeVersion": 1
    },
    {
      "id": "4cf3266d-20f8-453c-b050-2d26899cd423",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        288
      ],
      "parameters": {
        "height": 240,
        "content": "Find leads for the company\n"
      },
      "typeVersion": 1
    },
    {
      "id": "70c3985c-eae5-4239-9896-9ca61b8529ab",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        320
      ],
      "parameters": {
        "height": 240,
        "content": "Create personalized emails for them\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3014fbb0-44f4-4fb2-8b7b-a4624c33ce88",
      "name": "personalized emails",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1744,
        384
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/onescales~pitches-pro/run-sync-get-dataset-items?token=",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"additionalNotes\": \"Focus on the time-saving aspect. Avoid technical jargon. Include a soft CTA.\",\n    \"benefits\": \"Save 10+ hours per week by automating manual tasks \",\n    \"businessName\": \"{{ $json.name }}\",\n    \"goal\": \"Partnership\",\n    \"language\": \"English\",\n    \"tone\": \"Professional yet approachable, confident but not pushy\",\n    \"whatPromoting\": \"Our automation services.\"\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "299ceae3-4bb9-4add-bd76-59c989b13d67",
      "name": "Leads",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1024,
        368
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/james.logantech~local-business-lead-generator/run-sync-get-dataset-items?token=",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"buisness_types\": [\n        \"{{ $json.message.content }}\"\n    ],\n    \"location\": \"United states\",\n    \"max_results\": 5\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "11ee05c2-d8d9-44a6-89ae-76bcf77e8852",
      "name": "ICP finder",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        96,
        368
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert client acquisition manager your task is to find icp for the company provided to you."
            },
            {
              "content": "=Your task is to find the best customer type for the company details provided.\n\nDetails:\n{{ $json.results[0].snippet }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "4d364b6f-cd4e-449a-b41f-bf466d680475",
      "name": "ICP industry finder",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        672,
        368
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "you are an expert ideal client profile analyzer your task is to find a type of business that falls into icp model and give a icp sector."
            },
            {
              "content": "= your task is to find a type of business that falls into icp model and give a icp sector.\n\nRULE:\nOnly give one sector . don't use any absurd type of sector like . only give the raw single output no extra text use a professional term for icp industries.exclude all \"saas \" related companies\nexample:\n\"healthcare\" or \"call centre\"or \"plumber\" \n\nnot output:\n\"dont use something like \"technology\"industry\"\n\nICP:{{ $json.ICP }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7d34a0b9-4473-4c7f-b5fa-d1a8c3290581",
  "connections": {
    "Leads": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ICP finder": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "perplexity": {
      "main": [
        [
          {
            "node": "ICP finder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "ICP industry finder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JotForm Trigger": {
      "main": [
        [
          {
            "node": "perplexity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "personalized emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ICP industry finder": {
      "main": [
        [
          {
            "node": "Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "personalized emails": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "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

This n8n workflow automates the entire lead generation and personalized email creation process for businesses. It analyzes a company's profile, identifies ideal customer profiles (ICP), finds matching leads, and generates customized outreach emails.

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

More AI & RAG workflows → · Browse all categories →

Related workflows

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

AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5
AI & RAG

This intelligent email automation workflow helps you maximize engagement through domain-based outreach. It utilizes AI-powered personalization and strategic follow-ups to increase response rates. The

Gmail, HTTP Request, Google Sheets +1
AI & RAG

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid AP

Form Trigger, Google Sheets Trigger, OpenAI +2
AI & RAG

Scrape ads – Pulls Facebook Ad Library data for "ai automation" keywords using Apify Filter & sort – Filters ads by page likes (&gt;1,000) and separates into videos, images, and text ads Analyze creat

HTTP Request, Google Drive, OpenAI +3