{
  "name": "Generate business research reports with Claude, web search and Google Drive",
  "nodes": [
    {
      "id": "94991161-c848-47e3-9753-93976526625f",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -160
      ],
      "parameters": {
        "width": 980,
        "height": 2288,
        "content": "# n8n OpenCWL AI Workflow\n## Automatically Research, Analyze & Generate Smart Business Reports\n\n---\n\n### Description\nThis workflow is a fully automated AI-powered business intelligence agent. It accep"
      }
    },
    {
      "id": "359f8aa7-8eb8-4538-a918-14253ba0de5d",
      "name": "Stage 1 Label",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        624
      ],
      "parameters": {
        "width": 560,
        "height": 484,
        "content": "## Stage 1 — Request Intake & Validation\n\nWebhook accepts POST with topic, company, ticker, industry, and report type. Set node stores all API keys and normalizes input fields. IF node checks the topi"
      }
    },
    {
      "id": "8ae3f05f-1114-4ee5-98a1-92868817b105",
      "name": "Stage 2 Label",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        240
      ],
      "parameters": {
        "width": 244,
        "height": 1076,
        "content": "## Stage 2 — Parallel Data Collection\n\nAll three HTTP Request nodes fire in parallel from the Validate Input node. Serper returns top 10 organic Google results. NewsAPI returns latest 10 articles from"
      }
    },
    {
      "id": "afb09da8-c83c-4cdb-826a-b8d65f01b3dc",
      "name": "Stage 3 Label",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        192
      ],
      "parameters": {
        "width": 182,
        "height": 788,
        "content": "## Stage 3 — Data Merge & Processing\n\nPulls results from all three collection nodes. Extracts and structures: top search results with titles/snippets/URLs, news articles with dates and sources, financ"
      }
    },
    {
      "id": "b352c114-4ee7-4e5d-901c-a25cc6c7dbbe",
      "name": "Stage 4 Label",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        432
      ],
      "parameters": {
        "width": 1060,
        "height": 564,
        "content": "## Stage 4 — 3-Pass Claude AI Analysis Pipeline\n\nPass 1 reads all raw data and extracts key facts, market trends, competitive signals, and sentiment. Pass 2 takes Pass 1 output and performs deep SWOT "
      }
    },
    {
      "id": "ba9be337-d395-42f1-8669-8e290da12313",
      "name": "Stage 5 Label",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3296,
        368
      ],
      "parameters": {
        "width": 880,
        "height": 980,
        "content": "## Stage 5 — Multi-Channel Delivery & Logging\n\nAll four output nodes run in parallel. Google Drive saves the Markdown report as a file. Slack posts an executive summary with key metrics. SendGrid emai"
      }
    },
    {
      "id": "32750ee8-9409-4814-b104-143e5b8fa096",
      "name": "Receive Research Request",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1088,
        880
      ]
    },
    {
      "id": "72569d52-0a95-4c67-893f-7e361c157681",
      "name": "Set Credentials and Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1312,
        880
      ]
    },
    {
      "id": "abc548ae-842d-4d13-bc75-2a2264aa0e80",
      "name": "Validate Input",
      "type": "n8n-nodes-base.if",
      "position": [
        1536,
        880
      ]
    },
    {
      "id": "39f061a5-3f17-4037-8b92-f2169005c249",
      "name": "Return Validation Error",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1760,
        976
      ]
    },
    {
      "id": "69656398-2487-4063-8ed5-c5849a89e3a1",
      "name": "Search Google via Serper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1760,
        592
      ]
    },
    {
      "id": "1f40338c-a4c4-489c-9a2e-ecf67c00f984",
      "name": "Fetch News Articles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1760,
        784
      ]
    },
    {
      "id": "63ce8b8c-cccf-4e92-a9cb-e588036a134e",
      "name": "Fetch Market Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1760,
        1168
      ]
    },
    {
      "id": "bd083614-2bfd-40d6-8c48-d3bb82b4b2af",
      "name": "Merge and Clean Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1984,
        784
      ]
    },
    {
      "id": "e2f434e1-ee59-4ecd-99b5-5b1b8f67fd3a",
      "name": "Claude Pass 1 Research Synthesis",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2208,
        784
      ]
    },
    {
      "id": "c92ca88d-e433-472f-8b75-3d218acea6e3",
      "name": "Extract Pass 1 Output",
      "type": "n8n-nodes-base.code",
      "position": [
        2432,
        784
      ]
    },
    {
      "id": "33b855af-bf11-44a6-8444-e3c08b8bbd21",
      "name": "Claude Pass 2 Strategic SWOT",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2864,
        784
      ]
    },
    {
      "id": "3bc64c52-b1bd-412d-ba89-78f27f2d97ae",
      "name": "Extract Pass 2 Output",
      "type": "n8n-nodes-base.code",
      "position": [
        3088,
        784
      ]
    },
    {
      "id": "16641beb-333a-4b89-9166-13b2c30aad88",
      "name": "Claude Pass 3 Write Final Report",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3312,
        784
      ]
    },
    {
      "id": "82ba316a-8c36-40fb-964e-ef169379ced3",
      "name": "Format Final Report Package",
      "type": "n8n-nodes-base.code",
      "position": [
        3536,
        784
      ]
    },
    {
      "id": "93198fc0-4fa0-4eda-af3e-96442329ca7f",
      "name": "Save Report to Google Drive",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3760,
        592
      ]
    },
    {
      "id": "f0475039-82f5-43d9-8b1c-de945a9c16bd",
      "name": "Post Summary to Slack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3760,
        784
      ]
    },
    {
      "id": "9c44c599-faff-490b-b3e1-515f61f27812",
      "name": "Email Full Report via SendGrid",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3760,
        976
      ]
    },
    {
      "id": "3248fbea-4d66-401f-8fc1-8acc98fd061b",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3760,
        1168
      ]
    },
    {
      "id": "3b730031-9bf9-4532-bf94-404a00b1652e",
      "name": "Return Report Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3984,
        784
      ]
    },
    {
      "id": "79a6a4f4-2760-4152-9fa1-bf261c55a6a2",
      "name": "Wait For Process",
      "type": "n8n-nodes-base.wait",
      "position": [
        2640,
        784
      ]
    }
  ],
  "connections": {
    "Validate Input": {
      "main": [
        [
          {
            "node": "Search Google via Serper",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch News Articles",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Market Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Return Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait For Process": {
      "main": [
        [
          {
            "node": "Claude Pass 2 Strategic SWOT",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Market Data": {
      "main": [
        [
          {
            "node": "Merge and Clean Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch News Articles": {
      "main": [
        [
          {
            "node": "Merge and Clean Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Google Sheets": {
      "main": [
        [
          {
            "node": "Return Report Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge and Clean Data": {
      "main": [
        [
          {
            "node": "Claude Pass 1 Research Synthesis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Pass 1 Output": {
      "main": [
        [
          {
            "node": "Wait For Process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Pass 2 Output": {
      "main": [
        [
          {
            "node": "Claude Pass 3 Write Final Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post Summary to Slack": {
      "main": [
        [
          {
            "node": "Return Report Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Research Request": {
      "main": [
        [
          {
            "node": "Set Credentials and Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Google via Serper": {
      "main": [
        [
          {
            "node": "Merge and Clean Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Credentials and Config": {
      "main": [
        [
          {
            "node": "Validate Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Final Report Package": {
      "main": [
        [
          {
            "node": "Save Report to Google Drive",
            "type": "main",
            "index": 0
          },
          {
            "node": "Post Summary to Slack",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email Full Report via SendGrid",
            "type": "main",
            "index": 0
          },
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Report to Google Drive": {
      "main": [
        [
          {
            "node": "Return Report Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Pass 2 Strategic SWOT": {
      "main": [
        [
          {
            "node": "Extract Pass 2 Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Full Report via SendGrid": {
      "main": [
        [
          {
            "node": "Return Report Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Pass 1 Research Synthesis": {
      "main": [
        [
          {
            "node": "Extract Pass 1 Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude Pass 3 Write Final Report": {
      "main": [
        [
          {
            "node": "Format Final Report Package",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}