Back to Catalog

Deep Research - Sales Lead Magnet Agent

Max MitchamMax Mitcham
27616 views
2/3/2026
Official Page

Want to check out all my flows, follow me on:

https://maxmitcham.substack.com/

https://www.linkedin.com/in/max-mitcham/

This automation flow is designed to generate comprehensive, research-backed lead magnet articles based on a user-submitted topic, conduct deep research across multiple sources, and automatically create a professional Google Doc ready for LinkedIn sharing.

โš™๏ธ How It Works (Step-by-Step):

  1. ๐Ÿ“ Chat Input (Entry Point) A user submits a topic through the chat interface:
Topic for lead magnet content
Target audience (automatically detected)
Company context (when relevant)
  1. ๐Ÿ” Query Builder Agent An AI agent refines the input by:
Converting the topic into 5 targeted research queries
Determining if topic relates to *company for specialized research
Using structured output parsing for consistent results
  1. ๐Ÿ“š Research Leader Agent Conducts comprehensive research that:
Uses Perplexity API for real-time web research
Integrates *company knowledge base when relevant
Creates detailed table of contents with research insights
Identifies key trends, expert opinions, and case studies
  1. ๐Ÿ“‹ Project Planner Agent Structures the content by:
Generating professional title and subtitle
Creating 8-10 logical chapter outlines
Developing detailed writing prompts for each section
Ensuring step-by-step actionable guidance
  1. โœ๏ธ Research Assistant Team Multiple AI agents write simultaneously:
Each agent writes one chapter with proper citations
Maintains consistent voice across all sections
Includes real-world examples and implementation steps
Uses both web research and *company knowledge
  1. ๐Ÿ“ Editor Agent Professional content polishing:
Refines tone for authenticity and engagement
Adds image placeholders where appropriate
Ensures proper flow between chapters
Optimizes for LinkedIn lead magnet format
  1. ๐Ÿ“„ Google Docs Creation Automated document generation:
Creates new Google Doc with formatted content
Sets proper sharing permissions (public link)
Organizes in designated company folder
Returns shareable URL for immediate use

๐Ÿ› ๏ธ Tools Used:

n8n: Workflow orchestration platform
Anthropic Claude: Primary AI model for content generation
OpenRouter: Backup AI model options
Perplexity API: Real-time research capabilities
*Company Knowledge Hub: Internal documentation access
Google Docs API: Document creation and formatting
Google Drive API: File management and sharing

๐Ÿ“ฆ Key Features:

End-to-end automation from topic to published document
Multi-agent approach ensures comprehensive coverage
Real-time research with proper citations
Company-specific knowledge integration
Professional editing and formatting
Automatic Google Docs creation with sharing
Scalable content generation (3-5 minutes per article)

๐Ÿš€ Ideal Use Cases:

B2B companies building thought leadership content
Sales teams creating industry-specific lead magnets
Marketing departments scaling content production
Consultants developing expertise-demonstrating resources
SaaS companies creating feature-focused educational content
Startups establishing market presence without content teams

n8n Deep Research - Sales Lead Magnet Agent

This n8n workflow orchestrates an AI agent to perform deep research and generate sales lead magnets based on a chat message prompt. It leverages various AI and utility nodes to create a sophisticated research and content generation process.

What it does

This workflow automates the following steps:

  1. Listens for a Chat Message: The workflow is triggered by an incoming chat message, which serves as the prompt for the AI agent.
  2. Initial Data Preparation: It initializes the workflow by setting up a chatId based on the incoming chat message.
  3. AI Agent Execution: An AI agent is invoked to perform "deep research" and generate a "sales lead magnet".
    • Anthropic Chat Model: The AI agent utilizes an Anthropic Chat Model (likely Claude) for its language model capabilities.
    • Structured Output Parser: The agent's output is processed by a Structured Output Parser to ensure the generated content adheres to a predefined JSON schema, making it easy to consume downstream.
    • Call n8n Workflow Tool: The AI agent has the capability to call other n8n workflows as tools, allowing for complex sub-tasks and integrations.
    • HTTP Request Tool: The AI agent can also make HTTP requests, enabling it to fetch data from external APIs or web services.
    • OpenRouter Chat Model: An OpenRouter Chat Model is also available as an alternative or supplementary language model for the AI agent.
  4. Merge AI Agent Output: The output from the AI agent is merged into the workflow's data stream.
  5. Split Out Content: The merged content is then split out, likely to process individual components of the generated lead magnet.
  6. Code Execution: A Code node is used, potentially for custom logic, data manipulation, or formatting of the AI-generated content.
  7. Google Drive & Google Docs Integration: The workflow interacts with Google Drive and Google Docs. This suggests that the generated sales lead magnet might be stored as a document in Google Docs, potentially within a specific folder in Google Drive.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • Anthropic API Key: For the Anthropic Chat Model.
  • OpenRouter API Key (Optional): If you intend to use the OpenRouter Chat Model.
  • Google Account: With access to Google Drive and Google Docs, and appropriate n8n credentials configured for these services.
  • n8n Workflow Tool (Optional): If the AI agent is configured to call other n8n workflows, those workflows must exist and be accessible.
  • HTTP Request Tool (Optional): Any external APIs or services the HTTP Request Tool might interact with.

Setup/Usage

  1. Import the Workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Set up your Anthropic Chat Model credential with your API key.
    • (Optional) Set up your OpenRouter Chat Model credential with your API key.
    • Configure your Google Account credential for Google Drive and Google Docs access.
  3. Activate the Workflow: Once credentials are set, activate the workflow.
  4. Trigger the Workflow: Send a chat message to the configured chat trigger to initiate the deep research and lead magnet generation process. The AI agent will then process the request, generate the content, and save it to Google Docs.
  5. Review Output: Check your Google Drive and Google Docs for the generated sales lead magnet.

Related Templates

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Ai website scraper & company intelligence

AI Website Scraper & Company Intelligence Description This workflow automates the process of transforming any website URL into a structured, intelligent company profile. It's triggered by a form, allowing a user to submit a website and choose between a "basic" or "deep" scrape. The workflow extracts key information (mission, services, contacts, SEO keywords), stores it in a structured Supabase database, and archives a full JSON backup to Google Drive. It also features a secondary AI agent that automatically finds and saves competitors for each company, building a rich, interconnected database of company intelligence. --- Quick Implementation Steps Import the Workflow: Import the provided JSON file into your n8n instance. Install Custom Community Node: You must install the community node from: https://www.npmjs.com/package/n8n-nodes-crawl-and-scrape FIRECRAWL N8N Documentation https://docs.firecrawl.dev/developer-guides/workflow-automation/n8n Install Additional Nodes: n8n-nodes-crawl-and-scrape and n8n-nodes-mcp fire crawl mcp . Set up Credentials: Create credentials in n8n for FIRE CRAWL API,Supabase, Mistral AI, and Google Drive. Configure API Key (CRITICAL): Open the Web Search tool node. Go to Parameters โ†’ Headers and replace the hardcoded Tavily AI API key with your own. Configure Supabase Nodes: Assign your Supabase credential to all Supabase nodes. Ensure table names (e.g., companies, competitors) match your schema. Configure Google Drive Nodes: Assign your Google Drive credential to the Google Drive2 and save to Google Drive1 nodes. Select the correct Folder ID. Activate Workflow: Turn on the workflow and open the Webhook URL in the โ€œOn form submissionโ€ node to access the form. --- What It Does Form Trigger Captures user input: โ€œWebsite URLโ€ and โ€œScraping Typeโ€ (basic or deep). Scraping Router A Switch node routes the flow: Deep Scraping โ†’ AI-based MCP Firecrawler agent. Basic Scraping โ†’ Crawlee node. Deep Scraping (Firecrawl AI Agent) Uses Firecrawl and Tavily Web Search. Extracts a detailed JSON profile: mission, services, contacts, SEO keywords, etc. Basic Scraping (Crawlee) Uses Crawl and Scrape node to collect raw text. A Mistral-based AI extractor structures the data into JSON. Data Storage Stores structured data in Supabase tables (companies, company_basicprofiles). Archives a full JSON backup to Google Drive. Automated Competitor Analysis Runs after a deep scrape. Uses Tavily web search to find competitors (e.g., from Crunchbase). Saves competitor data to Supabase, linked by company_id. --- Who's It For Sales & Marketing Teams: Enrich leads with deep company info. Market Researchers: Build structured, searchable company databases. B2B Data Providers: Automate company intelligence collection. Developers: Use as a base for RAG or enrichment pipelines. --- Requirements n8n instance (self-hosted or cloud) Supabase Account: With tables like companies, competitors, social_links, etc. Mistral AI API Key Google Drive Credentials Tavily AI API Key (Optional) Custom Nodes: n8n-nodes-crawl-and-scrape --- How It Works Flow Summary Form Trigger: Captures โ€œWebsite URLโ€ and โ€œScraping Typeโ€. Switch Node: deep โ†’ MCP Firecrawler (AI Agent). basic โ†’ Crawl and Scrape node. Scraping & Extraction: Deep path: Firecrawler โ†’ JSON structure. Basic path: Crawlee โ†’ Mistral extractor โ†’ JSON. Storage: Save JSON to Supabase. Archive in Google Drive. Competitor Analysis (Deep Only): Finds competitors via Tavily. Saves to Supabase competitors table. End: Finishes with a No Operation node. --- How To Set Up Import workflow JSON. Install community nodes (especially n8n-nodes-crawl-and-scrape from npm). Configure credentials (Supabase, Mistral AI, Google Drive). Add your Tavily API key. Connect Supabase and Drive nodes properly. Fix disconnected โ€œbasicโ€ path if needed. Activate workflow. Test via the webhook form URL. --- How To Customize Change LLMs: Swap Mistral for OpenAI or Claude. Edit Scraper Prompts: Modify system prompts in AI agent nodes. Change Extraction Schema: Update JSON Schema in extractor nodes. Fix Relational Tables: Add Items node before Supabase inserts for arrays (social links, keywords). Enhance Automation: Add email/slack notifications, or replace form trigger with a Google Sheets trigger. --- Add-ons Automated Trigger: Run on new sheet rows. Notifications: Email or Slack alerts after completion. RAG Integration: Use the Supabase database as a chatbot knowledge source. --- Use Case Examples Sales Lead Enrichment: Instantly get company + competitor data from a URL. Market Research: Collect and compare companies in a niche. B2B Database Creation: Build a proprietary company dataset. --- WORKFLOW IMAGE --- Troubleshooting Guide | Issue | Possible Cause | Solution | |-------|----------------|-----------| | Form Trigger 404 | Workflow not active | Activate the workflow | | Web Search Tool fails | Missing Tavily API key | Replace the placeholder key | | FIRECRAWLER / find competitor fails | Missing MCP node | Install n8n-nodes-mcp | | Basic scrape does nothing | Switch node path disconnected | Reconnect โ€œbasicโ€ output | | Supabase node error | Wrong table/column names | Match schema exactly | --- Need Help or More Workflows? Want to customize this workflow for your business or integrate it with your existing tools? Our team at Digital Biz Tech can tailor it precisely to your use case from automation logic to AI-powered enhancements. Contact: shilpa.raju@digitalbiz.tech For more such offerings, visit us: https://www.digitalbiz.tech ---

DIGITAL BIZ TECHBy DIGITAL BIZ TECH
923

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.

MANISH KUMARBy MANISH KUMAR
113