212 lines
4.7 KiB
JSON
212 lines
4.7 KiB
JSON
{
|
|
"name": "Weekend Planner 2.0 (HITL)",
|
|
"nodes": [
|
|
{
|
|
"parameters": {
|
|
"rule": {
|
|
"interval": [
|
|
{
|
|
"field": "cronExpression",
|
|
"expression": "0 16 * * 5"
|
|
}
|
|
]
|
|
},
|
|
"timezone": "Australia/Perth"
|
|
},
|
|
"id": "cron",
|
|
"name": "Friday 4:00 PM AWST",
|
|
"type": "n8n-nodes-base.scheduleTrigger",
|
|
"typeVersion": 1.2,
|
|
"position": [
|
|
220,
|
|
280
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"httpMethod": "POST",
|
|
"path": "weekend-planner-2-run",
|
|
"responseMode": "onReceived",
|
|
"options": {}
|
|
},
|
|
"id": "webhook-run",
|
|
"name": "Webhook Execute (POST)",
|
|
"type": "n8n-nodes-base.webhook",
|
|
"typeVersion": 2,
|
|
"position": [
|
|
220,
|
|
430
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"assignments": {
|
|
"assignments": [
|
|
{
|
|
"name": "draftPrompt",
|
|
"type": "string",
|
|
"value": "Create a weekend plan draft for Anthony in Perth. Use: calendar items next 3 days, Perth weather, and practical recommendations. Output concise sections: Saturday, Sunday, Prep List, and one fun optional idea. Keep it useful and warm."
|
|
},
|
|
{
|
|
"name": "approvalHint",
|
|
"type": "string",
|
|
"value": "Reply APPROVE to send full plan, or REGEN to regenerate."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": "set",
|
|
"name": "Set Planner Prompt",
|
|
"type": "n8n-nodes-base.set",
|
|
"typeVersion": 3.4,
|
|
"position": [
|
|
450,
|
|
350
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"url": "http://openclaw.kangaroo-eel.ts.net:18789/api/wake",
|
|
"sendBody": true,
|
|
"contentType": "json",
|
|
"bodyParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "text",
|
|
"value": "={{$json.draftPrompt}}"
|
|
},
|
|
{
|
|
"name": "mode",
|
|
"value": "now"
|
|
}
|
|
]
|
|
},
|
|
"options": {
|
|
"timeout": 15000
|
|
}
|
|
},
|
|
"id": "wake-draft",
|
|
"name": "Generate Plan Draft",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
700,
|
|
350
|
|
],
|
|
"retryOnFail": true,
|
|
"maxTries": 3,
|
|
"waitBetweenTries": 2000
|
|
},
|
|
{
|
|
"parameters": {
|
|
"url": "http://runtipi.kangaroo-eel.ts.net:8129/message?token=AGoV3cAUyUMDbyt",
|
|
"sendBody": true,
|
|
"contentType": "json",
|
|
"bodyParameters": {
|
|
"parameters": [
|
|
{
|
|
"name": "title",
|
|
"value": "\ud83d\uddd3\ufe0f Weekend Planner Draft Ready"
|
|
},
|
|
{
|
|
"name": "message",
|
|
"value": "={{`Draft generated. ${$node['Set Planner Prompt'].json.approvalHint}`}}"
|
|
},
|
|
{
|
|
"name": "priority",
|
|
"value": "5"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"id": "gotify-draft",
|
|
"name": "ntfy Draft Ready",
|
|
"type": "n8n-nodes-base.httpRequest",
|
|
"typeVersion": 4.2,
|
|
"position": [
|
|
940,
|
|
350
|
|
]
|
|
},
|
|
{
|
|
"parameters": {
|
|
"chatId": "1793951355",
|
|
"text": "\ud83e\udd80 Weekend Planner draft is ready. Reply here with APPROVE to send final plan, or REGEN to regenerate."
|
|
},
|
|
"id": "telegram-review",
|
|
"name": "Telegram Review Prompt",
|
|
"type": "n8n-nodes-base.telegram",
|
|
"typeVersion": 1.2,
|
|
"position": [
|
|
1160,
|
|
350
|
|
],
|
|
"credentials": {
|
|
"telegramApi": {
|
|
"name": "Telegram account"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"connections": {
|
|
"Friday 4:00 PM AWST": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Set Planner Prompt",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Webhook Execute (POST)": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Set Planner Prompt",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Set Planner Prompt": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Generate Plan Draft",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"Generate Plan Draft": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "ntfy Draft Ready",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
},
|
|
"ntfy Draft Ready": {
|
|
"main": [
|
|
[
|
|
{
|
|
"node": "Telegram Review Prompt",
|
|
"type": "main",
|
|
"index": 0
|
|
}
|
|
]
|
|
]
|
|
}
|
|
},
|
|
"settings": {
|
|
"executionOrder": "v1"
|
|
},
|
|
"active": false
|
|
} |