AutomationFlowsSocial Media › Discover Buying-intent Leads on Twitter and Instagram with Gpt-4o-mini and…

Discover Buying-intent Leads on Twitter and Instagram with Gpt-4o-mini and…

Original n8n title: Discover Buying-intent Leads on Twitter and Instagram with Gpt-4o-mini and Send Summaries to Slack and Notion

ByRahul Joshi @rahul08 on n8n.io

Automate B2B lead discovery by identifying high-intent prospects directly from Reddit discussions using AI-powered intent analysis. 🎯🤖 This workflow scans Reddit for conversations related to CRM and marketing automation tools, analyzes snippets to detect buying intent,…

Chat trigger trigger★★★★☆ complexityAI-powered22 nodesChat TriggerMemory Buffer WindowAgentMcp Client ToolLm Chat Azure Open AiChatOutput Parser StructuredSlack
Social Media Trigger: Chat trigger Nodes: 22 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Agent → Chat Trigger 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": "PjwXbiSiODZjKO5M",
  "name": "Identify Buying-Intent Leads on Twitter & Instagram using GPT-4o-mini with Slack Alerts and Notion CRM",
  "tags": [],
  "nodes": [
    {
      "id": "2359407b-d3f5-4d25-a828-3659d16faf0e",
      "name": "Receive User Lead Discovery Query (Chat Trigger)",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "disabled": true,
      "position": [
        -496,
        -160
      ],
      "parameters": {
        "options": {
          "responseMode": "responseNodes"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "4fcbb1cb-79cf-43c2-98d7-347665f8585b",
      "name": "Maintain Short-Term Conversation Context",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -528,
        112
      ],
      "parameters": {
        "contextWindowLength": 7
      },
      "typeVersion": 1.3
    },
    {
      "id": "c2b2bd6e-09f1-40a6-bb31-d2021b52a6e6",
      "name": "Discover Buying-Intent Leads from Social Platforms (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -144,
        -160
      ],
      "parameters": {
        "options": {
          "maxIterations": 30,
          "systemMessage": "You are a lead generation agent.\n\nYour job:\n1. Search Twitter and Instagram for posts where users:\n   - ask for tools\n   - ask for recommendations\n   - complain about problems\n2. Extract only real buying-intent posts.\n3. For each lead, return:\n   - platform (Twitter / Instagram)\n   - username\n   - post text\n   - problem summary\n   - buying intent (Low / Medium / High)\n4. Ignore spam, ads, or promotions.\n5. If no leads found, clearly say \"No qualified leads found\".\nFinal output must be clean, structured, and ready for CRM.\nUse bullet points.\n"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "d8f7fd0a-ea86-4615-b4fb-b125b0381ae8",
      "name": "External Social Search & Enrichment Tool (MCP Client)",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        256,
        304
      ],
      "parameters": {
        "options": {},
        "endpointUrl": "https://mcp.xpoz.ai/mcp",
        "authentication": "bearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d3990fae-d632-4b68-b80b-420de73a3293",
      "name": "LLM Reasoning Engine for Lead Qualification",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -144,
        80
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "17898590-56f2-40c0-ad32-a524f5718ec3",
      "name": "Generate CRM-Ready Lead Discovery Response",
      "type": "@n8n/n8n-nodes-langchain.chat",
      "position": [
        352,
        -160
      ],
      "parameters": {
        "message": "={{ $json.output }}",
        "options": {},
        "waitUserReply": false
      },
      "typeVersion": 1
    },
    {
      "id": "b42d1d16-08e9-41d5-ae6b-a0be2c725a55",
      "name": "Generate Slack & Notion Lead Insight Summary (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        656,
        -160
      ],
      "parameters": {
        "text": "=User search query:\n{{ $('Receive User Lead Discovery Query (Chat Trigger)').item.json.chatInput }}\n\nHere are the qualified leads:\n{{ JSON.stringify($json.leads || $input.all().map(i => i.json), null, 2) }}\n\nCreate:\n1. A Slack summary\n2. A Notion database entry\n",
        "options": {
          "systemMessage": "=You are a lead generation automation assistant.\n\nYour task:\n1. Analyze social media leads (Twitter and Instagram).\n2. Generate TWO outputs:\n   - A Slack summary for humans\n   - A Notion-ready entry for database storage\n\nRules:\n- Slack summary must explain:\n  \u2022 What the user searched for\n  \u2022 How many leads were found\n  \u2022 High-level intent insights\n- Notion text must be:\n  \u2022 Very concise\n  \u2022 Structured\n  \u2022 Easy to store as database text\n- Do NOT add emojis in Notion output\n- Do NOT use markdown tables\n- Output must be valid JSON only\n\n\nYou must return ONLY valid JSON.\nDo not include markdown.\nDo not include explanations.\nDo not assume any domain.\nUse neutral, generic language.\nIf data is missing, use empty strings or zero values.\nFollow the output schema exactly.\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "8672bb06-a852-4b2e-af8d-81714b28257e",
      "name": "LLM Reasoning Engine for Insight Structuring",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        608,
        144
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2cba8bbd-555f-402d-94c1-4d815852334e",
      "name": "Enforce Structured Lead Insight Output Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        864,
        112
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"query_context\": {\n    \"user_query\": \"string\",\n    \"source_platforms\": [\"string\"],\n    \"execution_time\": \"string\"\n  },\n  \"results_overview\": {\n    \"total_items_found\": 0,\n    \"high_intent_items\": 0,\n    \"medium_intent_items\": 0,\n    \"low_intent_items\": 0\n  },\n  \"slack_summary\": {\n    \"title\": \"string\",\n    \"summary\": \"string\",\n    \"key_insight\": \"string\",\n    \"recommended_action\": \"string\"\n  },\n  \"notion_record\": {\n    \"user_query\": \"string\",\n    \"total_items_found\": 0,\n    \"primary_themes\": [\"string\"],\n    \"overall_intent\": \"High | Medium | Low | Mixed\",\n    \"status\": \"New\"\n  }\n}\n"
      },
      "typeVersion": 1.3
    },
    {
      "id": "12d5f450-f067-47d2-9db5-c2a03e574e7c",
      "name": "Send Lead Discovery Summary to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1216,
        16
      ],
      "parameters": {
        "text": "={{ $json.output.slack_summary.title }} \n\n{{ $json.output.slack_summary.summary }}\n\n{{ $json.output.slack_summary.key_insight }}\n\n{{ $json.output.slack_summary.recommended_action }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09GNB90TED",
          "cachedResultName": "general-information"
        },
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "5bdeeea8-eddf-4d12-b3ca-3e3624e2d7d9",
      "name": "Store Lead Discovery Insight in Notion CRM",
      "type": "n8n-nodes-base.notion",
      "position": [
        1200,
        -304
      ],
      "parameters": {
        "title": "=data",
        "simple": false,
        "options": {},
        "resource": "databasePage",
        "databaseId": {
          "__rl": true,
          "mode": "list",
          "value": "2d8802b9-1fa0-804a-be3c-d4b876c0f228",
          "cachedResultUrl": "https://www.notion.so/2d8802b91fa0804abe3cd4b876c0f228",
          "cachedResultName": "lead gen tool db "
        },
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "search_query|title",
              "title": "={{ $json.output.notion_record.user_query }}"
            },
            {
              "key": "overall_intent|rich_text",
              "textContent": "={{ $json.output.notion_record.overall_intent }}"
            },
            {
              "key": "primary_themes|rich_text",
              "textContent": "={{$json.output.notion_record.primary_themes.join(\", \")}}\n"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "36c8b529-fcf8-4d13-b176-9d401b724afb",
      "name": "Workflow Error Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -480,
        752
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "530ce89c-fa94-4d80-8bf4-acdb6e96f471",
      "name": "Send a message1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -128,
        752
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "=\ud83d\udea8 *Workflow Error Alert*  *Error Node:* {{ $json.node.name }} *Error Message:* {{ $json.error.message }} *Timestamp:* {{ $now.toISO() }}  Please investigate immediately.",
        "options": {},
        "subject": "Workflow Error Alert",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "43013288-7b0d-4eb3-ae97-7c87ed64abe2",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        592
      ],
      "parameters": {
        "color": 7,
        "width": 672,
        "height": 336,
        "content": "## Error Handling\nSends alerts when the workflow fails\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a8f95436-ee83-4281-b589-6adfd4e8b944",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -1040
      ],
      "parameters": {
        "width": 768,
        "height": 768,
        "content": "## \ud83d\udd0e Identify Buying-Intent Leads on Twitter & Instagram using GPT-4o-mini with Slack Alerts and Notion CRM\n\n### How it works\nThis workflow enables on-demand lead discovery from social platforms using a chat-based interface.\nWhen a user submits a lead discovery query, the workflow triggers an AI agent that searches Twitter\nand Instagram for posts where people are asking for tools, recommendations, or help solving real\nproblems.\n\nAn external MCP-powered social search tool is used to retrieve relevant posts. The AI agent then\nfilters out spam, ads, and promotional content, keeping only genuine buying-intent signals. For\neach qualified lead, the agent extracts the platform, username, post text, problem summary, and\nclassifies buying intent as Low, Medium, or High.\n\nThe workflow maintains short-term conversation memory to improve relevance across follow-up\nqueries. Once leads are identified, a second AI step converts the raw results into two outputs:\na human-readable Slack summary and a structured, CRM-ready record for Notion.\n\nThis automation eliminates manual social scanning and ensures sales or growth teams receive\nclean, structured, and actionable lead intelligence in real time.\n\n### Setup steps\n1. Connect Azure OpenAI credentials\n2. Configure MCP bearer authentication for social search\n3. Connect Slack and Notion credentials\n4. Enable the chat trigger\n5. Test with a sample query before sharing with users\n\n### Customization\n- Adjust intent classification rules in the AI prompt  \n- Change output structure for different CRM schemas  \n- Extend to additional social platforms via MCP tools\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c10fa3ac-2454-4456-9eb0-aeb408496329",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -368
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 704,
        "content": "## User Input & Context\nReceives user lead queries and maintains short-term conversation memory\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c5d45c1d-e2e4-4de7-9d94-a9b75b825090",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        80
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 400,
        "content": "## Social Search & Enrichment\nFetches and enriches social posts from external platforms\n"
      },
      "typeVersion": 1
    },
    {
      "id": "926e3cd6-4477-4b1c-a506-3e4f99096672",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -496
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 816,
        "content": "## Distribution & CRM Storage\nDelivers insights to Slack and stores them in Notion\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c3ec7a66-f141-4725-aedf-ebcbbfda925a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        544,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 496,
        "height": 640,
        "content": "## Insight Structuring & Validation\nTransforms raw leads into structured, validated insight\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ce44b94e-5913-4cb7-a2ea-e7d5e76a0dca",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -320
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 576,
        "content": "## AI Lead Discovery & Qualification\nIdentifies real buying-intent leads and classifies intent\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8c3de142-e340-423c-9e58-bc40577de286",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -304
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 336,
        "content": "## CRM-Ready Response Preparation\nConverts discovered leads into a clean, user-facing response\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5ccd5a52-f6fd-445b-9f4c-a5ca53e747d1",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -1200
      ],
      "parameters": {
        "color": 4,
        "width": 768,
        "height": 656,
        "content": "## \ud83c\udfa5 Workflow Demo Video\n\nWatch a short walkthrough explaining:\n\u2022 What this automation does  \n\u2022 How the data flows  \n\u2022 How to set up credentials  \n\u2022 Common mistakes to avoid  \n\n@[youtube](pj4GfvdUa6k)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "ef4cdc8b-57ea-48a5-9d4c-2b5907ed8fde",
  "connections": {
    "Workflow Error Handler": {
      "main": [
        [
          {
            "node": "Send a message1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Maintain Short-Term Conversation Context": {
      "ai_memory": [
        [
          {
            "node": "Discover Buying-Intent Leads from Social Platforms (AI)",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Generate CRM-Ready Lead Discovery Response": {
      "main": [
        [
          {
            "node": "Generate Slack & Notion Lead Insight Summary (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Reasoning Engine for Lead Qualification": {
      "ai_languageModel": [
        [
          {
            "node": "Discover Buying-Intent Leads from Social Platforms (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "LLM Reasoning Engine for Insight Structuring": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Slack & Notion Lead Insight Summary (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Enforce Structured Lead Insight Output Schema": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Slack & Notion Lead Insight Summary (AI)",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Receive User Lead Discovery Query (Chat Trigger)": {
      "main": [
        [
          {
            "node": "Discover Buying-Intent Leads from Social Platforms (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Slack & Notion Lead Insight Summary (AI)": {
      "main": [
        [
          {
            "node": "Send Lead Discovery Summary to Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Store Lead Discovery Insight in Notion CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "External Social Search & Enrichment Tool (MCP Client)": {
      "ai_tool": [
        [
          {
            "node": "Discover Buying-Intent Leads from Social Platforms (AI)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Discover Buying-Intent Leads from Social Platforms (AI)": {
      "main": [
        [
          {
            "node": "Generate CRM-Ready Lead Discovery Response",
            "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

Automate B2B lead discovery by identifying high-intent prospects directly from Reddit discussions using AI-powered intent analysis. 🎯🤖 This workflow scans Reddit for conversations related to CRM and marketing automation tools, analyzes snippets to detect buying intent,…

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

More Social Media workflows → · Browse all categories →

Related workflows

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

Social Media

This workflow is built for creators, solopreneurs, SaaS founders, and agencies looking to automate their social media content process from idea to publication. It combines the power of OpenAI, Google

OpenAI Chat, Tool Workflow, Agent +15
Social Media

✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition. Uses chatTrigger, stickyNote, toolWorkflow, memoryBufferWindow. Chat trigger; 100 nodes.

Chat Trigger, Tool Workflow, Memory Buffer Window +12
Social Media

This workflow is designed for content creators, social media managers, and marketing teams who need to efficiently create and publish content across multiple social media platforms. It's perfect for b

Chat Trigger, Tool Workflow, Memory Buffer Window +12
Social Media

This workflow is ideal for individuals, marketers, agencies, and brands who want to effortlessly automate the entire blogging and social media process—from idea generation to promotion. Its primary go

Execute Workflow Trigger, Notion, OpenAI Chat +13
Social Media

✨🩷Automated Social Media Content Publishing Factory + System Prompt Composition. Uses chatTrigger, stickyNote, toolWorkflow, memoryBufferWindow. Chat trigger; 56 nodes.

Chat Trigger, Tool Workflow, Memory Buffer Window +9