{
  "name": "GitHub Watcher",
  "nodes": [
    {
      "parameters": {
        "content": "Daily schedule → Monitors GitHub releases/Docker Hub tags → Triggers webhook to pull new images when versions change"
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        304,
        -144
      ],
      "typeVersion": 1,
      "id": "3e288f1a-d1ba-419e-90ea-ffc26e15107b",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "id": "5458d1cd-12b0-45ee-9ba9-02cc87907a33",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        -112,
        560
      ]
    },
    {
      "parameters": {
        "resource": "repository",
        "operation": "get",
        "owner": {
          "__rl": true,
          "value": "=Eagle84",
          "mode": "name"
        },
        "repository": {
          "__rl": true,
          "value": "=",
          "mode": "name"
        }
      },
      "id": "ba070e5d-043b-4f3e-8ff9-d65c337bec41",
      "name": "GitHub: List Repos",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        112,
        560
      ],
      "webhookId": "a8ca9d95-b1c8-48fa-af72-9951fb3d52fe",
      "credentials": {
        "githubApi": {
          "id": "Z1LKY6qqc32JXrnQ",
          "name": "GitHub account"
        }
      }
    },
    {
      "parameters": {
        "resource": "release",
        "operation": "getLatest",
        "owner": "={{ $json.owner.login }}",
        "repository": "={{ $json.name }}"
      },
      "id": "dad0e6e8-2098-4e04-984d-838861bc1571",
      "name": "GitHub: Get Latest",
      "type": "n8n-nodes-base.github",
      "typeVersion": 1,
      "position": [
        336,
        560
      ],
      "webhookId": "8c600b6f-2311-457a-a1aa-a0978c732dca",
      "credentials": {
        "githubApi": {
          "id": "Z1LKY6qqc32JXrnQ",
          "name": "GitHub account"
        }
      },
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "jsCode": "for (const item of $input.all()) {\n  // Skip items that errored out (repos with no releases)\n  if (item.json.error || !item.json.html_url) continue;\n\n  const title = item.json.name || item.json.tag_name || 'New Release';\n  const repoName = item.json.html_url.split('/')[4];\n  const link = item.json.html_url;\n  \n  const escapeHTML = (str) => str.toString()\n      .replace(/&/g, '&amp;')\n      .replace(/</g, '&lt;')\n      .replace(/>/g, '&gt;');\n\n  const cleanTitle = escapeHTML(title);\n  const cleanRepo = escapeHTML(repoName);\n\n  item.json.tg_message = `<b>🚀 GITHUB UPDATE: ${cleanRepo}</b>\\n\\n` +\n                         `<b>🏷 Version:</b> <code>${cleanTitle}</code>\\n` +\n                         `<b>🔗 Link:</b>\\n${link}`;\n}\n\n// Only return items that have a message prepared\nreturn $input.all().filter(i => i.json.tg_message);"
      },
      "id": "7f478e76-5687-4171-9e19-29ed66e7fbb9",
      "name": "Code: Format Message",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        592,
        544
      ]
    },
    {
      "parameters": {
        "chatId": "@githubwatcher",
        "text": "={{ $json.tg_message }}",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "id": "e292840f-7450-4bbd-b1d7-a3a4dc9fef8a",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        784,
        544
      ],
      "settings": {
        "retryOnFail": true,
        "maxRetries": 3,
        "waitBetweenRetries": 1000
      },
      "webhookId": "1612228b-a06e-48e2-9f9f-494fb923e727",
      "credentials": {
        "telegramApi": {
          "id": "0vnrBUm3coYjYkdp",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "content": "## I'm a note \nGitHub/Docker Image Watcher\nWorkflow ID: N3c0dhqe0Blqrtah (2 nodes)\n\nDaily schedule → Monitors GitHub releases/Docker Hub tags → Triggers webhook to pull new images when versions change\n",
        "width": 816
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        192,
        208
      ],
      "typeVersion": 1,
      "id": "08fa2dd8-e4cf-4ae9-87e9-39c749127539",
      "name": "Sticky Note1"
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "GitHub: List Repos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: List Repos": {
      "main": [
        [
          {
            "node": "GitHub: Get Latest",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub: Get Latest": {
      "main": [
        [
          {
            "node": "Code: Format Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Format Message": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "saveDataErrorExecution": "all",
    "saveDataSuccessExecution": "all",
    "saveManualExecutions": true,
    "saveExecutionProgress": true,
    "callerPolicy": "workflowsFromSameOwner",
    "availableInMCP": false
  },
  "versionId": "baa6bc56-b165-4df9-8e37-eb6ce576f028",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "e09d1f0f8b9f78e80ac70b6dc8726dd263b0b6ffc4300b0eee3b58f6da316f29"
  },
  "id": "N3c0dhqe0Blqrtah",
  "tags": []
}