{
  "name": "Track GitHub trending repositories with ScrapeOps & Google Sheets",
  "nodes": [
    {
      "id": "f0f306fd-4fe7-46db-8761-7980eef55bdb",
      "name": "Cron (daily/weekly)",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1104,
        -80
      ]
    },
    {
      "id": "ab4b695b-de79-4729-9463-8b59c047be2c",
      "name": "Build URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        -656,
        -80
      ]
    },
    {
      "id": "fbb4a5fc-1222-48c0-a9dd-2efd06472d66",
      "name": "Split URLs (loop)",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -400,
        -80
      ]
    },
    {
      "id": "e00a10e3-0650-467f-bda5-1ebd855d1779",
      "name": "ScrapeOps: Fetch HTML",
      "type": "@scrapeops/n8n-nodes-scrapeops.ScrapeOps",
      "position": [
        -176,
        -80
      ]
    },
    {
      "id": "2d61a915-3d69-4fff-a179-150362f26a3c",
      "name": "Polite Delay",
      "type": "n8n-nodes-base.wait",
      "position": [
        64,
        -80
      ]
    },
    {
      "id": "3d681415-dd9a-454d-a108-dc1c1ec9cdb8",
      "name": "Extract Trending Repos",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        -80
      ]
    },
    {
      "id": "6df21227-e87a-4db6-96a1-efe0b60e5b58",
      "name": "Normalize + Enrich-from-page",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        -80
      ]
    },
    {
      "id": "db2a227b-66d9-4c1f-8a25-21dba32aa701",
      "name": "Write to Google Sheets (raw tab)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        864,
        -80
      ]
    },
    {
      "id": "d3b522dc-93f3-403a-a923-8c040920710b",
      "name": "Write to Google Sheets (weekly tab)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        400,
        336
      ]
    },
    {
      "id": "c735eb78-72a1-4183-84fe-44c78746f9f3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1808,
        -608
      ],
      "parameters": {
        "width": 656,
        "height": 800,
        "content": "# GitHub Trending Tracker (Daily/Weekly/Monthly) → Google Sheets\n\nThis workflow pulls **GitHub Trending repositories** for a chosen time window (**daily / weekly / monthly**) and writes results to a G"
      }
    },
    {
      "id": "a0cef4cb-1d76-4f67-bf07-cf97c3c281b0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -192
      ],
      "parameters": {
        "width": 496,
        "height": 304,
        "content": "## Inputs & URL Builder\nSet `since` + languages, then generate GitHub Trending URLs.\n"
      }
    },
    {
      "id": "feae26f1-0889-4a52-b705-62a5d55fb2b8",
      "name": "Set Inputs",
      "type": "n8n-nodes-base.set",
      "position": [
        -896,
        -80
      ]
    },
    {
      "id": "7c9908e4-a0b1-4a6b-9e65-7fbc91f398e1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        -192
      ],
      "parameters": {
        "width": 496,
        "height": 320,
        "content": "## Scrape Trending Pages\nFetch HTML via ScrapeOps, then wait briefly to be polite.\n"
      }
    },
    {
      "id": "c04937d5-93d4-4f1d-8925-5451faecd8d2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -192
      ],
      "parameters": {
        "width": 496,
        "height": 320,
        "content": "## Parse & Normalize\nExtract repos + rank from HTML and normalize numbers + scoring + dedupe key.\n"
      }
    },
    {
      "id": "101bb8bd-8bad-44f8-881f-cdb22756e186",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -192
      ],
      "parameters": {
        "width": 320,
        "height": 320,
        "content": "## Save Results\nUpsert rows into Google Sheets using `dedupe_key` to avoid duplicates.\n"
      }
    },
    {
      "id": "bb9fefc0-51ca-4006-b1e9-8321923243c9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        224
      ],
      "parameters": {
        "width": 736,
        "height": 320,
        "content": "## Weekly Brief (Optional)\nReads raw data and writes a summary into the weekly_brief tab.\n"
      }
    },
    {
      "id": "0f912457-142c-4a91-af13-686946f1aad8",
      "name": "Read raw (for weekly)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -64,
        336
      ]
    },
    {
      "id": "20904aec-177e-4174-a859-bdce20b32e17",
      "name": "Generate Weekly",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        336
      ]
    }
  ],
  "connections": {
    "Build URLs": {
      "main": [
        [
          {
            "node": "Split URLs (loop)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Inputs": {
      "main": [
        [
          {
            "node": "Build URLs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Read raw (for weekly)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Polite Delay": {
      "main": [
        [
          {
            "node": "Extract Trending Repos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Weekly": {
      "main": [
        [
          {
            "node": "Write to Google Sheets (weekly tab)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split URLs (loop)": {
      "main": [
        [
          {
            "node": "ScrapeOps: Fetch HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron (daily/weekly)": {
      "main": [
        [
          {
            "node": "Set Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read raw (for weekly)": {
      "main": [
        [
          {
            "node": "Generate Weekly",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ScrapeOps: Fetch HTML": {
      "main": [
        [
          {
            "node": "Polite Delay",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Trending Repos": {
      "main": [
        [
          {
            "node": "Normalize + Enrich-from-page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize + Enrich-from-page": {
      "main": [
        [
          {
            "node": "Write to Google Sheets (raw tab)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}