Files
compass_teams_nhs/deploy/n8n-morning-brief.json
Sam Rolfe 75e4ff12bf Phase 7a: stable workflow id for the n8n import (AUD-115)
n8n 2.18.5 rejects an import whose workflow JSON has no `id`
(SQLITE_CONSTRAINT: NOT NULL constraint failed: workflow_entity.id). Give the
workflow a fixed id and record that the import -> publish -> active flow was
rehearsed in a throwaway n8n container before asking for approval.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-10-15 19:53:43 +11:00

67 lines
2.0 KiB
JSON

{
"id": "schoolMorningBrf",
"name": "Compass / NHS — 6:00am morning brief",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 6 * * *"
}
]
}
},
"id": "c1a0a0a0-0000-4000-8000-000000000001",
"name": "6:00am every day",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.3,
"position": [200, 300]
},
{
"parameters": {
"executeOnce": true,
"command": "ssh -i /home/node/.ssh/id_ed25519_school_scan -o IdentitiesOnly=yes -o BatchMode=yes -o UserKnownHostsFile=/home/node/.ssh/known_hosts -o StrictHostKeyChecking=yes sam@192.168.20.13 'cd /home/sam/paseo/projects/compass_teams_nhs && ./scripts/morning-brief.sh'"
},
"id": "c1a0a0a0-0000-4000-8000-000000000002",
"name": "Scan both children and send the briefs",
"type": "n8n-nodes-base.executeCommand",
"typeVersion": 1,
"position": [480, 300],
"notes": "One bounded host command. The scan needs node + patchright on .13, so it runs outside this container. scripts/morning-brief.sh scans both children, builds the per-boy and combined briefs and sends them through Apprise, then exits non-zero if the scan or a send fails, so this execution goes red (FR-12). The key is restricted in authorized_keys to exactly this command."
}
],
"connections": {
"6:00am every day": {
"main": [
[
{
"node": "Scan both children and send the briefs",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"timezone": "Australia/Melbourne",
"saveManualExecutions": true,
"callerPolicy": "workflowsFromSameOwner"
},
"staticData": null,
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "compass-teams-nhs"
},
"pinData": {},
"tags": [
{
"name": "school"
}
],
"active": false
}