{
  "id": "cWkoJzqUXINIIUAI",
  "name": "Automate Founder Digest & Lead Discovery from Hacker News with GPT-4o",
  "tags": [],
  "nodes": [
    {
      "id": "d02a36b6-0bfd-47d2-8fd7-679a6fd5efe5",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        -576
      ],
      "parameters": {
        "width": 870,
        "height": 593,
        "content": "## \ud83d\ude80 Automate Founder Digest & Lead Discovery from Hacker News (AI-Powered)\n\n### How it works\nThis workflow automatically scans Hacker News on a daily schedule to identify high-signal discussions relevant to startup founders, builders, and early-stage teams. It focuses on Show HN, Launch HN, AI, SaaS, and startup-related threads and filters out low-value or guideline pages.\n\nThe workflow processes raw search results into structured discussion records and uses AI to generate two parallel outputs:\n1. A concise daily Founder Digest emailed directly to you, summarizing key trends, why they matter, and recommended founder actions.\n2. Qualified founder and buying-intent insights extracted from discussions, normalized, enriched with social context, and logged into Google Sheets for follow-up.\n\nBy combining SERP-based discovery, AI reasoning, and structured storage, this workflow turns Hacker News into a daily intelligence engine for founders, product teams, and growth operators.\n\n### Setup steps\n1. Connect SerpAPI for Hacker News discovery  \n2. Configure Azure OpenAI credentials for AI analysis  \n3. Set up Gmail OAuth2 for email delivery  \n4. Connect Google Sheets OAuth2 for insight storage  \n5. Add MCP credentials for social enrichment  \n6. Review prompts and test before scheduling\n"
      },
      "typeVersion": 1
    },
    {
      "id": "593d7ecd-148c-4994-81f0-0a54359de3c2",
      "name": "Section: Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 488,
        "height": 320,
        "content": "## \ud83d\udce1 Trigger & Search\nScheduled daily scan of Hacker News via Google SERP API. Searches for Show HN, Launch HN, AI, startup, and SaaS discussions to capture relevant founder conversations."
      },
      "typeVersion": 1
    },
    {
      "id": "720a64e3-cf81-451b-af7f-f969265020d3",
      "name": "Section: Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        160
      ],
      "parameters": {
        "color": 7,
        "width": 468,
        "height": 352,
        "content": "## \ud83d\udd0d Data Processing\nExtracts search results into structured records, filters out noise pages and guidelines, keeping only real discussion threads with actionable content."
      },
      "typeVersion": 1
    },
    {
      "id": "2c9f14f3-3e8e-4b1f-a03d-0f2814f1a01e",
      "name": "Section: Email Digest",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        64,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 760,
        "height": 548,
        "content": "## \ud83d\udce7 Founder Digest\nGenerates a concise daily email digest highlighting key trends, why they matter, and actionable insights for founders. Uses AI to synthesize discussions into strategic intelligence."
      },
      "typeVersion": 1
    },
    {
      "id": "85408107-043e-4d32-a606-248397ab1e98",
      "name": "Section: Lead Discovery",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 916,
        "height": 580,
        "content": "## \ud83c\udfaf Lead Discovery\nAnalyzes discussions to identify buying-intent signals and qualify leads. Uses MCP client to enrich data from social platforms, then logs qualified leads to Google Sheets for follow-up."
      },
      "typeVersion": 1
    },
    {
      "id": "3c55d015-d432-415d-a02e-f74cf2f3700f",
      "name": "Security Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        784
      ],
      "parameters": {
        "color": 3,
        "width": 320,
        "height": 260,
        "content": "## \ud83d\udd10 Required Credentials\n- SerpAPI for search\n- Azure OpenAI for AI analysis\n- Gmail OAuth2 for email delivery\n- Google Sheets OAuth2 for data storage\n- Xpoz MCP for social enrichment\n\nUse OAuth2 where possible and never share personal API keys."
      },
      "typeVersion": 1
    },
    {
      "id": "f86e7fa1-f94a-4919-9fbe-84a01b9b41c8",
      "name": "Trigger Daily Hacker News Scan",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1344,
        304
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "775dada6-198d-43d3-a37e-447aac9bd49c",
      "name": "Search Hacker News Discussions via Google SERP",
      "type": "n8n-nodes-serpapi.serpApi",
      "position": [
        -1088,
        304
      ],
      "parameters": {
        "q": "site:news.ycombinator.com (\"Show HN\" OR \"Launch HN\" OR \"AI\" OR \"startup\" OR \"SaaS\")",
        "requestOptions": {},
        "additionalFields": {
          "num": "5"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d87cdb6a-1feb-4f13-a3c8-e590f0f8a003",
      "name": "Extract SERP Results into Discussion Records",
      "type": "n8n-nodes-base.code",
      "position": [
        -816,
        304
      ],
      "parameters": {
        "jsCode": "// Get the first input item (SerpAPI response)\nconst data = $input.first().json;\n\n// Extract organic results safely\nconst results = data.organic_results || [];\n\n// Parse and clean the data\nconst parsedResults = results.map(item => {\n  return {\n    title: item.title || \"\",\n    summary: item.snippet || \"\",\n    link: item.link || \"\",\n    date: item.date || \"Recent\",\n    source: item.source || \"Hacker News\"\n  };\n});\n\n// Return as n8n items\nreturn parsedResults.map(item => ({\n  json: item\n}));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c44e3b2f-8b1d-4852-af48-c97c2fac3c3a",
      "name": "Filter Valid Hacker News Discussion Threads",
      "type": "n8n-nodes-base.code",
      "position": [
        -560,
        304
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Keywords that indicate noise pages\nconst blockedTitles = [\n  \"Show | Hacker News\",\n  \"Show HN Guidelines\",\n  \"Launch HNs\",\n  \"Launch HN Instructions\"\n];\n\n// Keep only real discussion links (/item?id=)\nconst filtered = items\n  .filter(item => {\n    const title = item.json.title || \"\";\n    const link = item.json.link || \"\";\n\n    // Remove known noise titles\n    if (blockedTitles.includes(title)) return false;\n\n    // Keep only real discussion threads\n    if (!link.includes(\"news.ycombinator.com/item\")) return false;\n\n    return true;\n  })\n  .map(item => ({\n    json: {\n      title: item.json.title,\n      summary: item.json.summary,\n      link: item.json.link,\n      date: item.json.date,\n      source: item.json.source\n    }\n  }));\n\nreturn filtered;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c6f288ad-a311-4e9c-89fd-44618a08aa50",
      "name": "Aggregate Hacker News Discussions for Analysis",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        -224,
        304
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "1ebc5e27-f872-4477-9f80-75b51f2c37ae",
      "name": "Generate Founder Digest from Hacker News Discussions (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        176,
        624
      ],
      "parameters": {
        "text": "=You are given today's Hacker News discussions.\n\nCreate a concise daily founder digest using the data below.\n\nFollow this format EXACTLY:\n\n\ud83d\udd25 Hacker News Daily Digest\n\n\ud83d\udccc Key Trend\n- One clear trend explained simply\n\n\ud83e\udde0 Why It Matters\n- Business or product implication\n\n\ud83d\ude80 Founder Actions\n- 2 practical actions founders can take\n\nHacker News Data:\n{{ JSON.stringify($json.data, null, 2) }}\n",
        "options": {
          "systemMessage": "=You are a startup and technology trend analyst.\nYou specialize in extracting founder-relevant insights from Hacker News discussions.\nAvoid fluff. Be concise and actionable.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "e1bb9d1f-3887-409d-9366-2fc6ac99d2d0",
      "name": "LLM Reasoning Engine for Founder Digest",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        128,
        832
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "7be782d4-4ae5-4864-b3a1-ddf9e3b31f2b",
      "name": "Email Founder Daily Hacker News Digest",
      "type": "n8n-nodes-base.gmail",
      "position": [
        656,
        624
      ],
      "parameters": {
        "sendTo": "user@example.com",
        "message": "={{ $json.output }}",
        "options": {},
        "subject": "\ud83d\udd25 Hacker News Daily Digest"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0e419ee0-ecd6-4c2d-a82b-43be5d2c4937",
      "name": "Append Founder Insights to Hacker News Intelligence Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        768,
        -32
      ],
      "parameters": {
        "columns": {
          "value": {
            "output": "={{ $json.relaxed_output }}"
          },
          "schema": [
            {
              "id": "output",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "output",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "output"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "hacker_news",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/example/edit",
          "cachedResultName": "hacker news"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YourSpreadsheetId",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/example/edit",
          "cachedResultName": "sample_leads"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "8fda0a24-80a5-4ab1-9dc0-a760208c421e",
      "name": "Normalize AI Insight Output for Storage",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        -32
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nreturn items.map(item => {\n  let text = item.json.output || \"\";\n\n  // Remove numbered headings like \"1. **Key Signal**\"\n  text = text.replace(/\\d+\\.\\s*\\*\\*.*?\\*\\*\\n?/g, \"\");\n\n  // Remove bullet markers\n  text = text.replace(/-\\s+/g, \"\");\n\n  // Remove extra line breaks\n  text = text.replace(/\\n{2,}/g, \"\\n\\n\");\n\n  // Trim whitespace\n  text = text.trim();\n\n  return {\n    json: {\n      relaxed_output: text\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "0af613a0-3d2c-4203-a0ea-596b586a9c32",
      "name": "LLM Engine for Lead Qualification & Signal Interpretation",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        96,
        240
      ],
      "parameters": {
        "model": "gpt-4o-mini",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "9f492633-bd06-4e64-afd3-346b0ee12783",
      "name": "External Social Context & Enrichment Tool (MCP Client)",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        320,
        208
      ],
      "parameters": {
        "options": {},
        "endpointUrl": "https://mcp.xpoz.ai/mcp",
        "authentication": "bearerAuth"
      },
      "typeVersion": 1.2
    },
    {
      "id": "b2bceeb9-8451-440c-9278-c1b424d7c13e",
      "name": "Extract High-Signal Founder & Buying-Intent Insights (AI)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        112,
        -32
      ],
      "parameters": {
        "text": "=You are given Hacker News discussion data.\n\nTASK:\nAnalyze the data and extract relevant founder intelligence.\n\nFor the given discussions, identify:\n\n1. Key Signal\n- What important shift, problem, or opportunity is being discussed?\n\n2. Problem Statement\n- What concrete problem founders or developers are facing?\n\n3. Why This Matters\n- Business or product implication (cost, speed, competition, revenue, risk).\n\n4. Actionable Insight\n- One clear action a founder or product team should consider.\n\nUse ONLY the provided data.\nDo NOT invent facts.\n\nHacker News Data:\n{{ JSON.stringify($json.data, null, 2) }}\n",
        "options": {
          "maxIterations": 30,
          "systemMessage": "You are a founder intelligence analyst.\n\nYour job is to analyze Hacker News discussion data and extract ONLY high-signal, actionable insights.\n\nFocus on:\n- Problems founders are complaining about\n- Clear shifts in technology, tools, or business models\n- Signals that indicate buying intent, adoption, or disruption\n\nIgnore:\n- Generic opinions\n- News headlines without discussion value\n- Vague commentary without consequences\n\nThink like:\n- A startup founder\n- A product strategist\n- An early-stage investor\n\nBe precise. Do not add fluff.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "0a3b2e7c-ecf3-49ca-98f7-84e1ecc6f796",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -336,
        32
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 464,
        "content": "## \ud83d\udce6 Discussion Aggregation\nCombines all valid Hacker News discussions into a single\ndataset for downstream AI analysis.\n\n\u2022 Aggregates multiple threads  \n\u2022 Preserves discussion context  \n\u2022 Prepares data for AI reasoning  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "025014f7-4f54-43af-8fa0-27d265c729d9",
  "connections": {
    "Trigger Daily Hacker News Scan": {
      "main": [
        [
          {
            "node": "Search Hacker News Discussions via Google SERP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Reasoning Engine for Founder Digest": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Founder Digest from Hacker News Discussions (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Normalize AI Insight Output for Storage": {
      "main": [
        [
          {
            "node": "Append Founder Insights to Hacker News Intelligence Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Valid Hacker News Discussion Threads": {
      "main": [
        [
          {
            "node": "Aggregate Hacker News Discussions for Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract SERP Results into Discussion Records": {
      "main": [
        [
          {
            "node": "Filter Valid Hacker News Discussion Threads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Hacker News Discussions for Analysis": {
      "main": [
        [
          {
            "node": "Generate Founder Digest from Hacker News Discussions (AI)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract High-Signal Founder & Buying-Intent Insights (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Hacker News Discussions via Google SERP": {
      "main": [
        [
          {
            "node": "Extract SERP Results into Discussion Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "External Social Context & Enrichment Tool (MCP Client)": {
      "ai_tool": [
        [
          {
            "node": "Extract High-Signal Founder & Buying-Intent Insights (AI)",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Extract High-Signal Founder & Buying-Intent Insights (AI)": {
      "main": [
        [
          {
            "node": "Normalize AI Insight Output for Storage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Founder Digest from Hacker News Discussions (AI)": {
      "main": [
        [
          {
            "node": "Email Founder Daily Hacker News Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Engine for Lead Qualification & Signal Interpretation": {
      "ai_languageModel": [
        [
          {
            "node": "Extract High-Signal Founder & Buying-Intent Insights (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}