{
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "triggerAtMinute": 3
            }
          ]
        }
      },
      "id": "ee53ecaf-abe3-460f-98bd-07d9c946314c",
      "name": "Cron Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1136,
        608
      ],
      "typeVersion": 1.2
    },
    {
      "parameters": {
        "jsCode": "// return $input.all()\n\n// \u83b7\u53d6\u6240\u6709\u7f13\u5b58\u5217\u8868\nlet cacheList = $input.all();\n\nlet unReadRssList = $('RsshubGet').all()\n// \u6253\u5370\u9700\u8981\u5728\u6d4f\u89c8\u5668console\u67e5\u770b\nconsole.log('cacheList:', cacheList) \nconsole.log('unReadRssList:', unReadRssList)\n// return \u5fc5\u987b\u662f\u4e00\u4e2a\u5e26\u5bf9\u8c61\u7684json,\u4e0d\u80fd\u662fstring[]\nlet resultList = unReadRssList\n  .filter(item => {\n    console.log(\"item: \", item.json.title)\n    return !cacheList.some(cacheItem => cacheItem.json.title === item.json.title)\n  })\n// resultList.push({json: {\"title\": 'test2'}})\nreturn resultList\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -448,
        608
      ],
      "id": "aead5a51-52b4-4c9d-975d-9563f41d94e3",
      "name": "FilterNew",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "url": "=https://rsshub.xxx.com/epicgames/freegames/en-US/US",
        "options": {
          "ignoreSSL": false
        }
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.1,
      "position": [
        -880,
        608
      ],
      "id": "ea73f8de-b877-4810-b9d6-c956d76b5528",
      "name": "RsshubGet",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "jsCode": "console.log('AI output\uff1a', $input.all())\n// \u79fb\u9664\u5916\u5c42output\nlet result = $input.all().map(item => {\n  return item.json.output\n})\n\nreturn result"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        400,
        592
      ],
      "id": "563b3430-32fc-4d6a-9b63-399dcaf330d6",
      "name": "FormatAIOutput",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "jsCode": "// return $input.all().splice(0, 3).filter(item => Boolean(item.json.link))\nreturn $input.all().filter(item => Boolean(item.json.title))"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -160,
        608
      ],
      "id": "66e53850-0eb1-4a83-9aad-ce0304c979aa",
      "name": "FilterNullObject",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://pusher.xxx.com/webhook/xxx",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "content",
              "value": "=\ud83c\udfc6  Epic \u559c\u52a0\u4e00\n\ud83d\udd79\ufe0f  {{ $json.title_en }}\n\ud83d\udcdd  {{ $json.description }}  \n\ud83c\udf10  {{ $json.link }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        688,
        672
      ],
      "id": "32a8770f-2f61-4323-8615-082504d23cf7",
      "name": "\u63a8\u9001\u5230TG"
    },
    {
      "parameters": {
        "operation": "get",
        "dataTableId": {
          "__rl": true,
          "value": "vmMVnyry917iahnF",
          "mode": "list",
          "cachedResultName": "epic",
          "cachedResultUrl": "/projects/67mC9JYeQ8KrO6ni/datatables/vmMVnyry917iahnF"
        },
        "filters": {
          "conditions": [
            {
              "keyName": "title",
              "keyValue": "={{ $json.title }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1,
      "position": [
        -656,
        608
      ],
      "id": "24d8beff-b1d8-4df5-864f-758452e7e3a0",
      "name": "Get row(s)",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "dataTableId": {
          "__rl": true,
          "value": "vmMVnyry917iahnF",
          "mode": "list",
          "cachedResultName": "epic",
          "cachedResultUrl": "/projects/67mC9JYeQ8KrO6ni/datatables/vmMVnyry917iahnF"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "title": "={{ $json.title_en }}"
          },
          "matchingColumns": [
            "repo_title"
          ],
          "schema": [
            {
              "id": "type",
              "displayName": "type",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "title",
              "displayName": "title",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1,
      "position": [
        672,
        464
      ],
      "id": "12e65a26-3cde-404d-8164-38ad8810a253",
      "name": "Insert row"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "git-gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "git-gpt-4o-mini"
        },
        "options": {
          "temperature": 0.5
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        112,
        704
      ],
      "id": "67b295c8-dd6b-4459-8de2-573c9f8dc040",
      "name": "AI Model",
      "notesInFlow": false,
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "text": "=title: {{ $json.title }} \ntitle_en: {{ $json.title }} \nauthor: {{ $json.author }}\nlink: {{ $json.link }}\ndesc: {{ $json.contentSnippet }}",
        "attributes": {
          "attributes": [
            {
              "name": "description",
              "description": "Chinese description",
              "required": true
            },
            {
              "name": "=link",
              "description": "=link",
              "required": true
            },
            {
              "name": "title",
              "description": "=title",
              "required": true
            },
            {
              "name": "title_en",
              "description": "title_en",
              "required": true
            },
            {
              "name": "deadline",
              "description": "deadline",
              "required": true
            }
          ]
        },
        "options": {
          "systemPromptTemplate": "\u60a8\u662f\u4e00\u4f4d\u6587\u672c\u4fe1\u606f\u63d0\u53d6\u4e13\u5bb6\u3002\u8bf7\u6839\u636e\u4ee5\u4e0b\u8981\u6c42\uff0c\u4ece\u6587\u672c\u4e2d\u63d0\u53d6\u548c\u603b\u7ed3\u6709\u7528\u7684\u4fe1\u606f\uff1a\n\n1. \u63d0\u53d6\u6587\u672c\u4e2d\u51fa\u73b0\u7684\u91cd\u8981\u5c5e\u6027\uff08\u5982\u9879\u76ee\u540d\u79f0\u3001\u4e3b\u8981\u5185\u5bb9\u3001\u6d89\u53ca\u7684\u6280\u672f\u6216\u6a21\u578b\u3001\u4f7f\u7528\u7684\u7f16\u7a0b\u8bed\u8a00\uff09\u3002\n2. \u5982\u679c\u6587\u672c\u4e3a\u975e\u4e2d\u6587\uff0c\u8bf7\u5148\u7ffb\u8bd1\u6210\u4e2d\u6587\u518d\u8fdb\u884c\u603b\u7ed3\u3002\n3. \u7528\u7b80\u660e\u7684\u4e2d\u6587\u81ea\u7136\u8bed\u8a00\uff0c\u5c06\u8fd9\u4e9b\u5173\u952e\u4fe1\u606f\u52a0\u4e0e\u81ea\u7136\u63cf\u8ff0\u3002\u5982\u679c\u67d0\u4e9b\u5c5e\u6027\u65e0\u6cd5\u5224\u65ad\u6216\u4e0d\u660e\u786e\uff0c\u53ef\u4ee5\u4fdd\u6301\u539f\u6587\u63cf\u8ff0\u6216\u76f4\u63a5\u8bf4\u660e\u3002\u5bf9\u4e8e\u67d0\u4e9btitle\uff0c\u4e0d\u9700\u8981\u7ffb\u8bd1\uff0c\u4f8b\u5982\u6e38\u620f\u540d\u79f0\u3002\n4. \u4e0d\u8981\u7528\u8fd9\u662f\uff0c\u8fd9\u4e2a\u7b49\u5f00\u5934\uff0c\u5c3d\u91cf\u81ea\u7136\u8bed\u8a00\u63cf\u8ff0\u3002\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "typeVersion": 1,
      "position": [
        48,
        480
      ],
      "id": "ca1e13c1-f15d-48ec-8dda-5c97c89f9df3",
      "name": "AI-Analysis",
      "retryOnFail": true,
      "waitBetweenTries": 5000,
      "notesInFlow": false,
      "alwaysOutputData": true,
      "executeOnce": false,
      "maxTries": 5,
      "onError": "continueRegularOutput"
    }
  ],
  "connections": {
    "Cron Trigger": {
      "main": [
        [
          {
            "node": "RsshubGet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FilterNew": {
      "main": [
        [
          {
            "node": "FilterNullObject",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RsshubGet": {
      "main": [
        [
          {
            "node": "Get row(s)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FormatAIOutput": {
      "main": [
        [
          {
            "node": "Insert row",
            "type": "main",
            "index": 0
          },
          {
            "node": "\u63a8\u9001\u5230TG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FilterNullObject": {
      "main": [
        [
          {
            "node": "AI-Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s)": {
      "main": [
        [
          {
            "node": "FilterNew",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI-Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI-Analysis": {
      "main": [
        [
          {
            "node": "FormatAIOutput",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}