Daten von mehreren RSS-Quellen in Telegram abrufen

Fortgeschritten

Dies ist ein Building Blocks-Bereich Automatisierungsworkflow mit 11 Nodes. Hauptsächlich werden If, Cron, Function, Telegram, RssFeedRead und andere Nodes verwendet. Daten aus mehreren RSS-Quellen an Telegram senden

Voraussetzungen
  • Telegram Bot Token

Kategorie

Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "nodes": [
    {
      "name": "RSS-Feed lesen",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        420,
        -20
      ],
      "parameters": {
        "url": "={{$node[\"SplitInBatches\"].json[\"url\"]}}"
      },
      "typeVersion": 1,
      "id": "RSS-Feed-lesen-0"
    },
    {
      "name": "SplitInBatches",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        200,
        -20
      ],
      "parameters": {
        "options": {},
        "batchSize": 1
      },
      "typeVersion": 1,
      "id": "SplitInBatches-1"
    },
    {
      "name": "Cron-Job",
      "type": "n8n-nodes-base.cron",
      "position": [
        -240,
        -20
      ],
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 10
            }
          ]
        }
      },
      "typeVersion": 1,
      "id": "Cron-Job-2"
    },
    {
      "name": "Nur neue RSS abrufen",
      "type": "n8n-nodes-base.function",
      "position": [
        640,
        -20
      ],
      "parameters": {
        "functionCode": "const staticData = getWorkflowStaticData('global');\nconst newRSSIds = items.map(item => item.json[\"isoDate\"]);\nconst oldRSSIds = staticData.oldRSSIds; \n\nif (!oldRSSIds) {\n  staticData.oldRSSIds = newRSSIds;\n  return items;\n}\n\n\nconst actualNewRSSIds = newRSSIds.filter((id) => !oldRSSIds.includes(id));\nconst actualNewRSS = items.filter((data) => actualNewRSSIds.includes(data.json['isoDate']));\nstaticData.oldRSSIds = [...actualNewRSSIds, ...oldRSSIds];\n\nreturn actualNewRSS;\n"
      },
      "typeVersion": 1,
      "id": "Nur-neue-RSS-abrufen-3"
    },
    {
      "name": "Telegram_IT",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1220,
        460
      ],
      "parameters": {
        "text": "={{$json[\"title\"]}}\n{{$json[\"link\"]}}",
        "chatId": "TelegramID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "2",
          "name": "IT_RSS"
        }
      },
      "typeVersion": 1,
      "id": "Telegram_IT-4"
    },
    {
      "name": "Telegram_Security",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1220,
        220
      ],
      "parameters": {
        "text": "={{$json[\"title\"]}}\n{{$json[\"link\"]}}",
        "chatId": "TelegramID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "4",
          "name": "Security_RSS"
        }
      },
      "typeVersion": 1,
      "id": "Telegram_Security-5"
    },
    {
      "name": "RSS-Quelle",
      "type": "n8n-nodes-base.function",
      "position": [
        -20,
        -20
      ],
      "parameters": {
        "functionCode": "return [\n  {\n    json: {\n      url: 'https://feeds.feedburner.com/UnikosHardware',\n    }\n  },\n  {\n    json: {\n      url: 'http://www.ithome.com.tw/rss.php',\n    }\n  },\n  {\n    json: {\n      url: 'http://feeds.feedburner.com/playpc',\n    }\n  },\n  {\n    json: {\n      url: 'https://lab.ocf.tw/feed/',\n    }\n  },\n  {\n    json: {\n      url: 'https://techcommunity.microsoft.com/plugins/custom/microsoft/o365/custom-blog-rss?tid=3754543230341459569&board=microsoft_365blog',\n    }\n  }\n];"
      },
      "typeVersion": 1,
      "id": "RSS-Quelle-6"
    },
    {
      "name": "Telegram_M365",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1220,
        -40
      ],
      "parameters": {
        "text": "={{$json[\"title\"]}}\n{{$json[\"link\"]}}",
        "chatId": "TelegramID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "5",
          "name": "M365_RSS"
        }
      },
      "typeVersion": 1,
      "id": "Telegram_M365-7"
    },
    {
      "name": "Wenn-2",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        240
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"title\"]}}",
              "value2": "資安|資訊安全|安全|外洩|監控|威脅|漏洞|封鎖|修補|攻擊|入侵|個資|隱私|私密|騙|社交工程|釣魚|駭|Security|security|Secure|secure",
              "operation": "regex"
            }
          ]
        },
        "combineOperation": "any"
      },
      "typeVersion": 1,
      "id": "Wenn-2-8"
    },
    {
      "name": "Wenn-1",
      "type": "n8n-nodes-base.if",
      "position": [
        880,
        -20
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"link\"]}}",
              "value2": "techcommunity.microsoft.com",
              "operation": "contains"
            }
          ]
        }
      },
      "typeVersion": 1,
      "id": "Wenn-1-9"
    },
    {
      "name": "Clear Funktion",
      "type": "n8n-nodes-base.function",
      "position": [
        -20,
        -180
      ],
      "parameters": {
        "functionCode": "// Get the global workflow static data\nconst staticData = getWorkflowStaticData('global');\n// Update its data\nstaticData.oldRSSIds = new Date().getTime();\n// Delete data\ndelete staticData.oldRSSIds;\n\nreturn [\n  {\n    json: {}\n  }\n]"
      },
      "typeVersion": 1,
      "id": "Clear-Funktion-10"
    }
  ],
  "connections": {
    "Cron": {
      "main": [
        [
          {
            "node": "RSS-Quelle-6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF-1": {
      "main": [
        [
          {
            "node": "Telegram_M365-7",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "IF-2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF-2": {
      "main": [
        [
          {
            "node": "Telegram_Security-5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Telegram_IT-4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS-Quelle-6": {
      "main": [
        [
          {
            "node": "SplitInBatches-1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS-Feed-lesen-0": {
      "main": [
        [
          {
            "node": "SplitInBatches-1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Nur-neue-RSS-abrufen-3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SplitInBatches-1": {
      "main": [
        [
          {
            "node": "RSS-Feed-lesen-0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Nur-neue-RSS-abrufen-3": {
      "main": [
        [
          {
            "node": "IF-1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Bausteine

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes11
Kategorie1
Node-Typen6
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34