diff --git a/deploy/n8n-morning-brief.json b/deploy/n8n-morning-brief.json index 489ff26..6022115 100644 --- a/deploy/n8n-morning-brief.json +++ b/deploy/n8n-morning-brief.json @@ -1,4 +1,5 @@ { + "id": "schoolMorningBrf", "name": "Compass / NHS — 6:00am morning brief", "nodes": [ { diff --git a/docs/phase-7a-n8n-schedule.md b/docs/phase-7a-n8n-schedule.md index f0dabfa..c56b68c 100644 --- a/docs/phase-7a-n8n-schedule.md +++ b/docs/phase-7a-n8n-schedule.md @@ -70,6 +70,16 @@ The script copies the JSON into the container with `docker exec -i … sh -c 'ca `update:workflow --active`), restarts n8n once so the 06:00 schedule registers, and prints `n8n list:workflow --active=true`. +The JSON carries a stable `id` (`schoolMorningBrf`). n8n 2.18.5 refuses an import +whose workflow has no `id` (`SQLITE_CONSTRAINT: NOT NULL constraint failed: +workflow_entity.id`), so the id is required, not cosmetic. Re-importing the same file +updates the same workflow instead of adding a second copy. + +`n8n publish:workflow` prints *"Changes will not take effect if n8n is running"*, which +is why the import script restarts n8n once. The full import → publish → active check +was rehearsed in a throwaway n8n container with a temporary data directory before this +plan was proposed; no shared instance was touched. + ## Verification ```bash