{
  "name": "Enrich Google Sheets data with the Tavily Research API",
  "nodes": [
    {
      "id": "f93ffe2d-93c2-4bba-ab46-7d2827c0e42f",
      "name": "Click to Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1232,
        1392
      ]
    },
    {
      "id": "3f4af357-425a-4a01-9f3e-db181183d83c",
      "name": "Combine with Request IDs",
      "type": "n8n-nodes-base.code",
      "position": [
        2832,
        1392
      ]
    },
    {
      "id": "807a8384-7a3a-4ec6-9462-b034da47b6fb",
      "name": "Wait 30s",
      "type": "n8n-nodes-base.wait",
      "position": [
        3568,
        1392
      ]
    },
    {
      "id": "3e0caa72-f8bd-4a21-ade5-a0ed321f734d",
      "name": "Check Research Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3888,
        1392
      ]
    },
    {
      "id": "b17d1581-b486-42a3-bf0e-0b52eb8d3e0f",
      "name": "Combine Status",
      "type": "n8n-nodes-base.code",
      "position": [
        4288,
        1392
      ]
    },
    {
      "id": "83fd49e4-3e3b-42f8-a6ba-59b8c8c9e55e",
      "name": "Research Done?",
      "type": "n8n-nodes-base.if",
      "position": [
        4512,
        1280
      ]
    },
    {
      "id": "6ed17468-ed5d-4f1c-8276-66b63930c78d",
      "name": "Under 5 min?",
      "type": "n8n-nodes-base.if",
      "position": [
        4736,
        1456
      ]
    },
    {
      "id": "9c411b50-1969-4902-a563-30555ad6de8e",
      "name": "Merge All Data (Existing Columns Only)",
      "type": "n8n-nodes-base.code",
      "position": [
        5728,
        1392
      ]
    },
    {
      "id": "5a00c4d6-7021-475e-91bb-67c264731f97",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        976
      ],
      "parameters": {
        "width": 992,
        "height": 560,
        "content": "## Data Enrichment with Tavily Research API\nFill in missing company data in your Google Sheet using Tavily’s web research. This is mainly for existing columns (You must manually add column names that "
      }
    },
    {
      "id": "d94f518f-f0f5-445d-933a-445e54891739",
      "name": "Start Tavily Research",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2608,
        1392
      ]
    },
    {
      "id": "b57b78d3-8fb0-4cbe-ad88-3d4c8942aaf8",
      "name": "Enrich CSV file",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5984,
        1392
      ]
    },
    {
      "id": "f7cb0bb3-d055-4edd-90a1-7ecfdeaa1b4a",
      "name": "Read CSV file",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1696,
        1392
      ]
    },
    {
      "id": "a6d2296d-3b78-41be-9f06-4b1b98db3935",
      "name": "Store Original Columns",
      "type": "n8n-nodes-base.code",
      "position": [
        2384,
        1392
      ]
    },
    {
      "id": "ff8f57f7-dd9b-47c7-a5f1-a46c710962d9",
      "name": "Section: Data Input",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        976
      ],
      "parameters": {
        "width": 868,
        "height": 572,
        "content": "## Data Input\n\nReads company data from Google Sheets"
      }
    },
    {
      "id": "964fe434-f1c8-4ce9-8fdf-779285c991ce",
      "name": "Section: Research Initiation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        1232
      ],
      "parameters": {
        "width": 644,
        "height": 316,
        "content": "## Research Initiation\n\nPrepares data and starts Tavily research requests"
      }
    },
    {
      "id": "7adeb5f6-3798-4340-ac2f-706b48897089",
      "name": "Section: Polling Loop",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3424,
        1088
      ],
      "parameters": {
        "width": 1604,
        "height": 588,
        "content": "## Polling Loop\n\nWaits and checks research status until complete (max 5 min)"
      }
    },
    {
      "id": "78f1e4d9-260c-4fb4-910b-79b521b23a09",
      "name": "Section: Data Output",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5488,
        1232
      ],
      "parameters": {
        "width": 836,
        "height": 364,
        "content": "## Data Output\n\nMerges enriched data and writes to Google Sheets"
      }
    },
    {
      "id": "4dc5d6ba-10b8-4018-802e-7ad51232eca3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        1088
      ],
      "parameters": {
        "width": 480,
        "height": 448,
        "content": "## ⚠️ Important Setup Step\n\n**Before running:**\n\n1. Create an empty output sheet in the same Google Sheets document as your input data\n\n2. The output sheet will receive the enriched data\n\nExample:\n- I"
      }
    }
  ],
  "connections": {
    "Wait 30s": {
      "main": [
        [
          {
            "node": "Check Research Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Under 5 min?": {
      "main": [
        [
          {
            "node": "Wait 30s",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge All Data (Existing Columns Only)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read CSV file": {
      "main": [
        [
          {
            "node": "Store Original Columns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Click to Start": {
      "main": [
        [
          {
            "node": "Read CSV file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Status": {
      "main": [
        [
          {
            "node": "Research Done?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Done?": {
      "main": [
        [
          {
            "node": "Merge All Data (Existing Columns Only)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Under 5 min?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Research Status": {
      "main": [
        [
          {
            "node": "Combine Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Tavily Research": {
      "main": [
        [
          {
            "node": "Combine with Request IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Original Columns": {
      "main": [
        [
          {
            "node": "Start Tavily Research",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine with Request IDs": {
      "main": [
        [
          {
            "node": "Wait 30s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Data (Existing Columns Only)": {
      "main": [
        [
          {
            "node": "Enrich CSV file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}