make verify-n8n / deploy/verify-n8n-scheduled-run.sh checks the workflow is
active, reads the newest scheduled (mode=trigger) execution from the n8n
database, and prints the notify rows. Exit 1 until a scheduled run exists and
is green, so it distinguishes 'not yet' from 'failed'. Never runs the workflow
and never sends. Document the first-run time and the re-armed monitor.
Imported the SSH credential and schoolMorningBrf, published it, restarted
n8n once, and confirmed the activation log line (no Unrecognized node type).
A hand run through the published workflow finished green and delivered 8/8
(Harry, Finn, combined Jo + Sam). Record the evidence and the
N8N_RUNNERS_BROKER_PORT workaround for 'n8n execute'.
n8n 2.x disables n8n-nodes-base.executeCommand by default (nodes.exclude), so the
first workflow shape could not activate: 'Unrecognized node type'. Replace the
Execute Command node with the SSH node, which is enabled, and keep the restricted
trigger key: the server forced command runs exactly scripts/morning-brief.sh.
- deploy/n8n-morning-brief.json: schedule + optional manual trigger -> SSH node
-> Code check that makes a non-zero exit red (FR-12).
- deploy/import-n8n-morning-brief.sh: builds the sshPrivateKey credential from the
key (id schoolScanKey, mode-0600 temp, removed after import), imports, publishes,
restarts once, and confirms activation in the n8n log.
- scripts/morning-brief.sh: default IMAGE 0.6.1-phase8 so the scheduled job uses
the deployed image.
- docs/phase-7a-n8n-schedule.md, deploy/DEPLOYMENT.md: document the design and the
throwaway-n8n rehearsal (activation + success + failure path).
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>
The 06:00 workflow is now one schedule-trigger -> Execute Command pair that
runs scripts/morning-brief.sh on the host over a restricted SSH key. The
earlier scan -> HTTP shape could not work: the n8n container cannot resolve
the `remote` ssh alias (its ~/.ssh/config is a dangling nix symlink) and a
split scan node hides scan failures before the notify node runs.
- deploy/n8n-morning-brief.json: two-node workflow, scheduleTrigger v1.3
- deploy/setup-n8n-scan-key.sh: restricted (restrict,command=) trigger key
- deploy/import-n8n-morning-brief.sh: import + publish + restart + verify
- deploy/DEPLOYMENT.md, Makefile: document and expose both scripts (dry run)
- docs/phase-7a-n8n-schedule.md: design, verification, failure drill
Import into the shared n8n service still needs Sam's approval.
Co-Authored-By: Paperclip <noreply@paperclip.ing>