{
  "name": "Daily Worldwide Remote Tech & AI Job Alerts to Telegram via Apify",
  "nodes": [
    {
      "parameters": {
        "content": "## Daily Worldwide Remote Tech & AI Job Alerts\n\nAutomatically fetches fresh remote engineering, AI, and automation jobs once per day from Remotive, Jobicy, Himalayas, RemoteOK, and WeWorkRemotely, removes duplicate links, and sends a clean digest to Telegram.\n\n### Prerequisites\n- **Apify API Token** (`$5` free monthly platform credits included): https://apify.com/tsun_tsun/remote-jobs-api-aggregator?fpr=cn0u9m\n- **Telegram Bot** credential in n8n\n\n### Quick Setup\n1. Create a **Header Auth** credential in n8n (`Name`: `Authorization`, `Value`: `Bearer <apify-api-token>`).\n2. Edit keywords, sources, and `telegramChatId` in **Configure Search & Alert**.\n3. Select your Telegram Bot credential in **Send Telegram Digest** and run a manual test.",
        "height": 230,
        "width": 700,
        "color": 5
      },
      "id": "11111111-1111-4111-8111-111111111001",
      "name": "Sticky Note Overview",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [140, 20]
    },
    {
      "parameters": {
        "content": "## 1. Configure & Fetch Remote Jobs\nSets search filters and fetches deduplicated daily remote listings from Apify without headless browsers.",
        "height": 220,
        "width": 740,
        "color": 7
      },
      "id": "11111111-1111-4111-8111-111111111002",
      "name": "Sticky Note Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [150, 270]
    },
    {
      "parameters": {
        "content": "## 2. Deduplicate, Check & Notify\nRemoves duplicate URLs, checks whether matching roles exist, and delivers one formatted Telegram digest.",
        "height": 220,
        "width": 740,
        "color": 7
      },
      "id": "11111111-1111-4111-8111-111111111003",
      "name": "Sticky Note Notify",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [930, 270]
    },
    {
      "parameters": {
        "content": "## Setup Required\nAttach your Apify Header Auth credential (`Authorization: Bearer <TOKEN>`) and set `telegramChatId` before enabling the schedule.",
        "height": 140,
        "width": 380,
        "color": 3
      },
      "id": "11111111-1111-4111-8111-111111111004",
      "name": "Sticky Note Warning",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [420, 520]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "11111111-1111-4111-8111-111111111011",
      "name": "Daily Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [200, 340]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "a1111111-0001-4000-8000-000000000001",
              "name": "sources",
              "value": "={{ [\"remotive\", \"jobicy\", \"himalayas\", \"remoteok\", \"weworkremotely\"] }}",
              "type": "array"
            },
            {
              "id": "a1111111-0001-4000-8000-000000000002",
              "name": "keywords",
              "value": "={{ [\"typescript\", \"python\", \"junior\", \"automation\"] }}",
              "type": "array"
            },
            {
              "id": "a1111111-0001-4000-8000-000000000003",
              "name": "postedWithinDays",
              "value": 1,
              "type": "number"
            },
            {
              "id": "a1111111-0001-4000-8000-000000000004",
              "name": "maxTotalJobs",
              "value": 15,
              "type": "number"
            },
            {
              "id": "a1111111-0001-4000-8000-000000000005",
              "name": "telegramChatId",
              "value": "",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "11111111-1111-4111-8111-111111111012",
      "name": "Configure Search & Alert",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [460, 340]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/tsun_tsun~remote-jobs-api-aggregator/run-sync-get-dataset-items",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ sources: $json.sources, keywords: $json.keywords, postedWithinDays: $json.postedWithinDays, maxTotalJobs: $json.maxTotalJobs }) }}",
        "options": {}
      },
      "id": "11111111-1111-4111-8111-111111111013",
      "name": "Fetch Remote Jobs via Apify",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [720, 340]
    },
    {
      "parameters": {
        "jsCode": "const seen = new Set();\nconst unique = [];\n\nfor (const item of $input.all()) {\n  const job = item.json || {};\n  const url = String(job.jobUrl || '').trim();\n  const title = String(job.title || '').trim();\n  if (!url || !title || seen.has(url)) continue;\n  seen.add(url);\n  unique.push({\n    company: String(job.company || 'Unknown').trim(),\n    title,\n    location: String(job.location || 'Worldwide').trim(),\n    jobUrl: url,\n  });\n}\n\nconst topJobs = unique.slice(0, 15);\nconst lines = topJobs.map((j, idx) => `${idx + 1}. ${j.company} — ${j.title} (${j.location})\\n${j.jobUrl}`);\nconst digestMessage = topJobs.length\n  ? `Daily Remote Tech & AI Jobs (${topJobs.length}):\\n\\n${lines.join('\\n\\n')}`\n  : '';\n\nreturn [{ json: { jobCount: topJobs.length, digestMessage, jobs: topJobs } }];"
      },
      "id": "11111111-1111-4111-8111-111111111014",
      "name": "Deduplicate & Format Digest",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [980, 340]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "c1111111-0001-4000-8000-000000000001",
              "leftValue": "={{ $json.jobCount }}",
              "rightValue": 0,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "11111111-1111-4111-8111-111111111015",
      "name": "Has Matching Jobs?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [1240, 340]
    },
    {
      "parameters": {
        "chatId": "={{ $('Configure Search & Alert').first().json.telegramChatId }}",
        "text": "={{ $json.digestMessage }}",
        "additionalFields": {
          "disable_web_page_preview": true
        }
      },
      "id": "11111111-1111-4111-8111-111111111016",
      "name": "Send Telegram Digest",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [1500, 320]
    }
  ],
  "connections": {
    "Daily Schedule": {
      "main": [
        [
          {
            "node": "Configure Search & Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Search & Alert": {
      "main": [
        [
          {
            "node": "Fetch Remote Jobs via Apify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Remote Jobs via Apify": {
      "main": [
        [
          {
            "node": "Deduplicate & Format Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deduplicate & Format Digest": {
      "main": [
        [
          {
            "node": "Has Matching Jobs?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Matching Jobs?": {
      "main": [
        [
          {
            "node": "Send Telegram Digest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {}
}
