From 4adc87c0daee8ca8874615b37f7bbd89986d51a8 Mon Sep 17 00:00:00 2001 From: zap Date: Thu, 12 Mar 2026 19:46:09 +0000 Subject: [PATCH] docs(n8n): re-verify fresh-session gmail/calendar approval flows --- HANDOFF.md | 58 +++++++++++++++++++++++--------------------- WIP.md | 22 ++++++++++++++--- memory/2026-03-12.md | 16 ++++++++++++ memory/tasks.json | 9 ++++--- 4 files changed, 71 insertions(+), 34 deletions(-) diff --git a/HANDOFF.md b/HANDOFF.md index 43761a1..8879bd0 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -4,7 +4,7 @@ Immediate baton-pass for the next fresh implementation session. ## Current objective -Finish proving the Google Workspace + n8n integration through the real approval-routed path, not just direct Gog commands or dry-runs. +Advance the Google Workspace action bus beyond create-only proofs now that real approval-routed Gmail draft + Calendar event tests have been re-verified in a fresh session. ## Use these state files first 1. `WIP.md` — full standing plan and checkpoints @@ -13,34 +13,35 @@ Finish proving the Google Workspace + n8n integration through the real approval- ## What is already true - `openclaw-action` is live in n8n and active. -- Google auth via `gog` is working. -- Local automation env lives in `/home/openclaw/.openclaw/credentials/gog.env` and should stay out of git. -- Host bridge exists at: - - `skills/n8n-webhook/scripts/resolve-approval-with-gog.py` -- Direct Gmail draft create/delete tests succeeded. -- Dry-run n8n-routed Gmail + Calendar bridge tests succeeded. +- Google auth via `gog` is working headlessly through local env auto-load. +- Local automation env lives in `/home/openclaw/.openclaw/credentials/gog.env` and stays out of git. +- Host bridge exists at `skills/n8n-webhook/scripts/resolve-approval-with-gog.py`. +- Real approval-routed Gmail draft and Calendar event flows have both been verified multiple times end-to-end with cleanup. + +## Fresh-session proof completed (2026-03-12 19:44Z) +- Gmail draft flow (`send_email_draft`): + - approval id: `approval-mmnvn4t2-w2rjlwz2` + - draft id: `r-3319106208870238577` + - subject: `[zap n8n e2e] Gmail draft test 20260312T194450Z` + - verified via `gog gmail drafts get` + - cleaned via `gog gmail drafts delete --force` +- Calendar event flow (`create_calendar_event`): + - approval id: `approval-mmnvn6i8-e9eq8gdf` + - event id: `m7prri8vk2opuo6loq3qgtvsv4` + - title: `[zap n8n e2e] Calendar test 20260312T194450Z` + - verified via `gog calendar get primary ` + - cleaned via `gog calendar delete primary --force` ## Highest-priority next actions -1. **Real n8n-routed Gmail draft test** - - queue `send_email_draft` through `openclaw-action` - - approve through `resolve-approval-with-gog.py` (no `--dry-run`) - - verify draft exists in Gmail - - delete the test draft - - update `WIP.md` and memory with result ids/evidence +1. Add `list_email_drafts` and `delete_email_draft` actions to the workflow contract and host executor path. +2. Add `list_upcoming_events`, `update_calendar_event`, and `delete_calendar_event` actions. +3. Keep approval policy explicit per action (default-gated for mutating operations). +4. Add one compact operator test playbook for recurring verification (queue → approve → verify → cleanup). -2. **Real n8n-routed Calendar event test** - - queue `create_calendar_event` through `openclaw-action` - - approve through `resolve-approval-with-gog.py` (no `--dry-run`) - - verify event exists in Calendar - - delete the test event - - update `WIP.md` and memory with result ids/evidence - -## Success criteria for this next session -- both real approval-routed tests pass end-to-end -- cleanup is confirmed (draft removed, event removed) -- `WIP.md` reflects the new state cleanly -- relevant memory/task files are updated -- meaningful git checkpoint(s) committed +## Success criteria for the next session +- At least one new Gmail action and one new Calendar action implemented and validated end-to-end. +- `WIP.md` and memory updated with concrete IDs/evidence. +- Meaningful commit(s) captured. ## Relevant files - `WIP.md` @@ -50,14 +51,15 @@ Finish proving the Google Workspace + n8n integration through the real approval- - `skills/n8n-webhook/scripts/resolve-approval-with-gog.py` - `skills/n8n-webhook/references/openclaw-action.md` - `memory/2026-03-12.md` +- `memory/tasks.json` - `/home/openclaw/.openclaw/credentials/gog.env` (local-only) ## Relevant branch / commits - branch: `feat/n8n-action-bus-v2` -- latest checkpoints already on branch include: +- latest checkpoints before this handoff include: - `afa48a3` — bridge approvals to gog executors - `044e36f` — auto-load local gog automation env - `06fa582` — track google workspace and n8n plan ## Operator note -Use the live n8n public API directly when it is the right path. Do not act blocked on n8n API access. +Use the live n8n public API/webhook surface directly when it is the right path. Do not act blocked on n8n API access. \ No newline at end of file diff --git a/WIP.md b/WIP.md index 1d00c4a..302f5b3 100644 --- a/WIP.md +++ b/WIP.md @@ -106,14 +106,30 @@ Next action should be: 1. add `delete_email_draft` and `list_email_drafts` 2. add `update_calendar_event`, `delete_calendar_event`, and `list_upcoming_events` 3. decide approval defaults for each new Google action +4. add a compact operator test playbook for repeated proof runs + +## Fresh-session proof refresh (2026-03-12 19:44Z) +- Re-ran both target proofs through the real approval-routed path in a clean implementation session. +- Gmail draft flow: + - approval id: `approval-mmnvn4t2-w2rjlwz2` + - draft id: `r-3319106208870238577` + - subject: `[zap n8n e2e] Gmail draft test 20260312T194450Z` + - verified via `gog gmail drafts get` + - cleaned via `gog gmail drafts delete --force` +- Calendar flow: + - approval id: `approval-mmnvn6i8-e9eq8gdf` + - event id: `m7prri8vk2opuo6loq3qgtvsv4` + - title: `[zap n8n e2e] Calendar test 20260312T194450Z` + - verified via `gog calendar get primary ` + - cleaned via `gog calendar delete primary --force` ## Next-session handoff For the next fresh implementation session, start from `HANDOFF.md` + `WIP.md` rather than from old chat context. Immediate target: -- prove the real approval-routed Gmail and Calendar paths end-to-end -- clean up the created artifacts after verification -- then refresh WIP/memory/tasks and commit +- implement at least one new Gmail action and one new Calendar action +- verify through the same approval+bridge flow +- refresh WIP/memory/tasks and commit ## Relevant files - `skills/n8n-webhook/assets/openclaw-action.workflow.json` diff --git a/memory/2026-03-12.md b/memory/2026-03-12.md index a55f6f7..40f9408 100644 --- a/memory/2026-03-12.md +++ b/memory/2026-03-12.md @@ -122,3 +122,19 @@ - adding a `Fresh-session implementation discipline` section to `AGENTS.md` - creating `HANDOFF.md` as the immediate baton-pass file for the next clean implementation session - updating `WIP.md` with a `Next-session handoff` section + +## Fresh clean-context re-run (implementation subagent) +- Executed the requested fresh-session baton pass from `HANDOFF.md` + `WIP.md` and re-proved the two real approval-routed Google flows end-to-end through n8n + host `gog` bridge. +- Real Gmail draft flow (`send_email_draft`) re-run: + - approval id: `approval-mmnvn4t2-w2rjlwz2` + - draft id: `r-3319106208870238577` + - subject: `[zap n8n e2e] Gmail draft test 20260312T194450Z` + - verification: `gog gmail drafts get --json --no-input` returned the draft payload with expected subject/body + - cleanup: `gog gmail drafts delete --force` returned `{ "deleted": true, ... }` +- Real Calendar event flow (`create_calendar_event`) re-run: + - approval id: `approval-mmnvn6i8-e9eq8gdf` + - event id: `m7prri8vk2opuo6loq3qgtvsv4` + - title: `[zap n8n e2e] Calendar test 20260312T194450Z` + - verification: `gog calendar get primary --json --no-input` returned the created event + - cleanup: `gog calendar delete primary --force` returned `{ "deleted": true, ... }` +- Refreshed baton/state files (`HANDOFF.md`, `WIP.md`) to mark this fresh-session proof as complete and move next target to expanding Gmail/Calendar action coverage (list/update/delete flows + operator playbook). diff --git a/memory/tasks.json b/memory/tasks.json index a516c98..3727910 100644 --- a/memory/tasks.json +++ b/memory/tasks.json @@ -64,7 +64,8 @@ "notes": [ "Added from LAN-services gap review on 2026-03-11.", "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." + "Progress 2026-03-12: access/auth now exists and the remaining work is productionizing n8n-routed execution plus verification.", + "Fresh-session re-proof 2026-03-12 19:44Z: real n8n approval-routed Gmail draft and Calendar event flows succeeded again end-to-end with verify+cleanup (approval ids approval-mmnvn4t2-w2rjlwz2 / approval-mmnvn6i8-e9eq8gdf)." ] }, { @@ -77,7 +78,8 @@ "details": "Set up access to a mail/inbox workflow so zap can help with triage, summaries, and urgent-message detection.", "notes": [ "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." + "Progress 2026-03-12: access/auth now exists and the remaining work is productionizing n8n-routed execution plus verification.", + "Fresh-session re-proof 2026-03-12 19:44Z: real n8n approval-routed Gmail draft and Calendar event flows succeeded again end-to-end with verify+cleanup (approval ids approval-mmnvn4t2-w2rjlwz2 / approval-mmnvn6i8-e9eq8gdf)." ] }, { @@ -132,7 +134,8 @@ "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).", "Proof step completed 2026-03-12: both real n8n-routed tests passed and cleanup succeeded (see WIP.md + memory/2026-03-12.md for IDs).", - "State file: WIP.md tracks the current full plan and checkpoints." + "State file: WIP.md tracks the current full plan and checkpoints.", + "Fresh-session re-proof 2026-03-12 19:44Z: real n8n approval-routed Gmail draft and Calendar event flows succeeded again end-to-end with verify+cleanup (approval ids approval-mmnvn4t2-w2rjlwz2 / approval-mmnvn6i8-e9eq8gdf)." ] }, {