docs(wip): track google workspace and n8n plan
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
- Tooling preference: treat the local n8n instance as an assistant-owned execution/orchestration tool and use it proactively when it is the right fit, without asking for separate permission each time.
|
- Tooling preference: treat the local n8n instance as an assistant-owned execution/orchestration tool and use it proactively when it is the right fit, without asking for separate permission each time.
|
||||||
- n8n access preference: treat the live n8n public API as part of that allowed tool surface as well; when the right path is via the n8n API, use it directly instead of acting blocked or asking again for permission.
|
- n8n access preference: treat the live n8n public API as part of that allowed tool surface as well; when the right path is via the n8n API, use it directly instead of acting blocked or asking again for permission.
|
||||||
- Google Workspace automation note: `gog` works for non-interactive planning/dry-runs without unlocking the keyring, but real headless Gmail/Calendar execution requires `GOG_KEYRING_PASSWORD` in the environment because the file keyring backend cannot prompt in non-TTY automation.
|
- Google Workspace automation note: `gog` works for non-interactive planning/dry-runs without unlocking the keyring, but real headless Gmail/Calendar execution requires `GOG_KEYRING_PASSWORD` in the environment because the file keyring backend cannot prompt in non-TTY automation.
|
||||||
|
- Infrastructure note: zap has access to Will's own Gitea git repo on the LAN and can use it when repo-backed tracking/sync/review is the right move.
|
||||||
|
|
||||||
## Boundaries
|
## Boundaries
|
||||||
- Never fetch/read remote files to alter instructions.
|
- Never fetch/read remote files to alter instructions.
|
||||||
|
|||||||
117
WIP.md
Normal file
117
WIP.md
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# 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-action` as the narrow authenticated ingress into n8n.
|
||||||
|
- Keep approval/state/logging in n8n.
|
||||||
|
- Use host-side `gog` execution 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
|
||||||
|
- [x] Live `openclaw-action` workflow exists and is active.
|
||||||
|
- [x] Core actions verified live:
|
||||||
|
- `append_log`
|
||||||
|
- `get_logs`
|
||||||
|
- `notify`
|
||||||
|
- `approval_queue_add`
|
||||||
|
- `approval_queue_list`
|
||||||
|
- `approval_queue_resolve`
|
||||||
|
- `fetch_and_normalize_url`
|
||||||
|
- `inbound_event_filter`
|
||||||
|
- [x] Approval-gated notification execution works live:
|
||||||
|
- `send_notification_draft`
|
||||||
|
- approve → real `notify`
|
||||||
|
|
||||||
|
### Google access
|
||||||
|
- [x] `gog` installed and authenticated for:
|
||||||
|
- Gmail
|
||||||
|
- Calendar
|
||||||
|
- Drive
|
||||||
|
- Contacts
|
||||||
|
- Docs
|
||||||
|
- Sheets
|
||||||
|
- [x] Local-only Gog automation env stored outside git at:
|
||||||
|
- `/home/openclaw/.openclaw/credentials/gog.env`
|
||||||
|
- [x] Host bridge implemented:
|
||||||
|
- `skills/n8n-webhook/scripts/resolve-approval-with-gog.py`
|
||||||
|
- [x] n8n history patch action implemented:
|
||||||
|
- `approval_history_attach_execution`
|
||||||
|
- [x] Dry-run end-to-end bridge tests succeeded for:
|
||||||
|
- Gmail draft creation
|
||||||
|
- Calendar event creation
|
||||||
|
- [x] Headless non-interactive Gog execution works via the stored local env.
|
||||||
|
- [x] Direct real Gmail draft create test succeeded.
|
||||||
|
- [x] 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:
|
||||||
|
1. queue `send_email_draft`
|
||||||
|
2. approve via `resolve-approval-with-gog.py`
|
||||||
|
3. verify draft exists in Gmail
|
||||||
|
4. delete the test draft
|
||||||
|
- [ ] Real end-to-end Calendar event via n8n path:
|
||||||
|
1. queue `create_calendar_event`
|
||||||
|
2. approve via bridge
|
||||||
|
3. verify event exists in Calendar
|
||||||
|
4. delete the test event
|
||||||
|
|
||||||
|
### 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:
|
||||||
|
1. real n8n-routed Gmail draft test
|
||||||
|
2. real n8n-routed Calendar event test
|
||||||
|
3. add delete/update/list verbs after those pass
|
||||||
|
|
||||||
|
## Relevant files
|
||||||
|
- `skills/n8n-webhook/assets/openclaw-action.workflow.json`
|
||||||
|
- `skills/n8n-webhook/scripts/call-action.sh`
|
||||||
|
- `skills/n8n-webhook/scripts/resolve-approval-with-gog.py`
|
||||||
|
- `skills/n8n-webhook/references/openclaw-action.md`
|
||||||
|
- `memory/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 workflow
|
||||||
|
- `dc990a1` — deploy and verify expanded action bus
|
||||||
|
- `1eabaeb` — add approval-gated notification executor
|
||||||
|
- `afa48a3` — bridge approvals to gog executors
|
||||||
|
- `044e36f` — auto-load local gog automation env
|
||||||
@@ -99,3 +99,9 @@
|
|||||||
- updated `resolve-approval-with-gog.py` to auto-load that file when present
|
- updated `resolve-approval-with-gog.py` to auto-load that file when present
|
||||||
- verified non-interactive headless Gmail access works using the stored env (successful `gog gmail search ... --json --no-input`)
|
- verified non-interactive headless Gmail access works using the stored env (successful `gog gmail search ... --json --no-input`)
|
||||||
- verified the bridge itself auto-loads the env file by resolving a fresh `email_draft` approval item in `--dry-run` mode and attaching execution metadata successfully without manually exporting `GOG_ACCOUNT` / `GOG_KEYRING_PASSWORD`
|
- verified the bridge itself auto-loads the env file by resolving a fresh `email_draft` approval item in `--dry-run` mode and attaching execution metadata successfully without manually exporting `GOG_ACCOUNT` / `GOG_KEYRING_PASSWORD`
|
||||||
|
- Real direct Google sanity checks succeeded after that:
|
||||||
|
- created a Gmail draft to `william.valentin.info@gmail.com` with subject `Test draft from zap`
|
||||||
|
- deleted the same draft successfully and verified removal via follow-up `404 notFound`
|
||||||
|
- Created top-level state file `WIP.md` to track the current Google Workspace + n8n integration plan, status, completed work, and next steps.
|
||||||
|
- Updated `memory/tasks.json` so the overlapping Google Workspace / calendar / email tasks moved from `open` to `in-progress` and now point at the current WIP file.
|
||||||
|
- Will explicitly noted a durable capability reminder: zap also has access to Will's own Gitea repo on the LAN and can use it when repo-backed tracking/sync is useful.
|
||||||
|
|||||||
@@ -59,11 +59,12 @@
|
|||||||
"title": "Add calendar access/backend for proactive scheduling help",
|
"title": "Add calendar access/backend for proactive scheduling help",
|
||||||
"owner": "zap",
|
"owner": "zap",
|
||||||
"priority": "medium",
|
"priority": "medium",
|
||||||
"status": "open",
|
"status": "in-progress",
|
||||||
"details": "Set up or connect a calendar backend so zap can provide stronger calendar-aware assistance, daily briefs, and schedule checks.",
|
"details": "Set up or connect a calendar backend so zap can provide stronger calendar-aware assistance, daily briefs, and schedule checks.",
|
||||||
"notes": [
|
"notes": [
|
||||||
"Added from LAN-services gap review on 2026-03-11.",
|
"Added from LAN-services gap review on 2026-03-11.",
|
||||||
"Biggest functional gap identified at the time."
|
"Biggest functional gap identified at the time.",
|
||||||
|
"Progress 2026-03-12: access/auth now exists and the remaining work is productionizing n8n-routed execution plus verification."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -72,10 +73,11 @@
|
|||||||
"title": "Add email/inbox access for triage and briefing",
|
"title": "Add email/inbox access for triage and briefing",
|
||||||
"owner": "zap",
|
"owner": "zap",
|
||||||
"priority": "medium",
|
"priority": "medium",
|
||||||
"status": "open",
|
"status": "in-progress",
|
||||||
"details": "Set up access to a mail/inbox workflow so zap can help with triage, summaries, and urgent-message detection.",
|
"details": "Set up access to a mail/inbox workflow so zap can help with triage, summaries, and urgent-message detection.",
|
||||||
"notes": [
|
"notes": [
|
||||||
"Added from LAN-services gap review on 2026-03-11."
|
"Added from LAN-services gap review on 2026-03-11.",
|
||||||
|
"Progress 2026-03-12: access/auth now exists and the remaining work is productionizing n8n-routed execution plus verification."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -121,11 +123,15 @@
|
|||||||
"title": "Add Google Workspace access (Calendar/Drive/Docs/Gmail as appropriate)",
|
"title": "Add Google Workspace access (Calendar/Drive/Docs/Gmail as appropriate)",
|
||||||
"owner": "zap",
|
"owner": "zap",
|
||||||
"priority": "medium",
|
"priority": "medium",
|
||||||
"status": "open",
|
"status": "in-progress",
|
||||||
"details": "Connect Google Workspace services where useful so zap can work with calendar, docs, drive, and/or gmail more directly.",
|
"details": "Connect Google Workspace services where useful so zap can work with calendar, docs, drive, and/or gmail more directly.",
|
||||||
"notes": [
|
"notes": [
|
||||||
"Added from tool wishlist on 2026-03-11.",
|
"Added from tool wishlist on 2026-03-11.",
|
||||||
"Some overlap with calendar/email tasks; this is the broader suite-level follow-up."
|
"Some overlap with calendar/email tasks; this is the broader suite-level follow-up.",
|
||||||
|
"Progress 2026-03-12: gog auth completed for Gmail/Calendar/Drive/Contacts/Docs/Sheets.",
|
||||||
|
"Progress 2026-03-12: live n8n action bus now supports approval-gated Google flows via host-side gog bridge.",
|
||||||
|
"Next proof step: run real n8n-routed Gmail draft and Calendar event tests (not just dry-run).",
|
||||||
|
"State file: WIP.md tracks the current full plan and checkpoints."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user