309 lines
8.4 KiB
JSON
309 lines
8.4 KiB
JSON
{
|
|
"name": "SRE Weekly Daily Scan",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"rule": {
|
|
"interval": [
|
|
{
|
|
"triggerAtHour": 6
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "n8n-nodes-base.scheduleTrigger",
|
|
"typeVersion": 1.4,
|
|
"position": [
|
|
-2256,
|
|
-208
|
|
],
|
|
"id": "52a6e628-8334-4122-9def-4a43ffd00799",
|
|
"name": "Schedule Trigger"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"conditions": {
|
|
"options": {
|
|
"caseSensitive": true,
|
|
"leftValue": "",
|
|
"typeValidation": "strict",
|
|
"version": 3
|
|
},
|
|
"conditions": [
|
|
{
|
|
"id": "ecab8c83-82e8-48e4-959c-699cf350a99e",
|
|
"leftValue": "={{ $json.stdout }}",
|
|
"rightValue": "NONE",
|
|
"operator": {
|
|
"type": "string",
|
|
"operation": "notEquals"
|
|
}
|
|
}
|
|
],
|
|
"combinator": "and"
|
|
},
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.if",
|
|
"typeVersion": 2.3,
|
|
"position": [
|
|
-1920,
|
|
-208
|
|
],
|
|
"id": "4d5b321a-afce-44a4-821a-654f57b1eb18",
|
|
"name": "If"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"command": "python3 /Users/weishen/.hermes/skills/custom/sreweekly-digest/scripts/sreweekly.py --check --dir /Users/weishen/Workspace/nexus/sreweekly/",
|
|
"cwd": "/Users/weishen/.hermes/skills/custom/sreweekly-digest"
|
|
},
|
|
"type": "n8n-nodes-base.ssh",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
-2096,
|
|
-208
|
|
],
|
|
"id": "ef32410e-0d7d-41ae-b6a4-fc43fd0d8a02",
|
|
"name": "扫描检查是否有最新SRE Weekly期刊",
|
|
"credentials": {
|
|
"sshPassword": {
|
|
"id": "MyXMNq72AJx65AUV",
|
|
"name": "macmini-ssh-password-account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"command": "python3 /Users/weishen/.hermes/skills/custom/sreweekly-digest/scripts/sreweekly.py --dir /Users/weishen/Workspace/nexus/sreweekly/",
|
|
"cwd": "/Users/weishen/.hermes/skills/custom/sreweekly-digest"
|
|
},
|
|
"type": "n8n-nodes-base.ssh",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
-1808,
|
|
-432
|
|
],
|
|
"id": "09315d13-27b6-47e5-b1ca-5f258a72535a",
|
|
"name": "新增期保存为 HTML 并登记 manifest",
|
|
"credentials": {
|
|
"sshPassword": {
|
|
"id": "MyXMNq72AJx65AUV",
|
|
"name": "macmini-ssh-password-account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"command": "=python3 /Users/weishen/.hermes/skills/custom/sreweekly-digest/scripts/sreweekly.py --extract {{ $('扫描检查是否有最新SRE Weekly期刊').item.json.stdout }}",
|
|
"cwd": "/Users/weishen/.hermes/skills/custom/sreweekly-digest"
|
|
},
|
|
"type": "n8n-nodes-base.ssh",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
-1616,
|
|
-432
|
|
],
|
|
"id": "2061bdf9-df92-491c-9fc3-7e1dda3a7acb",
|
|
"name": "提取SRE Weekly 期刊内容到Nexus/sreweekly目录",
|
|
"credentials": {
|
|
"sshPassword": {
|
|
"id": "MyXMNq72AJx65AUV",
|
|
"name": "macmini-ssh-password-account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"command": "=cat /Users/weishen/Workspace/nexus/sreweekly/html/{{ $('扫描检查是否有最新SRE Weekly期刊').item.json.stdout }}*.html "
|
|
},
|
|
"type": "n8n-nodes-base.ssh",
|
|
"typeVersion": 1,
|
|
"position": [
|
|
-1408,
|
|
-432
|
|
],
|
|
"id": "d144eadd-c771-4a75-ad52-cc4c99f284d6",
|
|
"name": "获取最新期刊HTML格式文章列表",
|
|
"credentials": {
|
|
"sshPassword": {
|
|
"id": "MyXMNq72AJx65AUV",
|
|
"name": "macmini-ssh-password-account"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://192.168.3.189:8642/v1/chat/completions",
|
|
"authentication": "genericCredentialType",
|
|
"genericAuthType": "httpBearerAuth",
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={\n \"model\": \"hermes-agent\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"请用baoyu-translate技能对以下目录里有正文的文章进行翻译。 目录:/Users/weishen/Workspace/nexus/sreweekly/markdown/。输出markdown文件放在相同目录下。如果文章没有正文则不用翻译。\"}\n ],\n \"stream\": false\n} ",
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.5,
|
|
"position": [
|
|
-1408,
|
|
-240
|
|
],
|
|
"id": "2431a701-4dcc-4ab7-a0f9-77733c7f535e",
|
|
"name": "用baoyu-translate技能翻译文章",
|
|
"credentials": {
|
|
"httpBearerAuth": {
|
|
"id": "GkmmyLXcesldpTDE",
|
|
"name": "macmini-hermes-default-api-key"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"method": "POST",
|
|
"url": "http://192.168.3.189:8642/v1/chat/completions",
|
|
"authentication": "genericCredentialType",
|
|
"genericAuthType": "httpBearerAuth",
|
|
"sendBody": true,
|
|
"specifyBody": "json",
|
|
"jsonBody": "={\n \"model\": \"hermes-agent\",\n \"messages\": [\n {\"role\": \"user\", \"content\": \"请用git-sync技能对/Users/weishen/Workspace/nexus目录做一次同步\"}\n ],\n \"stream\": false\n} ",
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.5,
|
|
"position": [
|
|
-1408,
|
|
-32
|
|
],
|
|
"id": "dde6923c-ef8a-4d09-9fbc-4b6d116fefad",
|
|
"name": "用git-sync技能同步nexus目录",
|
|
"credentials": {
|
|
"httpBearerAuth": {
|
|
"id": "GkmmyLXcesldpTDE",
|
|
"name": "macmini-hermes-default-api-key"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"parameters": {
|
|
"fromEmail": "star-agent@agentmail.to",
|
|
"toEmail": "billyshen@163.com",
|
|
"subject": "=SRE Weekly — {{ $('扫描检查是否有最新SRE Weekly期刊').item.json.stdout }}",
|
|
"html": "={{ $json.stdout }}",
|
|
"options": {}
|
|
},
|
|
"type": "n8n-nodes-base.emailSend",
|
|
"typeVersion": 2.1,
|
|
"position": [
|
|
-1216,
|
|
-432
|
|
],
|
|
"id": "031f43de-fb1b-456d-9dbc-bcab9aad4c26",
|
|
"name": "发送邮件1",
|
|
"webhookId": "bb874d98-90cc-4cb8-bb9d-349829807a3b",
|
|
"credentials": {
|
|
"smtp": {
|
|
"id": "ECOkUVEjqLwMGZaL",
|
|
"name": "agentmail-smtp-account"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"pinData": {},
|
|
"connections": {
|
|
"Schedule Trigger": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "扫描检查是否有最新SRE Weekly期刊",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"If": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "新增期保存为 HTML 并登记 manifest",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"扫描检查是否有最新SRE Weekly期刊": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "If",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"新增期保存为 HTML 并登记 manifest": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "提取SRE Weekly 期刊内容到Nexus/sreweekly目录",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"提取SRE Weekly 期刊内容到Nexus/sreweekly目录": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "获取最新期刊HTML格式文章列表",
|
|
"type": "main",
|
|
"index": 0
|
|
},
|
|
{
|
|
"node": "用baoyu-translate技能翻译文章",
|
|
"type": "main",
|
|
"index": 0
|
|
},
|
|
{
|
|
"node": "用git-sync技能同步nexus目录",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"获取最新期刊HTML格式文章列表": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "发送邮件1",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"用baoyu-translate技能翻译文章": {
|
|
"main": [
|
|
[]
|
|
]
|
|
}
|
|
},
|
|
"active": true,
|
|
"settings": {
|
|
"executionOrder": "v1",
|
|
"binaryMode": "separate"
|
|
},
|
|
"versionId": "fc838fa0-6e95-48fe-9109-f9c9508a0c1d",
|
|
"meta": {
|
|
"templateCredsSetupCompleted": true,
|
|
"instanceId": "0d85c1c8320c5fe7dfb1167fa257713dc13ee89925aa6b6c8e5825922abfa363"
|
|
},
|
|
"nodeGroups": [],
|
|
"id": "ZUoXhUWvYUL1Tgqg",
|
|
"tags": []
|
|
} |