{
  "name": "Fetch daily job postings from JSearch to Google Sheets and Telegram",
  "nodes": [
    {
      "id": "eac919e3-dd1c-4d6b-af7b-aa058f0b8bee",
      "name": "Run Daily at 22:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1856,
        608
      ]
    },
    {
      "id": "ff1ac477-1069-4269-8c8c-f64206683ddc",
      "name": "Fetch Jobs from JSearch API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1184,
        912
      ]
    },
    {
      "id": "155d612f-91d0-4469-aad0-3812fc3ab045",
      "name": "Split API Results",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -976,
        912
      ]
    },
    {
      "id": "d4ad60d5-c586-4075-9780-a742cb644115",
      "name": "Load Existing Job IDs",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -928,
        592
      ]
    },
    {
      "id": "abb11618-7250-4e47-85d1-eedb8058bea6",
      "name": "Combine API Results with Existing IDs",
      "type": "n8n-nodes-base.merge",
      "position": [
        -704,
        592
      ]
    },
    {
      "id": "00cbeb08-38df-42d7-9cdb-bdcb46343069",
      "name": "Filter Out Existing Jobs",
      "type": "n8n-nodes-base.code",
      "position": [
        -480,
        592
      ]
    },
    {
      "id": "1e405143-b08f-4f8c-9f19-f9e48697cb69",
      "name": "Count New Jobs",
      "type": "n8n-nodes-base.code",
      "position": [
        -256,
        592
      ]
    },
    {
      "id": "756b2f27-e413-47f9-a251-75439e39f474",
      "name": "Loop Over New Jobs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        0,
        400
      ]
    },
    {
      "id": "bad27543-e41e-407f-8fc9-aa1a2f6e7ac7",
      "name": "Delay Before Writing to Sheet",
      "type": "n8n-nodes-base.wait",
      "position": [
        176,
        400
      ]
    },
    {
      "id": "1381d96a-9e1c-49cb-a6ef-0c56206c2cf8",
      "name": "Save Job to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        352,
        400
      ]
    },
    {
      "id": "3856c183-c121-4a81-9a30-0e99c2f1ef87",
      "name": "Combine Count and Save Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        176,
        592
      ]
    },
    {
      "id": "d7c89547-3671-4852-8327-703d60507f06",
      "name": "Send Telegram Report",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        592
      ]
    },
    {
      "id": "8398eca6-b09a-4724-a132-c81ff2ac1529",
      "name": "Set Search Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -1632,
        912
      ]
    },
    {
      "id": "7195e276-08c1-4ca6-af25-b7fdfc354307",
      "name": "Build Search Query",
      "type": "n8n-nodes-base.code",
      "position": [
        -1408,
        912
      ]
    },
    {
      "id": "fb9b986b-25e6-494b-9a57-826e52898f58",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1680,
        800
      ],
      "parameters": {
        "width": 832,
        "height": 288,
        "content": "### Query Building and Querying Section\n* Defines search text, encodes it\n* Fetches job results from the API\n* Splits them into individual items"
      }
    },
    {
      "id": "19b0bb8b-ec8b-4190-9069-8c44ad6b0dd7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        464
      ],
      "parameters": {
        "width": 880,
        "height": 304,
        "content": "### Existing-ID Filtering Section\n*  Loads existing job IDs from the sheet\n* Matches API results against them\n* Removes duplicates\n* Counts how many new jobs remain for processing"
      }
    },
    {
      "id": "97696dc3-73e1-4c2e-bfb5-1fde2c85508c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -64,
        240
      ],
      "parameters": {
        "width": 640,
        "height": 528,
        "content": "### Saving & Reporting Section\n* Iterates through new jobs\n* Applies a small delay to respect Google API limits\n* Writes each job to the sheet\n* Combines results\n* Sends a Telegram summary"
      }
    },
    {
      "id": "6247f510-2f32-4915-929d-8192351e0675",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1904,
        -16
      ],
      "parameters": {
        "width": 736,
        "height": 608,
        "content": "## How it works\nThis workflow runs once per day and automatically collects new job postings from the JSearch API.\nIt builds a search query, fetches recent job listings, and splits the API response int"
      }
    }
  ],
  "connections": {
    "Count New Jobs": {
      "main": [
        [
          {
            "node": "Combine Count and Save Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split API Results": {
      "main": [
        [
          {
            "node": "Combine API Results with Existing IDs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Build Search Query": {
      "main": [
        [
          {
            "node": "Fetch Jobs from JSearch API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over New Jobs": {
      "main": [
        [
          {
            "node": "Combine Count and Save Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Delay Before Writing to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Daily at 22:00": {
      "main": [
        [
          {
            "node": "Load Existing Job IDs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set Search Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Load Existing Job IDs": {
      "main": [
        [
          {
            "node": "Combine API Results with Existing IDs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Search Parameters": {
      "main": [
        [
          {
            "node": "Build Search Query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Out Existing Jobs": {
      "main": [
        [
          {
            "node": "Count New Jobs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Loop Over New Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Job to Google Sheet": {
      "main": [
        [
          {
            "node": "Loop Over New Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Jobs from JSearch API": {
      "main": [
        [
          {
            "node": "Split API Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delay Before Writing to Sheet": {
      "main": [
        [
          {
            "node": "Save Job to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Count and Save Results": {
      "main": [
        [
          {
            "node": "Send Telegram Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine API Results with Existing IDs": {
      "main": [
        [
          {
            "node": "Filter Out Existing Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}