{
  "name": "Research web topics and email a Claude report via Gmail using SerpApi, Jina.ai and Firecrawl",
  "nodes": [
    {
      "id": "p-main-sticky",
      "name": "Main Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -80
      ],
      "parameters": {
        "width": 380,
        "height": 532,
        "content": "## Research any topic and email an AI report with self-healing scraper\n\n## How it works\n1. Submit a research topic via the form (topic, number of sources, recipient email)\n2. SerpApi searches Google a"
      }
    },
    {
      "id": "p-err-note",
      "name": "Error Handler Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        464
      ],
      "parameters": {
        "width": 556,
        "height": 388,
        "content": "## Error handler\nCatches any workflow failure and extracts the error message, node name, and execution URL.\n\n**To enable:** Workflow Settings → Error Workflow → select this workflow.\n\n**Extend:** Add "
      }
    },
    {
      "id": "p-s1",
      "name": "S1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -80
      ],
      "parameters": {
        "width": 804,
        "height": 80,
        "content": "**1 — Input & search**"
      }
    },
    {
      "id": "p-s2",
      "name": "S2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -80
      ],
      "parameters": {
        "width": 1480,
        "height": 80,
        "content": "**2 — Self-healing loop** (one URL at a time · output[0]=done → Aggregate · output[1]=loop body · Enrich feeds back)"
      }
    },
    {
      "id": "p-s3",
      "name": "S3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        -80
      ],
      "parameters": {
        "width": 1252,
        "height": 80,
        "content": "**3 — Firecrawl fallback** (only runs if Jina is blocked)"
      }
    },
    {
      "id": "p-s4",
      "name": "S4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3792,
        -80
      ],
      "parameters": {
        "width": 1128,
        "height": 80,
        "content": "**4 — Synthesis & delivery**"
      }
    },
    {
      "id": "p1",
      "name": "Research Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        32,
        128
      ]
    },
    {
      "id": "p2",
      "name": "Set Config",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        128
      ]
    },
    {
      "id": "p3",
      "name": "SerpApi Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        464,
        128
      ]
    },
    {
      "id": "p4",
      "name": "Parse & Filter URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        688,
        128
      ]
    },
    {
      "id": "p5",
      "name": "Loop Over URLs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        912,
        128
      ]
    },
    {
      "id": "p6",
      "name": "Jina Reader (Primary)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1120,
        128
      ]
    },
    {
      "id": "p7",
      "name": "Normalize Jina Response",
      "type": "n8n-nodes-base.code",
      "position": [
        1344,
        128
      ]
    },
    {
      "id": "p8",
      "name": "Page Analyzer (Round 1)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1568,
        128
      ]
    },
    {
      "id": "p8a",
      "name": "Claude Extractor",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1568,
        304
      ]
    },
    {
      "id": "pCA1",
      "name": "Combine Analysis R1",
      "type": "n8n-nodes-base.code",
      "position": [
        1856,
        128
      ]
    },
    {
      "id": "p9",
      "name": "Retry Needed? (IF)",
      "type": "n8n-nodes-base.if",
      "position": [
        2000,
        128
      ]
    },
    {
      "id": "p16",
      "name": "Merge Page Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        2000,
        352
      ]
    },
    {
      "id": "p17",
      "name": "Enrich & Forward",
      "type": "n8n-nodes-base.code",
      "position": [
        2224,
        352
      ]
    },
    {
      "id": "p10",
      "name": "Wait Before Retry",
      "type": "n8n-nodes-base.wait",
      "position": [
        2480,
        128
      ]
    },
    {
      "id": "p11",
      "name": "Firecrawl (Fallback)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2704,
        128
      ]
    },
    {
      "id": "p12",
      "name": "Normalize Firecrawl",
      "type": "n8n-nodes-base.code",
      "position": [
        2928,
        128
      ]
    },
    {
      "id": "p13",
      "name": "Page Analyzer (Round 2)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3152,
        128
      ]
    },
    {
      "id": "p13a",
      "name": "Claude Re-Analyzer",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        3152,
        304
      ]
    },
    {
      "id": "pCA2",
      "name": "Combine Analysis R2",
      "type": "n8n-nodes-base.code",
      "position": [
        3440,
        128
      ]
    },
    {
      "id": "p14",
      "name": "Still Blocked? (IF)",
      "type": "n8n-nodes-base.if",
      "position": [
        3584,
        128
      ]
    },
    {
      "id": "p15",
      "name": "Mark as Failed",
      "type": "n8n-nodes-base.set",
      "position": [
        3584,
        352
      ]
    },
    {
      "id": "p18",
      "name": "Aggregate Summaries",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3920,
        128
      ]
    },
    {
      "id": "p19",
      "name": "Build Synthesis Prompt",
      "type": "n8n-nodes-base.code",
      "position": [
        4144,
        128
      ]
    },
    {
      "id": "p20",
      "name": "Synthesize Report",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4368,
        128
      ]
    },
    {
      "id": "p20a",
      "name": "Claude Synthesizer",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        4368,
        304
      ]
    },
    {
      "id": "p21",
      "name": "Build HTML Report",
      "type": "n8n-nodes-base.code",
      "position": [
        4656,
        128
      ]
    },
    {
      "id": "p23",
      "name": "Send Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        4800,
        128
      ]
    },
    {
      "id": "p24",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -336,
        672
      ]
    },
    {
      "id": "p25",
      "name": "Format Error",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        672
      ]
    }
  ],
  "connections": {
    "Set Config": {
      "main": [
        [
          {
            "node": "SerpApi Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Format Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Form": {
      "main": [
        [
          {
            "node": "Set Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over URLs": {
      "main": [
        [
          {
            "node": "Aggregate Summaries",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Jina Reader (Primary)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark as Failed": {
      "main": [
        [
          {
            "node": "Merge Page Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SerpApi Search": {
      "main": [
        [
          {
            "node": "Parse & Filter URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Extractor": {
      "ai_languageModel": [
        [
          {
            "node": "Page Analyzer (Round 1)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Enrich & Forward": {
      "main": [
        [
          {
            "node": "Loop Over URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build HTML Report": {
      "main": [
        [
          {
            "node": "Send Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Synthesize Report": {
      "main": [
        [
          {
            "node": "Build HTML Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Retry": {
      "main": [
        [
          {
            "node": "Firecrawl (Fallback)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Re-Analyzer": {
      "ai_languageModel": [
        [
          {
            "node": "Page Analyzer (Round 2)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Claude Synthesizer": {
      "ai_languageModel": [
        [
          {
            "node": "Synthesize Report",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge Page Results": {
      "main": [
        [
          {
            "node": "Enrich & Forward",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry Needed? (IF)": {
      "main": [
        [
          {
            "node": "Wait Before Retry",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Page Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Summaries": {
      "main": [
        [
          {
            "node": "Build Synthesis Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Analysis R1": {
      "main": [
        [
          {
            "node": "Retry Needed? (IF)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Analysis R2": {
      "main": [
        [
          {
            "node": "Still Blocked? (IF)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Firecrawl": {
      "main": [
        [
          {
            "node": "Page Analyzer (Round 2)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse & Filter URLs": {
      "main": [
        [
          {
            "node": "Loop Over URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Still Blocked? (IF)": {
      "main": [
        [
          {
            "node": "Mark as Failed",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge Page Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Firecrawl (Fallback)": {
      "main": [
        [
          {
            "node": "Normalize Firecrawl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Jina Reader (Primary)": {
      "main": [
        [
          {
            "node": "Normalize Jina Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Synthesis Prompt": {
      "main": [
        [
          {
            "node": "Synthesize Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Jina Response": {
      "main": [
        [
          {
            "node": "Page Analyzer (Round 1)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Page Analyzer (Round 1)": {
      "main": [
        [
          {
            "node": "Combine Analysis R1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Page Analyzer (Round 2)": {
      "main": [
        [
          {
            "node": "Combine Analysis R2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}