Files
n8n/5.新闻.md
2025-09-01 23:48:02 +08:00

181 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"nodes": [
{
"parameters": {
"model": {
"__rl": true,
"value": "qwen-plus",
"mode": "list",
"cachedResultName": "qwen-plus"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
96,
80
],
"id": "a1e4191b-b11b-460f-b05e-7161ffc71cd7",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "rg9eI0cqMkaxv3AK",
"name": "江oneapi"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=# AI Agent 提示词模板\n\"将以下新闻翻译为中文,保留原文链接,按格式输出:\n【标题】...\n【摘要】...\n【原文链接】...\"\n{{ $json.articles[0].title }}\n{{ $json.articles[0].description }}\n{{ $json.articles[0].url }}\n\n",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.2,
"position": [
112,
-128
],
"id": "92219cde-6705-4aee-81d9-4fba36983460",
"name": "AI Agent"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "bd4c88ff-7fc0-4a95-a2f4-1dce3b10b6a4",
"name": "articles",
"value": "={{ $json.articles }}",
"type": "string"
},
{
"id": "3849e755-1915-4dbe-914a-6c4db0e4af13",
"name": "articles[0].title",
"value": "={{ $json.articles[0].title }}",
"type": "string"
},
{
"id": "6d582dcb-6dba-4ab8-bb08-84d7c3e73984",
"name": "articles[0].id",
"value": "={{ $json.articles[0].id }}",
"type": "string"
},
{
"id": "5d1f776a-aff6-4ca0-9580-6e61357440b2",
"name": "articles[0].description",
"value": "={{ $json.articles[0].description }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
32,
-336
],
"id": "6b5b970e-2958-48de-b0b7-bd435e92638f",
"name": "Edit Fields"
},
{
"parameters": {
"url": "https://gnews.io/api/v4/search?q=ai&lang=en&apikey=d85e61621b37e244fdb78a7e9ff72eb4",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-192,
-128
],
"id": "2f0222a8-f69f-4978-83b7-0a1324ef05c1",
"name": "HTTP Request"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-400,
-128
],
"id": "a3c655e3-6923-4dc8-a7ef-f7433beb28d9",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"operation": "html",
"binaryPropertyName": "=data {{ $json.output }}",
"options": {}
},
"type": "n8n-nodes-base.convertToFile",
"typeVersion": 1.1,
"position": [
416,
-128
],
"id": "39c77f86-ea1f-4357-8d74-66667ac42a42",
"name": "Convert to File"
}
],
"connections": {
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Convert to File",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[]
]
},
"HTTP Request": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"When clicking Execute workflow": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "d4bc54c4750443ddb7fb9e6b4c7e38c46f3d96e6d4cbfdf57a74efbc3218b7c8"
}
}