{
  "id": "rsntayaWLO9Ap3sM",
  "name": "AI-powered lead enrichment Telegram And Explorium MCP",
  "tags": [],
  "nodes": [
    {
      "id": "27c106c6-24a4-4165-babf-05d1bfffcd7a",
      "name": "AI Lead Enrichment Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -260,
        240
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "# Elite Lead Enrichment & Email Sequence Generator\n\nYou are the world's premier lead enrichment specialist and cold outreach strategist for DaeX AI. Your expertise in AI automation market research is unparalleled, and you consistently uncover high-value insights that drive conversions.\n\n## Step 1: Collect Lead Information\n\nRequest the following information from the user:\n\n**Required Fields:**\n- Business Name: [Company name]\n- Domain: [Website URL if available]\n- Email: [Any known email address]\n- Contact Name: [Key decision maker if known]\n\n## Step 2: Research Strategy\n\n**Tool Usage:**\n- **MCP Tool**: Primary data gathering using company name\n- **Tavily Tool**: Targeted web searches for specific intelligence\n\n**Search Queries:**\n- \"[Company Name] LinkedIn profile\"\n- \"[Company Name] recent news funding growth\"\n- \"[Contact Name] [Company Name] LinkedIn executive\"\n- \"[Company Name] technology stack automation tools\"\n- \"[Company Name] industry challenges pain points\"\n- \"[Company Name] competitors market position\"\n\n## Step 3: Deep Intelligence Gathering\n\nResearch Focus Areas:\n- Business model, revenue streams, growth initiatives\n- Technology adoption and digital transformation status\n- Market positioning and competitive landscape\n- Recent company news, funding, and social presence\n- Decision maker background, role, and LinkedIn activity\n- Specific automation opportunities in their workflows\n- Industry-specific pain points and challenges\n\n## Step 4: Email Sequence Structure\n\nCreate a strategic 4-email sequence:\n\n**Email 1**: Problem Identification + Soft Introduction\n**Email 2**: Specific Use Case/Automation Opportunity\n**Email 3**: Social Proof + ROI Example\n**Email 4**: Clear CTA with Low-Commitment Next Step\n\n## Step 5: Output Requirements\n\n**CRITICAL**: Output as properly structured JSON with individual key-value pairs. Do NOT wrap everything in a single text field.\n\n```json\n{\n  \"companyName\": \"string\",\n  \"domain\": \"string\",\n  \"industry\": \"string\",\n  \"companySize\": \"string\",\n  \"revenue\": \"string\",\n  \"fundingStage\": \"string\",\n  \"fundingAmount\": \"string\",\n  \"employeeCount\": \"string\",\n  \"headquarters\": \"string\",\n  \"technologies\": [\"tech1\", \"tech2\"],\n  \"linkedinUrl\": \"string\",\n  \"twitterUrl\": \"string\",\n  \"contactName\": \"string\",\n  \"contactTitle\": \"string\",\n  \"contactEmail\": \"string\",\n  \"contactLinkedin\": \"string\",\n  \"leadScore\": \"number (1-100)\",\n  \"priorityLevel\": \"High/Medium/Low\",\n  \"painPoints\": [\"pain1\", \"pain2\"],\n  \"automationOpportunities\": [\"opp1\", \"opp2\"],\n  \"recentCompanyNews\": \"string\",\n  \"competitorAnalysis\": \"string\",\n  \"marketPosition\": \"string\",\n  \"emailSequence\": {\n    \"email1\": {\n      \"subject\": \"string\",\n      \"body\": \"string\",\n      \"callToAction\": \"string\"\n    },\n    \"email2\": {\n      \"subject\": \"string\",\n      \"body\": \"string\",\n      \"callToAction\": \"string\"\n    },\n    \"email3\": {\n      \"subject\": \"string\",\n      \"body\": \"string\",\n      \"callToAction\": \"string\"\n    },\n    \"email4\": {\n      \"subject\": \"string\",\n      \"body\": \"string\",\n      \"callToAction\": \"string\"\n    }\n  },\n  \"recommendedStrategy\": \"string\",\n  \"aiInsights\": \"string\",\n  \"nextSteps\": [\"step1\", \"step2\"],\n  \"followUpTimeline\": \"string\",\n  \"enrichedAt\": \"ISO timestamp\",\n  \"researchSummary\": \"string\",\n  \"automationRecommendations\": [\"rec1\", \"rec2\"]\n}\n```\n\n**Tone Guidelines:**\n- Professional yet conversational\n- Focus on measurable business impact\n- Use industry-specific terminology\n- Emphasize competitive advantage and efficiency\n- Reference specific technologies when identified\n- Maintain authoritative but approachable voice\n\nNow provide the lead information to begin enrichment:\n\n**Business Name:**\n**Domain:**\n**Email:**\n**Contact Name:**"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "218ba438-70a9-47e5-9998-926dc1a3ff1f",
      "name": "OpenAI GPT-4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -300,
        700
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o"
        },
        "options": {
          "maxTokens": 4000,
          "temperature": 0.3
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3a88ee73-7b4f-4907-b1d0-b1fe81b645d4",
      "name": "Explorium B2B Data",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        640,
        80
      ],
      "parameters": {
        "sseEndpoint": "mcp.explorium.ai/sse",
        "authentication": "headerAuth"
      },
      "typeVersion": 1
    },
    {
      "id": "d6b05d01-1d79-4030-8a1d-e27726ac5567",
      "name": "Research Tools Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        -340
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 540,
        "content": "## \ud83d\udd0d Research Tools\n\n**Explorium MCP**: Access to comprehensive B2B database\n- Company information\n- Contact details\n- Firmographic data\n- Technology stack\n\n**Tavily Search**: Real-time web intelligence\n- Recent company news\n- Social media presence\n- Market positioning\n- Competitive analysis\n\n**Usage**: AI agent automatically selects the best tool based on data needs"
      },
      "typeVersion": 1
    },
    {
      "id": "9b1e621c-52e0-496f-b681-f10cbb5da336",
      "name": "AI Engine Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        420
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 420,
        "content": "## \ud83e\udde0 AI Engine\n\n**Model**: GPT-4 for superior reasoning\n**Memory**: PostgreSQL for conversation persistence\n**Temperature**: 0.3 for consistent outputs\n\n**Capabilities**:\n- Multi-source data synthesis\n- Industry-specific insights\n- Personalized email generation\n- Lead scoring and prioritization"
      },
      "typeVersion": 1
    },
    {
      "id": "c3fdabc4-fd4f-41e6-be22-0b32073f9229",
      "name": "Tavily Web Intelligence",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        520,
        60
      ],
      "parameters": {
        "url": "https://api.tavily.com/search",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"query\": \"{{ $parameter.query }}\",\n  \"auto_parameters\": true,\n  \"topic\": \"general\",\n  \"search_depth\": \"advanced\",\n  \"chunks_per_source\": 5,\n  \"max_results\": 3,\n  \"include_answer\": true,\n  \"include_raw_content\": true,\n  \"include_images\": false,\n  \"include_domains\": [\"linkedin.com\", \"crunchbase.com\", \"bloomberg.com\"],\n  \"exclude_domains\": [\"pinterest.com\", \"instagram.com\"]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "toolDescription": "Search the web for real-time company intelligence and market data",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "54989a4a-9130-4d9e-ad1f-8ac7f8cc2064",
      "name": "Conversation Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        -400,
        740
      ],
      "parameters": {
        "sessionKey": "={{ $json.message.from.id + '_lead_enrichment' }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "3a9b4ace-9bd2-4a88-8cd6-453a1c4b2d0b",
      "name": "Telegram Input",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -740,
        260
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "2502dce6-b351-40a4-bf40-3a83f2fa56ef",
      "name": "Telegram Response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        220,
        240
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "={{ $item(\"0\").$node[\"Telegram Input\"].json[\"message\"][\"chat\"][\"id\"] }}",
        "additionalFields": {
          "parse_mode": "Markdown",
          "appendAttribution": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ef8399ba-9702-499f-baa9-01d4fc7db6a6",
      "name": "\ud83d\ude80 Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -940,
        -40
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 880,
        "content": "## \ud83d\ude80 AI Lead Enrichment \n\n### What this workflow does:\n1. **Receives** company info via Telegram\n2. **Researches** using Explorium B2B data + Tavily web search\n3. **Analyzes** business model, tech stack, and pain points\n4.  **Returns** structured JSON with actionable insights\n\n### Perfect for:\n- Sales teams automating prospect research\n- Growth hackers scaling outreach\n- Business development professionals\n- Agencies managing multiple clients\n\n### Setup Requirements:\n- OpenAI API key (GPT-4 recommended)\n- Explorium MCP credentials\n- Tavily API key\n- Telegram Bot token\n- PostgreSQL database\n\n### How to use:\nSend company details to your Telegram bot:\n```\nBusiness Name: Acme Corp\nDomain: acme.com\nContact: John Smith, CEO\n```\n\nGet back comprehensive lead profile "
      },
      "typeVersion": 1
    },
    {
      "id": "8c79237c-0f86-45c9-874f-592d385f06df",
      "name": "\u2699\ufe0f Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        340
      ],
      "parameters": {
        "color": 6,
        "width": 300,
        "height": 400,
        "content": "## \u2699\ufe0f Configuration Steps\n\n### 1. API Credentials\n- Add OpenAI API key to GPT-4 node\n- Configure Explorium MCP authentication\n- Set Tavily API key in web search node\n- Create Telegram bot and add token\n\n### 2. Database Setup\n- Create PostgreSQL database\n- Configure connection in memory node\n- Tables will be auto-created\n\n### 3. Telegram Bot\n- Create bot via @BotFather\n- Copy token to credential store\n- Webhook auto-configures on activation\n\n### 4. Testing\n- Send test message to bot\n- Verify research tools respond\n- Check JSON output format\n\n### 5. Customization\n- Modify AI prompts for your industry\n- Adjust email templates\n- Add custom research sources"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "72e04d2e-8435-454e-8f42-5bf3bc7a9e06",
  "connections": {
    "OpenAI GPT-4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Input": {
      "main": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Explorium B2B Data": {
      "ai_tool": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Conversation Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Tavily Web Intelligence": {
      "ai_tool": [
        [
          {
            "node": "AI Lead Enrichment Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "AI Lead Enrichment Agent": {
      "main": [
        [
          {
            "node": "Telegram Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}