Generate ideal customer profile leads & personalized pitches with GPT-4o-mini, Perplexity and Apify
n8n Workflow: Automated Lead Generation & Personalized Outreach
Overview
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.
Workflow Components
1. JotForm Trigger
Purpose: Form Submission Entry Point
- Captures business information through JotForm (Form ID: 252802732808054)
- Initiates the automation workflow when form is submitted
- Collects company website and business details
2. Perplexity API Integration
Purpose: Company Analysis
- Method: POST request to Perplexity AI Search API
- Function: Performs detailed research on the submitted company website
- Output: Comprehensive business intelligence and market positioning data
3. ICP Finder (OpenAI GPT-4o-mini)
Purpose: Ideal Customer Profile Creation
- Model: GPT-4o-mini
- Role: Expert client acquisition manager
- Task: Analyzes company details and generates best-fit customer profile
- Input: Company snippet from Perplexity research
- Output: Detailed ICP description
4. Edit Fields
Purpose: Data Transformation
- Extracts and formats the ICP output
- Prepares data for next workflow stage
- Ensures clean data flow between nodes
5. ICP Industry Finder (OpenAI GPT-4o-mini)
Purpose: Industry Classification
- Model: GPT-4o-mini
- Role: Expert ICP analyzer
- Task: Identifies specific business sector matching the ICP
- Rules:
- Returns single industry sector only
- Uses professional terminology (e.g., "healthcare", "call centre", "plumber")
- Excludes all SaaS-related companies
- Avoids generic terms like "technology industry"
- Output: Single industry sector name
6. Leads Generator (Apify API)
Purpose: Lead Discovery
- API: Local Business Lead Generator by james.logantech
- Method: Synchronous run with dataset items retrieval
- Configuration:
- Location: United States
- Maximum Results: 5 leads
- Business Types: Based on ICP industry output
- Output: List of qualified business leads
7. Loop Over Items
Purpose: Batch Processing
- Processes leads individually
- Enables personalized email creation for each lead
- Controls workflow iteration
8. Personalized Emails (Apify API)
Purpose: Custom Email Generation
- API: Pitches Pro by onescales
- Method: Synchronous run with dataset items retrieval
- Configuration:
- Promoting: Automation services
- Benefits: "Save 10+ hours per week by automating manual tasks"
- Goal: Partnership
- Tone: Professional yet approachable, confident but not pushy
- Language: English
- Additional Notes: Focus on time-saving, avoid technical jargon, include soft CTA
- Output: Personalized email for each lead
Data Flow
JotForm → Perplexity Analysis → ICP Generation → Field Formatting →
Industry Classification → Lead Discovery → Batch Processing → Email Personalization
Key Features
✅ Fully Automated: No manual intervention required
✅ AI-Powered: Uses GPT-4o-mini for intelligent ICP analysis
✅ Personalized: Custom emails for each prospect
✅ Scalable: Processes multiple leads in batches
✅ Time-Saving: Automates 10+ hours of manual work per week
Requirements
- APIs Required:
- Perplexity AI (with Authorization token)
- OpenAI (GPT-4o-mini access)
- Apify (2 actors: Local Business Lead Generator & Pitches Pro)
- Form Platform: JotForm account
- n8n Instance: Self-hosted or cloud
Generate Ideal Customer Profile Leads & Personalized Pitches with GPT-4o-mini, Perplexity, and Apify
This n8n workflow automates the process of generating ideal customer profiles (ICPs) and personalized sales pitches. It leverages AI models like GPT-4o-mini and Perplexity for content generation and Apify for data extraction, all triggered by new form submissions.
What it does
This workflow streamlines your lead generation and outreach by:
- Triggering on New Form Submissions: Listens for new submissions from a Jotform form.
- Editing Fields: Processes the incoming form data, likely extracting key information for further use.
- Looping Over Items: Iterates through multiple items, potentially for processing several leads or variations.
- Making HTTP Requests: Sends HTTP requests, which could be used for interacting with APIs like Apify for data scraping or Perplexity for information retrieval.
- Generating AI Content with OpenAI: Utilizes the OpenAI node (likely GPT-4o-mini) to generate content, such as ideal customer profiles or personalized pitch drafts, based on the gathered data.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- Jotform Account: An active Jotform account with a configured form to trigger the workflow.
- OpenAI API Key: An API key for OpenAI (for GPT-4o-mini access).
- Apify Account (Likely): While not explicitly shown in the provided JSON, the directory name hints at Apify usage. An Apify account and relevant API tokens would likely be needed for data scraping.
- Perplexity API Key (Likely): The directory name also suggests Perplexity usage. An API key for Perplexity would likely be required for advanced search or content generation.
Setup/Usage
- Import the Workflow: Download the provided JSON and import it into your n8n instance.
- Configure Jotform Trigger:
- Set up your Jotform credential in n8n.
- Select the specific Jotform form that will trigger this workflow.
- Configure OpenAI Node:
- Set up your OpenAI credential in n8n with your API key.
- Review and adjust the prompts within the OpenAI node to generate the desired ICPs and personalized pitches.
- Configure HTTP Request Nodes:
- If using Apify or Perplexity, set up the necessary credentials (API keys/tokens) for these services in n8n.
- Adjust the HTTP Request nodes to correctly interact with the Apify and Perplexity APIs, including endpoint URLs and request bodies.
- Activate the Workflow: Once all credentials and configurations are set, activate the workflow.
Now, every time a new submission is received via your configured Jotform, the workflow will automatically process the data, generate insights and content using AI, and perform any configured API calls.
Related Templates
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) 🧠 AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative — all powered by AI logic, sir. --- 💡 Key Advantages ⚡ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. 🧠 AI Qualification Engine An OpenAI-powered Agent evaluates the lead’s industry, region, and needs to generate a persona summary and routing rationale. 📊 Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. 💬 Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. 🔁 Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- ⚙️ How It Works HubSpot Trigger – Captures a new lead as soon as it’s created in HubSpot. Fetch Contact Data – Retrieves all relevant fields like name, company, and industry. Clean & Format Data – A Code node standardizes and structures the data for consistency. Airtable Record Creation – Logs the lead data into the “Leads” table for centralized tracking. AI Agent Qualification – The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update – Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification – Sends a real-time message tagging the rep with lead info. Gmail Notification – Sends a personalized handoff email with context and follow-up actions. HubSpot Sync – Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- 🛠️ Setup Steps Trigger Node: HubSpot → Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the “Leads” table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- 🔐 Credentials Required HubSpot OAuth2 API – To fetch and update leads. Airtable Personal Access Token – To store and update lead data. OpenAI API – To power the AI qualification and matching logic. Slack OAuth2 – For sending team notifications. Gmail OAuth2 – For automatic email alerts to assigned reps, sir. --- 👤 Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- 💬 Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular — perfect for scaling across global sales teams, sir.
Track daily moods with AI analysis & reports using GPT-4o, Data Tables & Gmail
Track your daily mood in one tap and receive automated AI summaries of your emotional trends every week and month. Perfect for self-reflection, wellness tracking, or personal analytics. This workflow logs moods sent through a webhook (/mood) into Data Tables, analyzes them weekly and monthly with OpenAI (GPT-4o), and emails you clear summaries and actionable recommendations via Gmail. ⚙️ How It Works Webhook – Mood → Collects new entries (🙂, 😐, or 😩) plus an optional note. Set Mood Data → Adds date, hour, and note fields automatically. Insert Mood Row → Stores each record in a Data Table. Weekly Schedule (Sunday 20:00) → Aggregates the last 7 days and sends a summarized report. Monthly Schedule (Day 1 at 08:00) → Aggregates the last 30 days for a deeper AI analysis. OpenAI Analysis → Generates insights, patterns, and 3 actionable recommendations. Gmail → Sends the full report (chart + AI text) to your inbox. 📊 Example Auto-Email Weekly Mood Summary (last 7 days) 🙂 5 ██████████ 😐 2 ████ 😩 0 Average: 1.7 (Positive 🙂) AI Insights: You’re trending upward this week — notes show that exercise days improved mood. Try keeping short walks mid-week to stabilize energy. 🧩 Requirements n8n Data Tables enabled OpenAI credential (GPT-4o or GPT-4 Turbo) Gmail OAuth2 credential to send summaries 🔧 Setup Instructions Connect your credentials: Add your own OpenAI and Gmail OAuth2 credentials. Set your Data Table ID: Open the Insert Mood Row node and enter your own Data Table ID. Without this, new moods won’t be stored. Replace the email placeholder: In the Gmail nodes, replace your.email@example.com with your actual address. Deploy and run: Send a test POST request to /mood (e.g. { "mood": "🙂", "note": "productive day" }) to log your first entry. ⚠️ Before activating the workflow, ensure you have configured the Data Table ID in the “Insert Mood Row” node. 🧠 AI Analysis Interprets mood patterns using GPT-4o. Highlights trends, potential triggers, and suggests 3 specific actions. Runs automatically every week and month. 🔒 Security No personal data is exposed outside your n8n instance. Always remove or anonymize credential references before sharing publicly. 💡 Ideal For Personal mood journaling and AI feedback Therapists tracking client progress Productivity or self-quantification projects 🗒️ Sticky Notes Guide 🟡 Mood Logging Webhook POST /mood receives mood + optional note. ⚠️ Configure your own Data Table ID in the “Insert Mood Row” node before running. 🟢 Weekly Summary Runs every Sunday 20:00 → aggregates last 7 days → generates AI insights + emails report. 🔵 Monthly Summary Runs on Day 1 at 08:00 → aggregates last 30 days → creates monthly reflection. 🟣 AI Analysis Uses OpenAI GPT-4o to interpret trends and recommend actions. 🟠 Email Delivery Sends formatted summaries to your inbox automatically.
Create, update, and get a person from Copper
This workflow allows you to create, update, and get a person from Copper. Copper node: This node will create a new person in Copper. Copper1 node: This node will update the information of the person that we created using the previous node. Copper2 node: This node will retrieve the information of the person that we created earlier.