4.2 KiB
4.2 KiB
2026-03-12
n8n local documentation fix
- Documented the local
n8n-agentservice inTOOLS.mdafter noticing it had been set up but not captured in workspace notes. - Recorded current known service details from prior host/runtime evidence:
- port
18808 -> 5678 - LAN/Tailscale URLs
- dedicated agent-oriented n8n instance
openclaw-pingwebhook path tested end-to-end
- port
- Operating note: prefer narrow webhook-first integration rather than broad n8n admin/API access.
- Will clarified the primary host LAN IP to use/document is
192.168.153.113. - Finished local skill
skills/n8n-webhookfor authenticated webhook-first n8n integration, includingscripts/call-webhook.sh,scripts/call-action.sh,scripts/validate-workflow.py, an importableassets/openclaw-action.workflow.json, sample payloads, payload notes, and a successful package/validation run to/tmp/n8n-skill-dist/n8n-webhook.skill. - The shipped
openclaw-actionworkflow intentionally leaves Webhook authentication unset in export JSON; after import, bind local n8n Header Auth credentials manually usingx-openclaw-secretso secrets are not embedded in the skill asset. - Live n8n API access was confirmed and used on 2026-03-12 against
http://192.168.153.113:18808(public API + existing webhook credential available in the instance). - Created and activated live workflow
openclaw-actionvia the n8n API. - First live implementation matched the original asset shape (
Webhook -> Set -> Switch -> Respond) but failed at runtime: executions errored in thenormalize-requestSet node withinvalid syntaxon its expressions. - Fix: replaced the live router logic and shipped asset implementation with a simpler, working internal design:
Webhook -> Code -> Respond to Webhook, while preserving the external contract (append_log,notify, normalized JSON success/failure responses). - Important operational note: the workflow initially activated without a usable production route because the Webhook node lacked a
webhookId; adding one and re-publishing was necessary for proper webhook registration. - Current state before compaction: the live
openclaw-actionworkflow exists in n8n, is active, and has been updated to the simpler Code-node implementation; post-update live response testing was still in progress at compaction time. - After compaction, live verification succeeded against the production webhook:
append_logreturned200with normalized JSON success payloadnotifyreturned200with normalized JSON success payload- unknown action returned
400with{ code: "unknown_action" }
- The packaged skill artifact was refreshed after the router simplification at
/tmp/n8n-skill-dist/n8n-webhook.skill. - Follow-up implementation for real side effects:
notifywas successfully wired to the existing Telegram + Discord credentials and verified live multiple times.append_loghit two dead ends before settling on the clean solution:Execute Commandnode was unavailable in this n8n build (Unrecognized node type: n8n-nodes-base.executeCommand).Read/Write Files from Diskwas available, but candidate paths were either missing or not writable in this container/runtime.
- Final fix: switched
append_logto use n8n workflow static data ($getWorkflowStaticData('global')) under keyactionLog, capped to the latest 200 entries. - Verified persisted state via the n8n API:
staticData.global.actionLogcontains the live test record for requestlive-log-003. - Conclusion: for small recent operational breadcrumbs, workflow static data is the right sink here; MinIO is better reserved for later archival/rotation/export use cases rather than tiny per-event appends.
- Added action
get_logsto the liveopenclaw-actionworkflow and localn8n-webhookskill.get_logsreads from workflow static data keyactionLog- default limit
20, clamped to1..50, newest-first - verified live with request
live-getlogs-001returning the seed record fromlive-log-004
- Re-verified the three live actions together after the update:
append_log→ successget_logs→ successnotify→ success
- Refreshed packaged skill artifact again at
/tmp/n8n-skill-dist/n8n-webhook.skill.