分享两个n8n模板,可订阅GitHub Release和Trending

GitHub Release 订阅

订阅GitHub的项目,Release发布后会收到Slack通知。并且会使用大模型翻译成中文,整理好方便阅读的格式。

GitHub Release模板
{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        780,
        400
      ],
      "id": "597d4aa3-e56a-4831-a0a8-6414e6e56de3",
      "name": "Limit"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        40,
        255
      ],
      "id": "731ac3c8-9c24-4f73-aad1-f96f359cf0f7",
      "name": "Loop"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7cbf2c0f-f242-4106-95c3-684d1b0959b1",
              "name": "name",
              "value": "={{ $('Loop').item.json.name }}",
              "type": "string"
            },
            {
              "id": "cdd6bd5d-d4b8-4656-8b01-1521f870b3d9",
              "name": "title",
              "value": "={{ $('Limit').item.json.title }}",
              "type": "string"
            },
            {
              "id": "61164f4d-d97c-4588-a54a-81b230b2cf3b",
              "name": "link",
              "value": "={{ $('Limit').item.json.link }}",
              "type": "string"
            },
            {
              "id": "f1b1717b-4689-4356-8deb-f103a69af0e1",
              "name": "pubDate",
              "value": "={{ $('Limit').item.json.pubDate }}",
              "type": "string"
            },
            {
              "id": "ec9394a9-5adb-4a00-92ca-b4a52f742ac0",
              "name": "contentSnippet",
              "value": "={{ $('Limit').item.json.contentSnippet }}",
              "type": "string"
            },
            {
              "id": "678d9b68-f5a5-4968-a5dc-827c3dd0fcfb",
              "name": "id",
              "value": "={{ $('Limit').item.json.id }}",
              "type": "string"
            },
            {
              "id": "d57a1455-b5d6-4caa-870c-0a4fac317932",
              "name": "github",
              "value": "={{ $('Loop').item.json.github }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1680,
        560
      ],
      "id": "150d10c1-97ee-48b2-8d78-0bcce9776f7c",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 */30 9-23 * * *"
            }
          ]
        }
      },
      "id": "c65ab032-a35a-4a00-89ed-de897d45b62f",
      "name": "Cron Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -840,
        260
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    \"name\": \"n8n\",\n    \"github\": \"n8n-io/n8n\"\n  },\n  {\n    \"name\": \"Roo-Code\",\n    \"github\": \"RooVetGit/Roo-Code\"\n  },\n  {\n    \"name\": \"LobeChat\",\n    \"github\": \"lobehub/lobe-chat\"\n  },\n  {\n    \"name\": \"New API\",\n    \"github\": \"Calcium-Ion/new-api\"\n  },\n  {\n    \"name\": \"ChatWise\",\n    \"github\": \"egoist/chatwise-releases\"\n  },\n  {\n    \"name\": \"Folo\",\n    \"github\": \"RSSNext/Folo\"\n  },\n  {\n    \"name\": \"Cherry Studio\",\n    \"github\": \"CherryHQ/cherry-studio\"\n  }\n];"
      },
      "id": "ebe92d40-a4a3-49fa-ae49-c1d0b87fcc0d",
      "name": "GitHub Config",
      "type": "n8n-nodes-base.code",
      "position": [
        -400,
        260
      ],
      "typeVersion": 2,
      "notesInFlow": false
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "56f4a7f3-7823-4794-ad74-bac41ef85d83",
              "leftValue": "={{ $json.error }}",
              "rightValue": 0,
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        580,
        400
      ],
      "id": "4e659c3f-3fa4-42c8-aceb-9ea18dfcff0f",
      "name": "If No Error"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "ed896551-f486-4a1f-8585-8660f3a4a9bd",
              "leftValue": "={{ $json.cache }}",
              "rightValue": "={{ $('Limit').item.json.id }}",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1200,
        400
      ],
      "id": "f9ccdc63-06ae-47d0-8429-7a2b63d8c38a",
      "name": "If New"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1420,
        560
      ],
      "id": "caf31152-18f0-4bf7-b09c-f76ba05dec5b",
      "name": "Null"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C08ME7TDZ3J",
          "mode": "list",
          "cachedResultName": "github-release"
        },
        "text": "=:x: *`{{ $('Loop').item.json.name }}`* Error\n\n> {{ $json.error }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "mrkdwn": true,
          "unfurl_links": false,
          "sendAsUser": "Release Bot"
        }
      },
      "id": "1fe3264a-2db3-4d5c-b800-182e15a8a355",
      "name": "Send Error",
      "type": "n8n-nodes-base.slack",
      "position": [
        880,
        560
      ],
      "typeVersion": 2.2,
      "webhookId": "eaf921a6-4cc9-472f-bdf3-dd24db51c769",
      "credentials": {
        "slackApi": {
          "id": "NG6LWZ4Leh25N3VZ",
          "name": "波特科技"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "4fdc7d1e-68f6-45ea-af6e-59a1eddbf214",
              "leftValue": "={{ $json }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        220,
        240
      ],
      "id": "970c3556-abf9-402f-85bc-b80da949ce0b",
      "name": "If Not Empty"
    },
    {
      "parameters": {
        "operation": "formatDate",
        "date": "={{ $('Loop').item.json.pubDate }}",
        "format": "custom",
        "customFormat": "yyyy-MM-dd HH:mm",
        "options": {
          "timezone": true
        }
      },
      "type": "n8n-nodes-base.dateTime",
      "typeVersion": 2,
      "position": [
        780,
        240
      ],
      "id": "0425dbee-461f-4fdb-a9d2-4f78beb61826",
      "name": "Date Format"
    },
    {
      "parameters": {
        "text": "={{ $json.contentSnippet }}",
        "schemaType": "fromJson",
        "jsonSchemaExample": "{\n  \"features\": [\n    \"新增首页功能,默认启动页面改为首页\",\n    \"新增 DNS 覆写功能,默认启用 DNS 覆写\"\n  ],\n  \"fixes\": [\n    \"修复弹黑框的问题\",\n    \"修复系统代理地址错误的问题\"\n  ],\n  \"others\": [\n    \"重构后端,巨幅性能优化\",\n    \"优化定时器管理\"\n  ]\n}",
        "options": {
          "systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value.\n\nYou need to analyze GitHub Release:\n\n1. Parse input content and identify all change items\n2. Filter out:\n   - Contributor handles (@username)\n   - Version numbers\n   - Appreciation/congratulatory statements\n3. Categorize into:\n   - features: New functionalities\n   - fixes: Bug fixes\n   - others: Documentation, configurations, etc.\n4. Language conversion:\n   - Translate English descriptions to Chinese\n   - Technical terms can remain in English but must use Chinese syntax\n5. Maintain original meaning with necessary simplification:\n   - Remove redundancies\n   - Merge similar entries\n   - Simplify technical jargon\n\nProhibited elements:\n1. Explanatory text\n2. Markdown formatting\n3. Uncategorized content\n4. Untranslated English items\n5. Empty category headers"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        440,
        240
      ],
      "id": "a06e7050-1f84-4083-9cd3-a6c4f2dd25f3",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C08ME7TDZ3J",
          "mode": "id"
        },
        "messageType": "block",
        "blocksUi": "={{ $json }}",
        "text": "=Release - {{ $('If Not Empty').item.json.name }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "mrkdwn": true,
          "unfurl_links": false,
          "sendAsUser": "GitHub Release"
        }
      },
      "id": "42ed9553-ed63-4554-b0c5-8b4d9a1e9ae9",
      "name": "Send Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1200,
        240
      ],
      "typeVersion": 2.2,
      "webhookId": "eaf921a6-4cc9-472f-bdf3-dd24db51c769",
      "credentials": {
        "slackApi": {
          "id": "NG6LWZ4Leh25N3VZ",
          "name": "波特科技"
        }
      }
    },
    {
      "parameters": {
        "content": "## GitHub Releases Config\n- Edit the JavaScript array within this node's code area.\n- Modify or add the repositories you want to follow. Each repository object needs a `name` (custom display name) and `github` (format: `owner/repo`).\n- Example:\n   ```javascript\n   {\n    \"name\": \"n8n\", // Custom display name\n    \"github\": \"n8n-io/n8n\" // GitHub path\n   },\n   {\n    \"name\": \"LobeChat\",\n    \"github\": \"lobehub/lobe-chat\"\n   }\n   // ... add more repositories\n   ```",
        "height": 540,
        "width": 420
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -140
      ],
      "typeVersion": 1,
      "id": "b3979529-5445-4d44-bd9e-69079b222b8d",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Cron Trigger\nAdjust the `Rule` setting to change the update check frequency (default is `0 */10 9-23 * * *`, checking every 10 minutes between 9 AM and 11 PM daily).",
        "height": 340,
        "width": 260
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -900,
        80
      ],
      "typeVersion": 1,
      "id": "ed1b69c4-cb95-424a-85e8-7de827b20e22",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Gemini (AI Model)\n- Select your configured Google Gemini credentials.\n- (Optional) Replace with a different supported AI model node and select its credentials.\n## Information Extractor \nAI Processing & Translation\n- **Main Configuration**: Review the `System Prompt`. By default, it asks the AI to extract information and translate it into **Chinese**. Modify this prompt if you need a different language or summary style.",
        "height": 580,
        "width": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        -220
      ],
      "typeVersion": 1,
      "id": "0ff16ac1-755d-4a83-a631-e6a8df4d14a6",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Send Message\nSlack Notifications\n- Select your configured Slack credentials in both Slack nodes.\n- Set the target `Channel ID` for notifications.",
        "height": 380
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        -20
      ],
      "typeVersion": 1,
      "id": "6a985f02-105c-4f6e-a924-2289538dfdc0",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Send Error\n- Select your configured Slack credentials in both Slack nodes.\n- Set the target `Channel ID` for notifications.",
        "height": 340
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        820,
        540
      ],
      "typeVersion": 1,
      "id": "80300633-feba-4f12-9ee6-2abba300a153",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "content": "## Prerequisites\n\n* **Redis**: Have an available Redis service and configure its credentials in n8n.\n* **AI Provider (Gemini)**: Configure credentials for Google Gemini (or your chosen AI model) in n8n.\n* **Slack**: Configure your Slack app credentials in n8n.\n\n## Slack Permissions Config\n- In the `Bot Token Scopes` section of the `OAuth & Permissions` menu, add the following permissions:\n   - `chat:write`\n   - `chat:write.customize`\n- Perform the `Install` (or Reinstall) operation in the `Install App` menu.\n- Obtain the `Bot User OAuth Token` and configure it in the credentials of n8n.",
        "height": 900,
        "width": 460
      },
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        -220
      ],
      "typeVersion": 1,
      "id": "9f671e1d-0b72-4e2c-ae80-f65a5aa56c1d",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "operation": "set",
        "key": "=github_release:{{ $('If Not Empty').item.json.github }}",
        "value": "={{ $('If Not Empty').item.json.id }}",
        "keyType": "string"
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        1440,
        240
      ],
      "id": "1b4274ec-0364-4c8d-b040-8882e48ab192",
      "name": "Redis Set Id",
      "credentials": {
        "redis": {
          "id": "qrUBdRWlD3Zuri46",
          "name": "Redis account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "function generateRichTextBlock(title, items) {\n  return {\n    type: \"rich_text\",\n    elements: [\n      {\n        type: \"rich_text_section\",\n        elements: [{ type: \"text\", text: `${title}:` }]\n      },\n      {\n        type: \"rich_text_list\",\n        style: \"bullet\",\n        indent: 0,\n        border: 0,\n        elements: items.map(item => ({\n          type: \"rich_text_section\",\n          elements: [{ type: \"text\", text: item }]\n        }))\n      }\n    ]\n  };\n}\n\nfunction generateRichText(value, metadata) {\n  if (!value || typeof value !== 'object') return [];\n\n  const { name, link, title, formattedDate } = metadata;\n  \n  const baseBlocks = [\n    {\n      type: \"header\",\n      text: {\n        type: \"plain_text\",\n        text: name\n      }\n    },\n    {\n      type: \"context\",\n      elements: [{\n        text: `${formattedDate}  |  <${link}|${title}>`,\n        type: \"mrkdwn\"\n      }]\n    },\n    { type: \"divider\" }\n  ];\n\n  const sections = [\n    { key: \"features\", title: \"Features\" },\n    { key: \"fixes\", title: \"Fixes\" },\n    { key: \"others\", title: \"Others\" }\n  ];\n\n  const contentBlocks = sections\n    .filter(({ key }) => Array.isArray(value[key]) && value[key].length > 0)\n    .map(({ key, title }) => generateRichTextBlock(title, value[key]));\n\n  return {\n    blocks: [...baseBlocks, ...contentBlocks]\n  };\n}\n\nfunction processAllItems(infoExtractor, ifNotEmpty, dateFormat) {\n  return infoExtractor.all().map((item, index) => {\n    const metadata = {\n      name: ifNotEmpty.all()[index].json.name,\n      link: ifNotEmpty.all()[index].json.link,\n      title: ifNotEmpty.all()[index].json.title,\n      formattedDate: dateFormat.all()[index].json.formattedDate\n    };\n    return generateRichText(item.json.output, metadata);\n  });\n}\n\nreturn processAllItems(\n  $('Information Extractor'),\n  $('If Not Empty'), \n  $('Date Format')\n);"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        980,
        240
      ],
      "id": "3a809420-5bee-4976-a57e-ca161677de76",
      "name": "Code for Slack Tpl"
    },
    {
      "parameters": {
        "url": "=https://github.com/{{ $json.github }}/releases.atom ",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        400,
        400
      ],
      "id": "d11a10fc-c68b-4e2b-a00e-5d63ec38abf6",
      "name": "RSS for Release",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "operation": "get",
        "propertyName": "cache",
        "key": "=github_release:{{ $('Loop').item.json.github }}",
        "keyType": "string",
        "options": {
          "dotNotation": false
        }
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        980,
        400
      ],
      "id": "e9691400-a3de-4267-93d8-f99469399e21",
      "name": "Redis Get",
      "credentials": {
        "redis": {
          "id": "qrUBdRWlD3Zuri46",
          "name": "Redis account"
        }
      }
    },
    {
      "parameters": {
        "amount": 10
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        220,
        400
      ],
      "id": "c1f5fe11-1e41-48f8-8687-a8208bd29bbb",
      "name": "Wait",
      "webhookId": "d9aba8de-9d47-43df-bc32-8593931f0211",
      "disabled": true
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "grok-3",
          "mode": "list",
          "cachedResultName": "grok-3"
        },
        "options": {
          "temperature": 0.3
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        440,
        100
      ],
      "id": "f112ad06-db19-4b3e-8ba2-e57b4193096b",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "S2diGgt5Q6ggiO47",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "connections": {
    "Limit": {
      "main": [
        [
          {
            "node": "Redis Get",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [
          {
            "node": "If Not Empty",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cron Trigger": {
      "main": [
        [
          {
            "node": "GitHub Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitHub Config": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If No Error": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error",
            "type": "main",
            "index": 0
          },
          {
            "node": "Null",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If New": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Null",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Null": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Not Empty": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date Format": {
      "main": [
        [
          {
            "node": "Code for Slack Tpl",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Date Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Message": {
      "main": [
        [
          {
            "node": "Redis Set Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis Set Id": {
      "main": [
        []
      ]
    },
    "Code for Slack Tpl": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS for Release": {
      "main": [
        [
          {
            "node": "If No Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis Get": {
      "main": [
        [
          {
            "node": "If New",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "RSS for Release",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f047839feca8ac8518cd22514bc718f9790615975a10271981c34822b5cd9b5b"
  }
}

使用方法:
新建n8n项目,复制json到你的项目里面(直接空白地方ctrl+v即可)。
模板里面有详细的备注表情说明,可以修改配置改为你需要订阅的仓库。目前我用的通知渠道是slack,有精力的佬自行修改为想要的通知渠道。

GitHub Trending

热门项目,日|月|周榜,有新项目进入榜单会通知。(Redis记录状态)

GitHub Trending模板
{
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 */30 9-23 * * *"
            }
          ]
        }
      },
      "id": "23aa6ef7-299d-4baa-a5cc-9aec382ad0e0",
      "name": "Cron Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        300,
        640
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "jsCode": "return [\n  {\n    \"name\": \"GitHub日榜\",\n    \"route\": \"/daily/any\"\n  },\n  {\n    \"name\": \"GitHub周榜\",\n    \"route\": \"/weekly/any\"\n  },\n  {\n    \"name\": \"GitHub月榜\",\n    \"route\": \"/monthly/any\"\n  },\n  {\n    \"name\": \"GitHub中文榜\",\n    \"route\": \"/monthly/any/zh\"\n  }\n];"
      },
      "id": "a864a364-b962-4471-8bac-3a6d07f380c0",
      "name": "Topic Config",
      "type": "n8n-nodes-base.code",
      "position": [
        520,
        640
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "url": "=https://rsshub.app/github/trending{{ $('Loop').item.json.route }}",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        1540,
        780
      ],
      "id": "872dd24c-458a-4378-8b26-c5fd5a63fea4",
      "name": "RSS Read",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "56f4a7f3-7823-4794-ad74-bac41ef85d83",
              "leftValue": "={{ $json.error }}",
              "rightValue": 0,
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1840,
        780
      ],
      "id": "90a17e97-c988-4082-b6f3-b7a06283ede2",
      "name": "If No Error"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C08LUK0M7HT",
          "mode": "list",
          "cachedResultName": "gihub-trending"
        },
        "text": "=:x: *`{{ $('Loop').item.json.name }}`* Error\n\n> {{ $json.error }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "mrkdwn": "={{ true }}",
          "unfurl_links": false,
          "sendAsUser": "Release Bot"
        }
      },
      "id": "7074b0c6-0782-41f0-ba68-cc01070e2088",
      "name": "Send Error",
      "type": "n8n-nodes-base.slack",
      "position": [
        2040,
        1000
      ],
      "typeVersion": 2.2,
      "webhookId": "eaf921a6-4cc9-472f-bdf3-dd24db51c769",
      "credentials": {
        "slackApi": {
          "id": "NG6LWZ4Leh25N3VZ",
          "name": "波特科技"
        }
      }
    },
    {
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        780,
        640
      ],
      "id": "9fd24165-2285-4b80-8e5d-a39123025fcb",
      "name": "Loop"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2260,
        1000
      ],
      "id": "94c06104-1bf6-4aab-9352-96219ab9f29c",
      "name": "Null"
    },
    {
      "parameters": {
        "operation": "get",
        "propertyName": "cache",
        "key": "=rsshub_github:{{ $('Loop').item.json.route }}",
        "keyType": "list",
        "options": {}
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        1020,
        780
      ],
      "id": "c47f978f-9f72-40df-a7a3-39a5d674f087",
      "name": "Redis",
      "credentials": {
        "redis": {
          "id": "qrUBdRWlD3Zuri46",
          "name": "Redis account"
        }
      }
    },
    {
      "parameters": {
        "operation": "push",
        "list": "=rsshub_github:{{ $('If Not Empty').item.json.route }}",
        "messageData": "={{ $('If Not Empty').item.json.guid }}"
      },
      "type": "n8n-nodes-base.redis",
      "typeVersion": 1,
      "position": [
        2040,
        620
      ],
      "id": "d42cee43-98d9-45bf-89bd-1aea38f968b2",
      "name": "Redis1",
      "credentials": {
        "redis": {
          "id": "qrUBdRWlD3Zuri46",
          "name": "Redis account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const cacheList = $('Redis').first().json.cache || [];\nreturn $input.all()\n  .filter(item => !cacheList.includes(item.json.guid))\n  .map(item => {\n    item.json.topic = $('Loop').first().json.name;\n    item.json.route = $('Loop').first().json.route;\n    return item;\n  });"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2040,
        780
      ],
      "id": "7474beff-92b3-48a4-9c2e-1bbb41b89251",
      "name": "Filter New",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "4fdc7d1e-68f6-45ea-af6e-59a1eddbf214",
              "leftValue": "={{ $json }}",
              "rightValue": "",
              "operator": {
                "type": "object",
                "operation": "notEmpty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1240,
        620
      ],
      "id": "5a0655c5-89e0-439a-967a-ae98f360a3ae",
      "name": "If Not Empty"
    },
    {
      "parameters": {
        "text": "={{ $json.contentSnippet }}",
        "attributes": {
          "attributes": [
            {
              "name": "language",
              "description": "Programming Language",
              "required": true
            },
            {
              "name": "stars",
              "type": "number",
              "description": "GitHub stars",
              "required": true
            },
            {
              "name": "forks",
              "type": "number",
              "description": "GitHub forks",
              "required": true
            },
            {
              "name": "description",
              "description": "Chinese description",
              "required": true
            }
          ]
        },
        "options": {
          "systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value.\nIf the value of description is not in Chinese, it needs to be translated into Chinese."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        1440,
        620
      ],
      "id": "113fc220-9e82-4877-baec-ebb1b48328b1",
      "name": "Information Extractor"
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "C08LUK0M7HT",
          "mode": "list",
          "cachedResultName": "gihub-trending"
        },
        "messageType": "block",
        "blocksUi": "={\n    \"blocks\": [\n        {\n            \"type\": \"header\",\n            \"text\": {\n                \"type\": \"plain_text\",\n                \"text\": \"{{ $('If Not Empty').item.json.title }}\"\n            }\n        },\n        {\n            \"type\": \"section\",\n            \"text\": {\n                \"type\": \"plain_text\",\n                \"text\": \"{{ $json.output.description || '-' }}\"\n            }\n        },\n        {\n            \"type\": \"divider\"\n        },\n        {\n            \"type\": \"section\",\n            \"text\": {\n                \"type\": \"mrkdwn\",\n                \"text\": \"`stars: {{ $json.output.stars }}`    `forks: {{ $json.output.forks }}`    `language: {{ $json.output.language }}`\"\n            },\n            \"accessory\": {\n                \"type\": \"button\",\n                \"text\": {\n                    \"type\": \"plain_text\",\n                    \"text\": \":link:\",\n                    \"emoji\": true\n                },\n                \"url\": \"{{ $('If Not Empty').item.json.link }}\"\n            }\n        }\n    ]\n}",
        "text": "={{ $('If Not Empty').item.json.topic }} - {{ $('If Not Empty').item.json.title }}",
        "otherOptions": {
          "includeLinkToWorkflow": false,
          "mrkdwn": true,
          "unfurl_links": false,
          "sendAsUser": "={{ $('If Not Empty').item.json.topic }}"
        }
      },
      "id": "425a8a15-419d-46db-a703-5ce8f9b1db6a",
      "name": "Send Message",
      "type": "n8n-nodes-base.slack",
      "position": [
        1820,
        620
      ],
      "typeVersion": 2.2,
      "webhookId": "eaf921a6-4cc9-472f-bdf3-dd24db51c769",
      "credentials": {
        "slackApi": {
          "id": "NG6LWZ4Leh25N3VZ",
          "name": "波特科技"
        }
      }
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "grok-3",
          "mode": "list",
          "cachedResultName": "grok-3"
        },
        "options": {
          "temperature": 0.3
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1440,
        480
      ],
      "id": "84703fbf-bb26-4c7d-aa90-3ed98ecf48ac",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "S2diGgt5Q6ggiO47",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "amount": 20
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1240,
        780
      ],
      "id": "9424f76a-cafa-46c8-a52d-3825218ccb80",
      "name": "Wait",
      "webhookId": "8f34e95e-3db5-45e5-96ea-ec2f85bea1c8"
    }
  ],
  "connections": {
    "Cron Trigger": {
      "main": [
        [
          {
            "node": "Topic Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Topic Config": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Read": {
      "main": [
        [
          {
            "node": "If No Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If No Error": {
      "main": [
        [
          {
            "node": "Filter New",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Error",
            "type": "main",
            "index": 0
          },
          {
            "node": "Null",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [
          {
            "node": "If Not Empty",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Redis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Null": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter New": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Not Empty": {
      "main": [
        [
          {
            "node": "Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Information Extractor": {
      "main": [
        [
          {
            "node": "Send Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Message": {
      "main": [
        [
          {
            "node": "Redis1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "RSS Read",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f047839feca8ac8518cd22514bc718f9790615975a10271981c34822b5cd9b5b"
  }
}

使用方法:
和上面一样,只是特殊的是这个项目需要有RSSHub节点。模板里面是用的rsshub官方节点,但是容易有429问题。
我自己是使用的私有部署的RSSHub节点。佬们有条件也整一个。
如果要改rsshub节点,就直接修改RSS Read节点里面地址就行,并且使用质量高的节点,前面的wait节点也可以把阻塞时间设置短一点,或者删除。

22 个赞

感谢佬友分享:folded_hands:

赞一个,很有启发

感谢大佬!

1 个赞

感谢佬分享

rss节点,能想http请求那样,独立设置代理么?

搞定了,感谢

1 个赞

感谢,我去试一下

感谢t佬分享

1 个赞

好东西呀~

感谢佬友分享

感谢佬,收藏