4.0 KiB
4.0 KiB
WIP.md
Current focus
Google Workspace + n8n integration
Goal
Use OpenClaw as the brain, n8n as the orchestration layer, and Google Workspace as a real execution surface for Gmail/Calendar workflows.
Current status
Status: in-progress
Owner: zap
Started: 2026-03-12
Architecture decision
- Keep
openclaw-actionas the narrow authenticated ingress into n8n. - Keep approval/state/logging in n8n.
- Use host-side
gogexecution for Google Workspace actions for now. - Attach execution results back into n8n history so approval items become auditable records.
- Prefer this over broad n8n Google credential sprawl unless a later need clearly justifies it.
What is already done
n8n action bus
- Live
openclaw-actionworkflow exists and is active. - Core actions verified live:
append_logget_logsnotifyapproval_queue_addapproval_queue_listapproval_queue_resolvefetch_and_normalize_urlinbound_event_filter
- Approval-gated notification execution works live:
send_notification_draft- approve → real
notify
Google access
goginstalled and authenticated for:- Gmail
- Calendar
- Drive
- Contacts
- Docs
- Sheets
- Local-only Gog automation env stored outside git at:
/home/openclaw/.openclaw/credentials/gog.env
- Host bridge implemented:
skills/n8n-webhook/scripts/resolve-approval-with-gog.py
- n8n history patch action implemented:
approval_history_attach_execution
- Dry-run end-to-end bridge tests succeeded for:
- Gmail draft creation
- Calendar event creation
- Headless non-interactive Gog execution works via the stored local env.
- Direct real Gmail draft create test succeeded.
- Direct real Gmail draft delete test succeeded.
What is left
Highest priority: prove the bridge with real Google writes
- Real end-to-end Gmail draft via n8n path:
- queue
send_email_draft - approve via
resolve-approval-with-gog.py - verify draft exists in Gmail
- delete the test draft
- queue
- Real end-to-end Calendar event via n8n path:
- queue
create_calendar_event - approve via bridge
- verify event exists in Calendar
- delete the test event
- queue
Then expand useful Google actions
- Add
delete_email_draft - Add
list_email_drafts - Add
send_gmail_draft/ send-approved-email path - Add
update_calendar_event - Add
delete_calendar_event - Add
list_upcoming_events - Decide whether Drive/Docs/Sheets need action-bus verbs next or can stay direct-tool only for now
Then polish the operator experience
- Add a compact operator command/reference section for common approval flows
- Add one or two canned test payloads for real bridge verification flows
- Decide whether some Google actions should stay approval-gated by default
- Add low-noise reporting so history clearly shows:
- queued
- approved/rejected
- executed
- execution result id / draft id / event id
Nice-to-have / future
- Evaluate whether native n8n Google nodes are worth adding later
- If useful, sync this work into the LAN Gitea repo for safer backup/review and easier long-lived tracking
Current recommendation
Next action should be:
- real n8n-routed Gmail draft test
- real n8n-routed Calendar event test
- add delete/update/list verbs after those pass
Relevant files
skills/n8n-webhook/assets/openclaw-action.workflow.jsonskills/n8n-webhook/scripts/call-action.shskills/n8n-webhook/scripts/resolve-approval-with-gog.pyskills/n8n-webhook/references/openclaw-action.mdmemory/2026-03-12.md/home/openclaw/.openclaw/credentials/gog.env(local-only, not for git)
Current branch / checkpoints
- branch:
feat/n8n-action-bus-v2 - key commits:
9dcc477— expand action bus starter workflowdc990a1— deploy and verify expanded action bus1eabaeb— add approval-gated notification executorafa48a3— bridge approvals to gog executors044e36f— auto-load local gog automation env