{
  "name": "Automate monthly CrUX report transfer from BigQuery to NocoDB with data cleanup",
  "nodes": [
    {
      "id": "b3ff85fe-b34b-4426-8c0b-83b15d22b6f4",
      "name": "Google BigQuery",
      "type": "n8n-nodes-base.googleBigQuery",
      "position": [
        980,
        60
      ]
    },
    {
      "id": "9072f57b-a4b3-4f2c-912b-cb60450c9cf2",
      "name": "Get Last Month Data",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        600,
        460
      ]
    },
    {
      "id": "8f293e9a-c763-4e8a-afb3-2350dcfee4f4",
      "name": "Delete in NocoDB",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        1100,
        460
      ]
    },
    {
      "id": "66d662f4-46e9-42a6-801e-fff09dd173db",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        840,
        460
      ]
    },
    {
      "id": "3ddb8941-047f-41ef-83b5-cf7245fba81b",
      "name": "Append Crux Data into NocoDB",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        1320,
        60
      ]
    },
    {
      "id": "c3e55cfa-f46e-48f8-9d5c-de83dd57d894",
      "name": "Convert month name to number",
      "type": "n8n-nodes-base.code",
      "position": [
        460,
        60
      ]
    },
    {
      "id": "e874c5f0-b894-4fc2-a81d-46b49247a6a8",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        720,
        60
      ]
    },
    {
      "id": "0cf7f728-87aa-411e-b2bb-174ae10c06eb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -300
      ],
      "parameters": {
        "width": 280,
        "height": 540,
        "content": "This node convert **Gregorian month name** to number:\n\nJanuary: 01\nFebruary: 02\nMarch: 03\n...\nDecember: '12'"
      }
    },
    {
      "id": "07188746-d762-467e-b40c-773bb865f903",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -300
      ],
      "parameters": {
        "width": 280,
        "height": 540,
        "content": "## **Google BigQuery**\n\nThis node connects to **Google BigQuery** and runs a dynamic SQL query to fetch the **CrUX (Chrome User Experience) Report** data.  \nIt retrieves the top-ranked website origins"
      }
    },
    {
      "id": "3b463b1c-1d3a-4868-8944-6552dcaa725a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        340
      ],
      "parameters": {
        "width": 1160,
        "height": 320,
        "content": "## **Delete Last Month Data**\n\n🗑️ **Note:** This workflow deletes records for the last month — review filters carefully before running. Triggers before Monthly Trigger2."
      }
    },
    {
      "id": "225a6af1-8761-41d5-b328-805a5abd473a",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -300
      ],
      "parameters": {
        "width": 280,
        "height": 540,
        "content": "## Monthly Trigger2\n\nTriggers 1st day of every month, after Monthly Trigger1."
      }
    },
    {
      "id": "60266227-51f4-4076-aa10-265a1a13cf3f",
      "name": "Monthly Trigger1",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        340,
        460
      ]
    },
    {
      "id": "57deaa20-2727-4bcc-b8e6-cb31931223f0",
      "name": "Monthly Trigger2",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        120,
        60
      ]
    },
    {
      "id": "87a6421a-51e6-4d95-af2e-6a0dcf107c2a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1220,
        -300
      ],
      "parameters": {
        "width": 300,
        "height": 540,
        "content": "## Append Crux Data into NocoDB\n\nThe database contains 2 fields:\n- origin\n- crux_rank\n\norigin: url of the website.\ncrux_rank: estimated crux rank of that website. (1000, 5000,10000 and ...)"
      }
    }
  ],
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Google BigQuery",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google BigQuery": {
      "main": [
        [
          {
            "node": "Append Crux Data into NocoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Delete in NocoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete in NocoDB": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monthly Trigger1": {
      "main": [
        [
          {
            "node": "Get Last Month Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Monthly Trigger2": {
      "main": [
        [
          {
            "node": "Convert month name to number",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Last Month Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert month name to number": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}