从多个 RSS 源获取数据到 Telegram
中级
这是一个Building Blocks领域的自动化工作流,包含 11 个节点。主要使用 If, Cron, Function, Telegram, RssFeedRead 等节点。 从多个 RSS 源获取数据到 Telegram
前置要求
- •Telegram Bot Token
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
无法加载工作流预览
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"nodes": [
{
"name": "RSS 源读取",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
420,
-20
],
"parameters": {
"url": "={{$node[\"SplitInBatches\"].json[\"url\"]}}"
},
"typeVersion": 1
},
{
"name": "分批处理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
200,
-20
],
"parameters": {
"options": {},
"batchSize": 1
},
"typeVersion": 1
},
{
"name": "定时任务",
"type": "n8n-nodes-base.cron",
"position": [
-240,
-20
],
"parameters": {
"triggerTimes": {
"item": [
{
"mode": "everyX",
"unit": "minutes",
"value": 10
}
]
}
},
"typeVersion": 1
},
{
"name": "仅获取新 RSS",
"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
},
{
"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
},
{
"name": "Telegram_安全",
"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
},
{
"name": "RSS 源",
"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
},
{
"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
},
{
"name": "IF-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
},
{
"name": "IF-1",
"type": "n8n-nodes-base.if",
"position": [
880,
-20
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{$json[\"link\"]}}",
"value2": "techcommunity.microsoft.com",
"operation": "contains"
}
]
}
},
"typeVersion": 1
},
{
"name": "清除函数",
"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
}
],
"connections": {
"Cron": {
"main": [
[
{
"node": "RSS Source",
"type": "main",
"index": 0
}
]
]
},
"IF-1": {
"main": [
[
{
"node": "Telegram_M365",
"type": "main",
"index": 0
}
],
[
{
"node": "IF-2",
"type": "main",
"index": 0
}
]
]
},
"IF-2": {
"main": [
[
{
"node": "Telegram_Security",
"type": "main",
"index": 0
}
],
[
{
"node": "Telegram_IT",
"type": "main",
"index": 0
}
]
]
},
"RSS Source": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
}
]
]
},
"RSS Feed Read": {
"main": [
[
{
"node": "SplitInBatches",
"type": "main",
"index": 0
},
{
"node": "only get new RSS",
"type": "main",
"index": 0
}
]
]
},
"SplitInBatches": {
"main": [
[
{
"node": "RSS Feed Read",
"type": "main",
"index": 0
}
]
]
},
"only get new RSS": {
"main": [
[
{
"node": "IF-1",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 构建模块
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
在 Notion 数据库中归档空白页面
归档 Notion 数据库中的空白页面
If
Cron
Notion
+2
10 节点Jonathan
构建模块
n8n_check
通过RSS、电子邮件和Telegram自动通知新的n8n主要版本发布
If
Cron
Aws Ses
+4
7 节点Miquel Colomer
工程
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客文章
使用GPT-4o、WordPress和LinkedIn发布自动化RSS内容到博客文章
If
Set
Code
+21
40 节点Immanuel
人工智能
优雅内容激发 — RSS → Notion (n8n)
将 RSS 源整理为每日内容创意,通过邮件发送,支持 Notion 和 Telegram 选项
If
Set
Cron
+8
20 节点Shelly-Ann Davy
内容创作
灵活新闻聚合器 - 多源集成、AI分析和可设置频道
多源新闻策展系统,集成Mistral AI分析、摘要和自定义频道
If
Set
Xml
+32
120 节点Hybroht
内容创作
Telegram富文本输出
将LLM输出转换为富文本Telegram消息——自动媒体处理和智能分块
If
Code
Limit
+6
19 节点Dmitry Mikheev
其他