@awesomate/hosting-mcp 0.87.0 → 0.88.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/index.js +51 -141
  2. package/package.json +2 -1
  3. package/skill/CHANGELOG.json +43 -0
  4. package/skill/awesomate-app-builder/SKILL.md +13 -8
  5. package/skill/awesomate-app-builder/references/node-recipes.md +3 -2
  6. package/skill/awesomate-app-builder/references/stack-decision.md +4 -3
  7. package/skill/awesomate-bookings/SKILL.md +9 -6
  8. package/skill/awesomate-database/SKILL.md +52 -62
  9. package/skill/awesomate-hosting/SKILL.md +1 -1
  10. package/skill/awesomate-n8n/SKILL.md +165 -108
  11. package/skill/awesomate-n8n/evals/n8n-agent-build/graders/grader.md +2 -1
  12. package/skill/awesomate-n8n/references/ai-agents.md +10 -8
  13. package/skill/awesomate-n8n/references/datatables.md +46 -66
  14. package/skill/awesomate-n8n/references/error-handling.md +5 -5
  15. package/skill/awesomate-n8n/references/n8n-agents.md +10 -9
  16. package/skill/awesomate-n8n/references/onebrain.md +4 -4
  17. package/skill/awesomate-n8n/references/platform-notes.md +13 -13
  18. package/skill/awesomate-n8n/references/possibilities.md +12 -11
  19. package/skill/awesomate-n8n/references/testing-policy.md +51 -47
  20. package/skill/awesomate-n8n/references/troubleshooting.md +15 -16
  21. package/skill/awesomate-n8n/references/webhook-pages.md +5 -5
  22. package/skill/awesomate-n8n/references/wp-form-handler.md +6 -4
  23. package/skill/awesomate-seo/SKILL.md +15 -8
  24. package/skill/awesomate-seo/references/ai-discoverability.md +40 -26
  25. package/skill/awesomate-n8n/evals/ai-agent-build/graders/grader.md +0 -31
  26. package/skill/awesomate-n8n/evals/ai-agent-build/prompt.md +0 -1
  27. package/skill/awesomate-n8n/evals/build-form-email/graders/grader.md +0 -30
  28. package/skill/awesomate-n8n/evals/build-form-email/prompt.md +0 -1
  29. package/skill/awesomate-n8n/evals/datatable-dedupe/graders/grader.md +0 -32
  30. package/skill/awesomate-n8n/evals/datatable-dedupe/prompt.md +0 -2
  31. package/skill/awesomate-n8n/evals/essentials-upsell/graders/grader.md +0 -27
  32. package/skill/awesomate-n8n/evals/essentials-upsell/prompt.md +0 -2
  33. package/skill/awesomate-n8n/evals/live-change-promote/graders/grader.md +0 -35
  34. package/skill/awesomate-n8n/evals/live-change-promote/prompt.md +0 -2
  35. package/skill/awesomate-n8n/evals/validated-not-done/graders/grader.md +0 -27
  36. package/skill/awesomate-n8n/evals/validated-not-done/prompt.md +0 -2
  37. package/skill/awesomate-n8n/evals/webhook-body-fix/graders/grader.md +0 -26
  38. package/skill/awesomate-n8n/evals/webhook-body-fix/prompt.md +0 -3
  39. package/skill/awesomate-n8n/evals/webhook-page-build/graders/grader.md +0 -36
  40. package/skill/awesomate-n8n/evals/webhook-page-build/prompt.md +0 -1
  41. package/skill/awesomate-n8n/references/rest-fallback.md +0 -77
  42. package/skill/awesomate-n8n/references/upgrade-loop.md +0 -98
@@ -20,17 +20,18 @@ write, or for an app your customers log into?"
20
20
 
21
21
  **(a) A list an AUTOMATION reads/writes** — a dedupe ledger, a task
22
22
  queue, a lookup map, form submissions feeding a workflow. → n8n DATA
23
- TABLE, via the awesomate-n8n skill. Create and write with
24
- `awesomate_n8n_datatable_write`, and pass `workflowId` so the table is
25
- co-located with the workflow that uses it. No hosting slot consumed, and
23
+ TABLE, via the awesomate-n8n skill. The table lives in n8n: Claude designs
24
+ the columns, the user creates it in n8n (Data tables in the left menu,
25
+ inside the project that owns the workflow), or Claude creates it through
26
+ their n8n's own MCP server when that server offers a data-table tool. No
27
+ Awesomate tool creates or writes a table. No hosting slot consumed, and
26
28
  workflows query it directly — this is the default answer for anything
27
29
  automation-shaped. Inspect what exists with
28
30
  `awesomate_n8n_inspect {what:'datatables'}`.
29
- **Both the write AND that read are gated:** Support Plus or above, plus the
30
- privacy switch **"Build and change automations from Claude Code"** in Settings,
31
- Privacy (hub.awesomate.ai/settings?tab=privacy, which is what the 403's
32
- `settingsUrl` points at). It is **off by default**, so on a fresh account
33
- both the read and the write come back 403 `consent_required`. Call
31
+ **That read is gated** by the privacy switch **"Let Claude Code work with
32
+ your automations"** in Settings, Privacy (hub.awesomate.ai/settings?tab=privacy,
33
+ which is what the 403's `settingsUrl` points at). It is **off by default**,
34
+ so on a fresh account the read comes back 403 `consent_required`. Call
34
35
  `awesomate_privacy_settings` to name the exact toggle that's off, send the
35
36
  user to flip it, then re-check. You cannot flip it for them.
36
37
 
@@ -43,25 +44,24 @@ app serves to people. → the app's own Postgres.
43
44
  via the awesomate-app-builder skill, which wires it in from the start.
44
45
 
45
46
  **(c) A WORKFLOW that needs raw SQL against its own Postgres** — real
46
- joins, aggregates, or volumes a data table shouldn't carry. →
47
- `awesomate_n8n_provision_pg`. One step creates the database AND the n8n
48
- credential, so the workflow can query it immediately. It has the most gates
49
- of anything here — check them BEFORE offering it, so the user doesn't hit a
50
- wall halfway:
51
- - Support Plus or above.
52
- - The **"Build and change automations from Claude Code"** toggle (off by
53
- default) — same one as branch (a).
54
- - The **direct database writes** consent (`allow_pg_writes`). It's on by
55
- default, so this is rare — but it has **no client-facing toggle in the
56
- hub**, so if it's off, don't send the user hunting for a switch that
57
- doesn't exist: route it to support via the awesomate-support skill.
58
- - An Awesomate cPanel hosting account. Without one it returns 409
59
- `hosting_required`; hosting comes first (awesomate-hosting skill).
60
- - Capped at **2 a day**.
61
-
62
- On any 403 here, call `awesomate_privacy_settings` first — it names the
63
- exact toggle that's blocking, which decides whether this is a "flip this
64
- switch" or a "raise it with support" answer.
47
+ joins, aggregates, or volumes a data table shouldn't carry. → a Postgres
48
+ credential the user creates in their own n8n. No Awesomate tool provisions
49
+ this any more; it is two steps the user does, and you walk them through:
50
+ 1. Get a database. If they have an Awesomate hosting account and cPanel
51
+ shows a **PostgreSQL Databases** page (not every package does; check
52
+ before promising it), it makes one (database + user + password) in a
53
+ minute; the awesomate-hosting skill opens cPanel for them. If their data
54
+ already lives in a Postgres somewhere else (their app's database, Supabase,
55
+ Neon), use that one: see (d).
56
+ 2. Create the credential in n8n at `{instanceUrl}/home/credentials`
57
+ (type Postgres: host, port, database, user, password, SSL as cPanel shows
58
+ them). The password goes from cPanel into n8n and never through the chat.
59
+ Then confirm it exists with `awesomate_n8n_inspect {what:'credentials'}`
60
+ and build the workflow on it (awesomate-n8n skill).
61
+ An app database made by `awesomate_app_provision_db` belongs to the app: a
62
+ workflow reads it through the app's own API, or through a credential the
63
+ user makes on purpose from the app's connection details, never by Claude
64
+ copying `DATABASE_URL` into n8n.
65
65
 
66
66
  **(d) Analytics/BI or data shared with other systems** — reporting
67
67
  warehouses, a spreadsheet the whole team lives in, a CRM. → recommend
@@ -92,19 +92,15 @@ reach), ask "live or dev?" before provisioning against it.
92
92
 
93
93
  ## 2. Safety rules
94
94
 
95
- - **Passwords land where they belong, and the two branches differ.**
96
- `awesomate_app_provision_db` NEVER returns a password: it's set
97
- server-side, stored encrypted, and injected as the app's `DATABASE_URL`
98
- — there is nothing to show, so don't promise the user a password.
99
- `awesomate_n8n_provision_pg` is the one that DOES return a password, once,
100
- because it lives in the n8n credential and Awesomate never stores it. The
101
- workflow doesn't need you to repeat it — the credential already holds it —
102
- so say that, and only offer the value if the user actually needs it
103
- elsewhere, warning that it has now passed through the transcript and
104
- should be rotated. Never put a `DATABASE_URL` in a message. Tell the user where
105
- it lives instead: "the app already has its connection — nothing for you
106
- to copy." (After an app database is provisioned, the app needs a restart
107
- or redeploy to pick it up.)
95
+ - **Passwords land where they belong.** `awesomate_app_provision_db`
96
+ NEVER returns a password: it's set server-side, stored encrypted, and
97
+ injected as the app's `DATABASE_URL`. There is nothing to show, so don't
98
+ promise the user a password. A workflow Postgres password lives in the n8n
99
+ credential the user created; never ask for it and never put it, or a
100
+ `DATABASE_URL`, in a message. Tell the user where it lives instead: "the
101
+ app already has its connection, nothing for you to copy." (After an app
102
+ database is provisioned, the app needs a restart or redeploy to pick it
103
+ up.)
108
104
  - Secrets the user's own app code needs (API keys, tokens) go through
109
105
  the awesomate-credentials skill, never pasted into files or chat.
110
106
  - **Deleting data requires an explicit filter and an explicit yes.**
@@ -114,28 +110,22 @@ reach), ask "live or dev?" before provisioning against it.
114
110
 
115
111
  ## 3. Limits, honestly
116
112
 
117
- Everything that provisions here needs **Support Plus or above** — app
118
- databases (`awesomate_app_provision_db`), workflow Postgres
119
- (`awesomate_n8n_provision_pg`) and data tables alike. Data tables are NOT
120
- "any plan with n8n access": Essentials gets 0 creations a day, and both the
121
- table read and the write also need the "Build and change automations from Claude Code" toggle (§0(a)).
122
-
123
- Only some of it is capped per day:
124
- - `awesomate_n8n_provision_pg` — **2 a day**, flat; no plan raises it, so
125
- don't pitch an upgrade for it.
126
- - Data table creations — **10 a day** on Support Plus and Pro (20 on
127
- Embedded), 0 on Essentials. An instance also tops out at 50 data tables.
128
- - `awesomate_app_provision_db` — **no daily cap**. It's one database per
129
- environment and refuses (409 `already_has_db`) if the app has one, so
130
- there's nothing to ration.
131
-
132
- If the user's plan doesn't cover what branch (b) or (c) needs, say it once
133
- — "app databases are on Support Plus" — point them at
134
- hub.awesomate.ai/billing to upgrade, then help fully within what their plan
135
- allows. On Essentials that means none of (a), (b) or (c) is available —
136
- don't dangle a data table as the consolation prize; say so once and look at
137
- (d), keeping the data where it already lives and connecting to it. If a
138
- daily quota is hit, say when it resets and what can proceed meanwhile.
113
+ App databases (`awesomate_app_provision_db`) need **Support Plus or
114
+ above**. There is **no daily cap**: it's one database per environment and
115
+ refuses (409 `already_has_db`) if the app has one, so there's nothing to
116
+ ration.
117
+
118
+ Data tables (a) and a workflow Postgres (c) are n8n's own features on every
119
+ plan, with no Awesomate gate, limit or count: the user creates them in n8n
120
+ and in cPanel. An instance tops out at 50 data tables (n8n's cap). Reading
121
+ tables or credentials from here needs the "Let Claude Code work with your
122
+ automations" toggle (§0(a)).
123
+
124
+ If the user's plan doesn't cover what branch (b) needs, say it once ("app
125
+ databases are on Support Plus"), point them at hub.awesomate.ai/billing to
126
+ upgrade, then help fully within what their plan allows: on Essentials (a)
127
+ and (c) still work, and so does (d), keeping the data where it already lives
128
+ and connecting to it.
139
129
 
140
130
  Report every result as a business outcome: "your workflow now remembers
141
131
  every invoice it's processed, so no customer gets emailed twice" — with
@@ -242,7 +242,7 @@ MCP, so say that rather than stopping.
242
242
  | `awesomate_domain_add` | Attach a custom domain to a site |
243
243
  | `awesomate_dns_check` | Live answer to "where does this domain actually point" — before and after any DNS change |
244
244
  | `awesomate_site_uptime` | 30-day availability, incidents, downtime per domain (cached, free) |
245
- | `awesomate_site_audit` | SEO + AEO build gates for one page, fetched as GPTBot — content present without JS, retrieval bots reachable, canonical, schema, structure, speed. Not plan-gated. Run it after any public-page change, and see the awesomate-seo skill for the fixes |
245
+ | `awesomate_site_audit` | SEO + AEO build gates for one page, fetched as OAI-SearchBot (what ChatGPT search sees) — content present without JS, retrieval bots reachable, canonical, schema, structure, speed. Not plan-gated. Run it after any public-page change, and see the awesomate-seo skill for the fixes |
246
246
  | `awesomate_files` | Files on their automation account (public/, private/, temp/): put an image or download up and hand back its `public_url`, fetch what a workflow wrote, tidy a folder. Ask before make_public, a move into public/, or delete; `trash` shows what was deleted, and `empty_trash` erases it for good (show what goes, get a clear yes). Support Plus+, owner's file-folders switch on (`status` says what's missing). Guide: https://hub.awesomate.ai/docs/mcp/guides/files/ |
247
247
  | `awesomate_snapshot_site` | Before ANY change to a live site — files + DB restore point |
248
248
  | `awesomate_list_snapshots` | What restore points a site has |
@@ -1,17 +1,19 @@
1
1
  ---
2
2
  name: awesomate-n8n
3
- description: Build, test, and fix the user's Awesomate-hosted n8n automations, data tables, and AI agents. Use when the user says "build me an automation", "automate this", "connect X to Y", "why did my workflow fail", "create a data table", "build an AI agent / chatbot", "make an n8n agent", "an agent I can talk to in Slack/Telegram", "what automations do I have", "what could I automate", or mentions n8n, workflows, executions, webhooks, the 1Brain node, or {slug}.awesomate.io. Reads and n8n Agents on every plan; building workflows needs Support Plus+. Companion to awesomate-hosting: same connection, same PAT.
3
+ description: Build, test, and fix the user's Awesomate-hosted n8n automations, data tables, and AI agents. Use when the user says "build me an automation", "automate this", "connect X to Y", "why did my workflow fail", "create a data table", "build an AI agent / chatbot", "make an n8n agent", "an agent I can talk to in Slack/Telegram", "what automations do I have", "what could I automate", or mentions n8n, workflows, executions, webhooks, the 1Brain node, or {slug}.awesomate.io. Reads and n8n Agents on every plan; installing Awesomate templates needs Support Plus+; workflows are built through the client's own n8n MCP server, which Awesomate never sees or limits. Companion to awesomate-hosting: same connection, same PAT.
4
4
  ---
5
5
 
6
- # Awesomate n8n — your automations from Claude Code
6
+ # Awesomate n8n: your automations from Claude Code
7
7
 
8
8
  The user's business runs n8n workflows on an Awesomate-hosted instance. You
9
9
  can know their WHOLE instance (every workflow, every node, every connection),
10
10
  look up live documentation for 500+ nodes and 2,500+ community templates,
11
- and — on Support Plus and above, with consent — build, test, and safely
12
- change automations, data tables, and AI agents. Their n8n API key never
13
- reaches this machine; every write is consent-gated, quota-limited, and
14
- audited on Awesomate's side.
11
+ read every execution node by node, build n8n Agents, and install Awesomate's
12
+ curated templates. Workflows themselves are written through the instance's
13
+ OWN MCP server (n8n 2.x ships one), which the user connects to their Claude
14
+ Code. Awesomate never sees that traffic, sets no limits on it and keeps no
15
+ count. Their n8n API key never reaches this machine; every hub read is
16
+ consent-gated and audited on Awesomate's side.
15
17
 
16
18
  **Routing rule:** live facts about THEIR instance come from tools; judgment
17
19
  and patterns come from references; node schemas come from
@@ -24,24 +26,27 @@ as outcomes ("your form now emails you") with URLs.
24
26
 
25
27
  ## 0. First run (every session)
26
28
 
27
- 1. `awesomate_whoami` — n8n tools act on whichever ACCOUNT this folder
28
- resolves to. Wrong slug → stop and fix the pin/connection first. Every
29
- tool response is stamped `account: <slug>` — watch it.
30
- 2. `awesomate_n8n_context` — cache the result:
31
- - `consented: false` → give the user the `settingsUrl` and tell them
29
+ 1. `awesomate_whoami`: n8n tools act on whichever ACCOUNT this folder
30
+ resolves to. Wrong slug? Stop and fix the pin/connection first. Every
31
+ tool response is stamped `account: <slug>`. Watch it.
32
+ 2. `awesomate_n8n_context`, and cache the result:
33
+ - `consented: false`: give the user the `settingsUrl` and tell them
32
34
  where it lands: **n8n → Settings → Privacy** at
33
- `hub.awesomate.ai/settings?tab=privacy` → "Build and change automations from Claude Code". Privacy moved there; the plain `/settings` page no longer
34
- has it (old `?tab=privacy` links just redirect). Wait, then re-check.
35
- - `403 missingScopes` → token predates n8n support — reconnect from
35
+ `hub.awesomate.ai/settings?tab=privacy` → "Let Claude Code work with
36
+ your automations". Privacy moved there; the plain `/settings` page no
37
+ longer has it (old `?tab=privacy` links just redirect). Wait, then
38
+ re-check.
39
+ - `403 missingScopes`: the token predates n8n support. Reconnect from
36
40
  hub.awesomate.ai/claude (Connect Claude Code card).
37
- - `capabilities.builder: false` → reads only; building is Support Plus+.
38
- Be honest about it once, then help fully within reads.
39
- - `capabilities.variant` → FFMPEG variants have the media community
40
- nodes; Standard does not. Never assume a node exists — verify.
41
- - `limits` → daily build/test/datatable quotas; don't burn tests.
42
- - `instance` → community packages + counts (your recon baseline).
41
+ - `capabilities.templateInstall: false`: Awesomate template installs
42
+ (§3a) are Support Plus+. Be honest about it once, then help fully with
43
+ everything else: reads, n8n Agents, and building through their own n8n
44
+ MCP server all work on every plan.
45
+ - `capabilities.variant`: FFMPEG variants have the media community
46
+ nodes; Standard does not. Never assume a node exists. Verify.
47
+ - `instance`: community packages + counts (your recon baseline).
43
48
  3. **Inventory pass** (before designing or diagnosing anything):
44
- `awesomate_n8n_workflows` (no id — every workflow as a node summary in
49
+ `awesomate_n8n_workflows` (no id: every workflow as a node summary in
45
50
  ONE call) and, as needed, `awesomate_n8n_inspect` for `nodes`,
46
51
  `credentials`, `variables`, `datatables`. Cache this world picture for
47
52
  the session; refresh after your own writes.
@@ -54,19 +59,19 @@ as outcomes ("your form now emails you") with URLs.
54
59
  map, add its `instructionLine` from `awesomate_business_map` action `job`.
55
60
 
56
61
  Read [references/platform-notes.md](references/platform-notes.md) BEFORE
57
- designing or diagnosing — it is the live truth for THIS platform ($vars not
62
+ designing or diagnosing. It is the live truth for THIS platform ($vars not
58
63
  $env, `$json.body`, task-runner limits, activation semantics). When it
59
64
  conflicts with anything under `references/vendor/`, platform-notes wins.
60
65
 
61
- ## 0a. Health sweep — the guardian pattern
66
+ ## 0a. Health sweep: the guardian pattern
62
67
 
63
68
  At the START of any n8n session, alongside the context call: run
64
69
  `awesomate_n8n_errors` **with `days: 7`** and `awesomate_n8n_kpis` once. The
65
- `days` parameter is not optional in practice — the tool defaults to **30**,
70
+ `days` parameter is not optional in practice: the tool defaults to **30**,
66
71
  so omitting it sweeps a month and dresses old, already-fixed failures up as
67
72
  this week's news. If something is failing, surface it in ONE line in the
68
- user's language — "two of your automations failed overnight — want me to
69
- look?" — before proceeding with the asked task. If everything is green, say
73
+ user's language ("two of your automations failed overnight. Want me to
74
+ look?") before proceeding with the asked task. If everything is green, say
70
75
  nothing and get on with it. Never let the sweep hijack the session; the
71
76
  user's ask comes first unless they say otherwise.
72
77
 
@@ -74,63 +79,64 @@ user's ask comes first unless they say otherwise.
74
79
  instance has no error history and no error-reporter workflow installed yet,
75
80
  so the sweep returns empty for the same reason it would on a flawless one.
76
81
  Check the inventory before you interpret it: no workflows, or workflows with
77
- no executions, means *there is nothing here yet* — say that, plainly
78
- ("nothing has run yet, so there's nothing to report — want to build the
82
+ no executions, means *there is nothing here yet*. Say that, plainly
83
+ ("nothing has run yet, so there's nothing to report. Want to build the
79
84
  first one?"). Never let "no errors found" imply "everything is working".
80
85
 
81
86
  When diagnosing, trust `errorSummary` only when `confident: true` (it then
82
87
  also carries `errorType`, `code`, `lastNodeExecuted`). When `confident:
83
- false`, the failing-node name came from a heuristic and may be WRONG — verify
88
+ false`, the failing-node name came from a heuristic and may be WRONG. Verify
84
89
  the named node actually exists in the workflow before editing anything.
85
90
 
86
91
  ## 1. Tools
87
92
 
88
93
  | Task | Tool |
89
94
  |---|---|
90
- | Session context, consent, quotas, fingerprint | `awesomate_n8n_context` |
95
+ | Session context, consent, capabilities, fingerprint | `awesomate_n8n_context` |
91
96
  | All workflows (node-level summaries) / one workflow (`detail: full\|structure`) | `awesomate_n8n_workflows` |
92
97
  | Node inventory, datatables (+rows), possibilities, credentials, $vars | `awesomate_n8n_inspect` |
93
98
  | Instance KPIs: exec totals, error rate, avg/p95 duration, time saved, 7d-vs-prior deltas (per-workflow adds `last_error_at` + `clean_days`) | `awesomate_n8n_kpis` |
94
- | Instance-WIDE error events grouped by fingerprint (category, workflow, node, occurrences, first/last seen) — "what is broken across everything" | `awesomate_n8n_errors` |
99
+ | Instance-WIDE error events grouped by fingerprint (category, workflow, node, occurrences, first/last seen): "what is broken across everything" | `awesomate_n8n_errors` |
95
100
  | Execution/table/DB byte sizes + 24h per-workflow offenders ("your executions weigh 4GB") | `awesomate_n8n_storage` |
96
101
  | AI error-analyzer findings: clientSummary, needsClientAction, fixReady (Pro/Embedded + the **"Enable AI Error Diagnosis"** toggle under n8n → Settings → Privacy; read-only) | `awesomate_n8n_findings` |
97
- | Account-wide numbers in one call: executions by status, error rate, time saved, workflows total/active, chat sessions, 7-day trend, most recent live failure — the single best source for a status update or weekly report | `awesomate_dashboard_metrics` |
102
+ | Account-wide numbers in one call: executions by status, error rate, time saved, workflows total/active, chat sessions, 7-day trend, most recent live failure. The single best source for a status update or weekly report | `awesomate_dashboard_metrics` |
98
103
  | Executions list / detail / node-by-node debug | `awesomate_n8n_executions` |
99
104
  | Node schemas, node search, community templates, node-level validation | `awesomate_n8n_node_docs` |
100
- | Validate / create draft / update draft / activate / promote / rollback / delete draft | `awesomate_n8n_deploy` |
101
105
  | **n8n Agents** (the Agents tab, n8n 2.41+, every plan): status, then create / edit / validate / test / publish / channels via n8n's own agent tools | `awesomate_n8n_agents` |
102
- | Fire a test payload at an active workflow | `awesomate_n8n_test` |
103
- | Awesomate's template library: list, detail, install_plan (pauses on a missing credential), install, redeem, installs, activate, test, rollback | `awesomate_n8n_library` |
106
+ | Awesomate's template library (Support Plus+): list, detail, install_plan (pauses on a missing credential), install, redeem, installs, activate, test, rollback | `awesomate_n8n_library` |
104
107
  | Book a session with the Awesomate team from their credits (session_types, slots, book, mine) | `awesomate_book_session` |
105
- | Create/alter data tables, write rows | `awesomate_n8n_datatable_write` |
106
- | Provision a Postgres DB + n8n credential | `awesomate_n8n_provision_pg` |
107
- | Wire a tested webhook workflow into one of their hosted apps (stores URL + secret on the app; returns the secret ONCE for the workflow's header check) | `awesomate_n8n_attach_to_app` |
108
+ | Wire any production webhook URL on their n8n into one of their hosted apps (stores URL + secret on the app; returns the secret ONCE for the workflow's header check) | `awesomate_n8n_attach_to_app` |
108
109
  | Refresh these skills from the latest package | `awesomate_skill_update` |
109
110
 
111
+ **Writing workflows is not an Awesomate tool.** Creating, editing, publishing
112
+ and running a workflow happens through the n8n instance's own MCP server,
113
+ connected to this Claude Code by the user (§3, Phase 4). Reads, agents,
114
+ template installs and app wiring are the hub's; the workflow JSON goes
115
+ straight to their n8n.
116
+
110
117
  No `awesomate_n8n_*` tools in this session (fresh bootstrap, or the server
111
- didn't load)? Suggest a Claude Code restart once — then BUILD ANYWAY:
112
- [references/rest-fallback.md](references/rest-fallback.md) maps every tool
113
- to its REST endpoint, and the full loop works over it. Never tell the user
114
- they're blocked on a restart.
118
+ didn't load)? Suggest a Claude Code restart once. If the n8n MCP server IS
119
+ connected, you can still design and write workflows with it meanwhile; you
120
+ just cannot ground the design in the hub's inventory or read executions
121
+ until the Awesomate tools are back.
115
122
 
116
- ## 2. References — read on demand
123
+ ## 2. References: read on demand
117
124
 
118
125
  | When | Read |
119
126
  |---|---|
120
127
  | Before any design or diagnosis | [platform-notes.md](references/platform-notes.md) |
121
128
  | Designing tests, judging "is it done" | [testing-policy.md](references/testing-policy.md) |
122
129
  | Anything involving data tables | [datatables.md](references/datatables.md) |
123
- | An **n8n Agent** (Agents tab, Slack/Telegram channels, schedules, "set it up once, use it anywhere") — or unsure which kind of agent | [n8n-agents.md](references/n8n-agents.md) |
130
+ | An **n8n Agent** (Agents tab, Slack/Telegram channels, schedules, "set it up once, use it anywhere"), or unsure which kind of agent | [n8n-agents.md](references/n8n-agents.md) |
124
131
  | An AI Agent NODE inside a workflow / LLM steps | [ai-agents.md](references/ai-agents.md) |
125
132
  | A workflow is failing | [troubleshooting.md](references/troubleshooting.md) |
126
133
  | Error plans, error workflows, notify-the-owner on failure | [error-handling.md](references/error-handling.md) |
127
134
  | A weekly business report / "email me my numbers" | [recurring-reports.md](references/recurring-reports.md) |
128
- | Changing a LIVE workflow | [upgrade-loop.md](references/upgrade-loop.md) |
129
135
  | "What could I automate?" | [possibilities.md](references/possibilities.md) |
130
136
  | WordPress form → n8n | [wp-form-handler.md](references/wp-form-handler.md) |
131
137
  | **1Brain** in a workflow or agent: procedures, SOPs, policies, the `CUSTOM.oneBrain` node (check it is on the instance first). Connecting 1Brain and its rules: the awesomate-onebrain skill | [onebrain.md](references/onebrain.md) |
132
138
  | A person must **approve before the automation acts** (a quote, a refund, a reply it wrote): Hold for a decision and a Wait | [decisions.md](references/decisions.md) |
133
- | A designed page served BY n8n — form, phone capture mini-app, approval page, status page | [webhook-pages.md](references/webhook-pages.md) |
139
+ | A designed page served BY n8n: form, phone capture mini-app, approval page, status page | [webhook-pages.md](references/webhook-pages.md) |
134
140
  | Expression syntax details | [vendor/expressions/](references/vendor/expressions/SKILL.md) |
135
141
  | Code-node JavaScript | [vendor/code-node/](references/vendor/code-node/SKILL.md) |
136
142
  | Node configuration patterns | [vendor/node-configuration/](references/vendor/node-configuration/SKILL.md) |
@@ -139,55 +145,85 @@ they're blocked on a restart.
139
145
 
140
146
  ## 3. The build loop (follow ALL six phases)
141
147
 
142
- **Phase 1 — Discovery.** Understand inputs/outputs, trigger, success
143
- criteria, error handling — in the user's words. Check the inventory FIRST:
148
+ **Phase 1: Discovery.** Understand inputs/outputs, trigger, success
149
+ criteria, error handling, in the user's words. Check the inventory FIRST:
144
150
  reuse existing credentials, $vars, tables, workflows. Email decision tree:
145
151
  existing Gmail/Google credential → reference its ID · none → offer an
146
- API-key credential (SMTP / Resend / SendGrid — instant) OR guided Gmail
152
+ API-key credential (SMTP / Resend / SendGrid, instant) OR guided Gmail
147
153
  OAuth. A credential existing ≠ working.
148
154
 
149
155
  **Say the credential catch before they pick, not after it fails.** No tool
150
- creates a credential on their instance — the one exception is
151
- `awesomate_n8n_provision_pg`, which makes a Postgres one. Everything else,
152
- API-key credentials included, the user creates in n8n at
153
- `{instanceUrl}/home/credentials`; you then re-check the inventory to verify
154
- it exists. **Gmail and any other OAuth credential can only ever be finished
155
- in the browser** — the consent screen is Google's, so that branch always
156
- ends with them, no matter what you try. Flag it while they're choosing:
157
- *"Either way you'll paste it in on your n8n — an SMTP or Resend key is one
158
- box and a minute; Gmail means clicking through Google's permission screen.
159
- Tell me which and I'll give you the exact steps, then pick it up from
160
- there."*
161
-
162
- **Phase 2 — Design.** Resolve EVERY planned node and typeVersion via
163
- `awesomate_n8n_node_docs` (search similar community templates too — a
156
+ creates a credential on their instance. Every credential, API-key ones
157
+ included, the user creates in n8n at `{instanceUrl}/home/credentials`; you
158
+ then re-check the inventory to verify it exists. **Gmail and any other OAuth
159
+ credential can only ever be finished in the browser**: the consent screen is
160
+ Google's, so that branch always ends with them, no matter what you try. Flag
161
+ it while they're choosing: *"Either way you'll paste it in on your n8n. An
162
+ SMTP or Resend key is one box and a minute; Gmail means clicking through
163
+ Google's permission screen. Tell me which and I'll give you the exact steps,
164
+ then pick it up from there."*
165
+
166
+ **Phase 2: Design.** Resolve EVERY planned node and typeVersion via
167
+ `awesomate_n8n_node_docs` (search similar community templates too: a
164
168
  proven template beats a blank canvas). Propose the architecture as an arrow
165
169
  diagram (`Webhook -> Validate -> Send Email -> Respond`). Reasoning/
166
170
  execution separation; descriptive node names; every external call has an
167
171
  error plan. Externally-called workflows use a **webhook trigger with an
168
- explicit path** — never a Form Trigger. Data the automation must remember
172
+ explicit path**, never a Form Trigger. Data the automation must remember
169
173
  between runs → data table ([datatables.md](references/datatables.md)).
170
174
 
171
- **Phase 3 — Confirmation.** Present the design in plain words and wait for
175
+ **Phase 3: Confirmation.** Present the design in plain words and wait for
172
176
  explicit approval. Never create anything on their instance without it.
173
177
 
174
- **Phase 4 — Implementation.** Compose the workflow JSON →
175
- `awesomate_n8n_deploy {action:'validate'}` and fix every error-severity
176
- issue → `{action:'create_draft'}` (the hub prefixes `[CLI] `, tags
177
- `awm:client-cli`, pre-assigns webhookIds, returns webhook URLs). Create any
178
- data tables with `workflowId` set so they land in the workflow's project.
179
- Iterate on the draft with `{action:'update_draft'}` — never recreate.
180
-
181
- **Phase 5 — Testing (mandatory — validated ≠ tested).** Full policy:
178
+ **Phase 4: Implementation, through their n8n's own MCP server.** Writing
179
+ happens on their n8n, not through Awesomate.
180
+
181
+ - **Is it connected?** Look for the n8n server's tools in this session
182
+ (`search_workflows`, `get_workflow_details`, `create_workflow`,
183
+ `update_workflow`, `publish_workflow`, `execute_workflow`; the server is
184
+ usually named `n8n`). If they are there, build.
185
+ - **If it is not connected, say so and hand the user the two steps.** Do not
186
+ pretend any Awesomate tool can create or change a workflow; none can.
187
+ 1. Switch on MCP access and get the key, in their own n8n: **Settings →
188
+ MCP access** on `{instanceUrl}`. The hub's **Set it up for me** button
189
+ under **n8n Agents access** on `hub.awesomate.ai/n8n/settings` also
190
+ switches MCP access on. The key is theirs; never ask them to paste it
191
+ into the chat.
192
+ 2. Add it to their Claude Code, in a terminal, with their own key in place
193
+ of the placeholder:
194
+ `claude mcp add --transport http n8n {instanceUrl}/mcp-server/http --header "Authorization: Bearer <their MCP key>"`
195
+ then restart Claude Code and carry on. Until then, keep designing:
196
+ everything up to Phase 3 needs only the Awesomate reads.
197
+ - Compose the workflow JSON from the approved design. Check every node
198
+ against `awesomate_n8n_node_docs validate_node` before you write it, and
199
+ fix every error-severity issue (known false positives are listed in
200
+ platform-notes). Keep `settings.saveExecutionProgress` false yourself; the
201
+ hub no longer enforces it.
202
+ - Create it with the n8n server's create tool. It lands unpublished. Give
203
+ the workflow a name the user will recognise in their n8n list; nothing
204
+ prefixes or tags it for you now. A webhook's production URL is
205
+ `{instanceUrl}/webhook/<path>`: take the path from the workflow you
206
+ created and `instanceUrl` from `awesomate_n8n_context`; never guess the
207
+ hostname.
208
+ - Data tables: the user creates them in n8n (Data tables in the left menu),
209
+ or you do it through the n8n server if it offers a data-table tool; read
210
+ them back with `awesomate_n8n_inspect {what:'datatables'}` and reference
211
+ them by name. Full rules: [datatables.md](references/datatables.md).
212
+ - Iterate with the n8n server's update tool on the same workflow id. Never
213
+ recreate under a new id: the webhook URLs change.
214
+
215
+ **Phase 5: Testing (mandatory; validated ≠ tested).** Full policy:
182
216
  [testing-policy.md](references/testing-policy.md). Short form: approval →
183
- activate → `awesomate_n8n_test` with obviously-fake payloads → inspect the
184
- execution node-by-node (`awesomate_n8n_executions` with `debug: true` when
185
- available) → happy path + empty + malformed + error-branch routing → report
186
- what ran and what the human must verify ("check your inbox").
217
+ publish through the n8n server → run it (the n8n server's execute tool, a
218
+ POST to the production webhook with obviously fake data, or ask the user to
219
+ trigger it) → inspect the execution node-by-node (`awesomate_n8n_executions`
220
+ with `debug: true`) → happy path + empty + malformed + error-branch routing →
221
+ report what ran and what the human must verify ("check your inbox").
187
222
 
188
- **Phase 6 — Wrap-up.** Give the workflow URL (`{instanceUrl}/workflow/{id}`),
189
- the webhook URL, and what happens next. Delete unneeded drafts
190
- (`delete_draft`, deactivated only).
223
+ **Phase 6: Wrap-up.** Give the workflow URL (`{instanceUrl}/workflow/{id}`),
224
+ the webhook URL, and what happens next. Remove any temporary test triggers
225
+ and, with their OK, any throwaway workflows you created along the way
226
+ (unpublish first, then delete, through the n8n server).
191
227
 
192
228
  ## 3a. Installing an Awesomate template (bundle)
193
229
 
@@ -243,12 +279,27 @@ check; use it when the member has a token, otherwise use the catalog.
243
279
 
244
280
  ## 4. Changing a LIVE workflow
245
281
 
246
- Never edit a live workflow directly, and never "activate the copy" — the
247
- copy has different webhook URLs and every external caller breaks. Draft →
248
- test → present a human-readable diff → explicit approval → `promote` (swaps
249
- the tested draft INTO the live id, webhookIds preserved) → verify the
250
- ORIGINAL URL → `rollback` with the returned operationId on any failure.
251
- Full procedure: [upgrade-loop.md](references/upgrade-loop.md).
282
+ A live workflow is changed through the n8n server's update tool on its OWN
283
+ id, then republished. **Never build a copy and "activate the copy" in its
284
+ place**: the copy has different webhook URLs and every external caller
285
+ breaks. The order:
286
+
287
+ 1. Read the live workflow (`get_workflow_details`) and the inventory; note
288
+ its webhook paths and `settings.errorWorkflow`.
289
+ 2. Make the change in a throwaway copy first when the edit is more than a
290
+ parameter tweak, test it there, and read the execution with
291
+ `awesomate_n8n_executions` debug. The copy is for testing only; it never
292
+ goes live.
293
+ 3. Present a human-readable diff of what will change in the live one and
294
+ wait for explicit approval.
295
+ 4. Apply the same change to the LIVE workflow id with the update tool, keep
296
+ the webhook paths, and republish it.
297
+ 5. Verify the ORIGINAL URL still answers (a test fire or the user's own
298
+ trigger), then inspect the new run. Delete the throwaway copy.
299
+
300
+ There is no automatic rollback now. Before step 4 keep the live workflow's
301
+ full JSON from step 1 so that, if the new version misbehaves, you can put the
302
+ previous one back with the same update tool.
252
303
 
253
304
  ## 5. Diagnosing a failure
254
305
 
@@ -257,36 +308,42 @@ usually upstream) → `debug: true` for node-level output → check against
257
308
  [troubleshooting.md](references/troubleshooting.md) → explain in the user's
258
309
  terms with the exact fix. Trust `errorSummary` only on `confident: true`
259
310
  (§0a). While you're there, check whether the workflow has an error plan at
260
- all — [error-handling.md](references/error-handling.md). Self-built workflows: fix via update_draft or the
261
- upgrade loop. Agency-managed (`agency_managed` error): read and explain
262
- freely, and switch it off or on if the user asks (say what it does first);
263
- any other change goes through Awesomate support.
311
+ all ([error-handling.md](references/error-handling.md)). Self-built
312
+ workflows: fix through the n8n server's update tool (§4 when it is live), then
313
+ re-run and re-inspect. Agency-managed (`agency_managed` error): read and
314
+ explain freely, and switch it off or on if the user asks (say what it does
315
+ first); any other change goes through Awesomate support.
264
316
 
265
317
  ## 6. "What could I automate?"
266
318
 
267
319
  `awesomate_n8n_inspect {what:'possibilities'}` returns facts; YOU make the
268
- suggestions — grounded, ≤8, honestly labelled with what each needs. Rules:
320
+ suggestions: grounded, ≤8, honestly labelled with what each needs. Rules:
269
321
  [possibilities.md](references/possibilities.md). Offer it once, in one
270
322
  sentence, after the first inventory pass when the user's ask is vague. One
271
- standing recipe worth offering: the weekly business pulse —
272
- [recurring-reports.md](references/recurring-reports.md).
323
+ standing recipe worth offering: the weekly business pulse
324
+ ([recurring-reports.md](references/recurring-reports.md)).
273
325
 
274
326
  ## 7. Hard rules
275
327
 
276
- - **Never ask for their n8n API key.** Unreachable = consent/scope/plan —
277
- route to settings or reconnect.
278
- - **Explicit approval gates:** before create_draft (design confirmation),
279
- activate, promote, rollback, delete (draft or rows), and any test with
280
- non-email side effects (CRM writes, payments: STOP and ask).
281
- - **Agency-deployed workflows and their data tables are read-only** — the
282
- hub enforces it; don't fight the 403.
283
- - **Never activate a copy of a live workflow.** Promote exists for this.
284
- - **Respect quotas** — 429 quota_exceeded is the plan's daily cap; tell the
285
- user, don't retry-loop.
286
- - **`saveExecutionProgress` stays false.** The hub enforces it; don't work
287
- around it.
288
- - **Real side effects run in tests** — user's own email, `[TEST]` prefixes,
289
- tell them first.
328
+ - **Never ask for their n8n API key, or their n8n MCP key.** Unreachable =
329
+ consent/scope/plan: route to settings or reconnect. The MCP key goes into
330
+ their own `claude mcp add` command, never into the chat.
331
+ - **Explicit approval gates:** before creating a workflow (design
332
+ confirmation), publishing, changing a live workflow, deleting anything
333
+ (workflows or rows), installing or rolling back a template, and any test
334
+ with non-email side effects (CRM writes, payments: STOP and ask).
335
+ - **Agency-deployed workflows and their data tables are read-only.** The
336
+ hub enforces it for its own tools; honour it through the n8n server too.
337
+ Switch on/off only, on the user's say-so; every other change goes to
338
+ Awesomate support.
339
+ - **Never activate a copy of a live workflow.** Change the live one on its
340
+ own id (§4).
341
+ - **`saveExecutionProgress` stays false.** Nothing enforces it for you any
342
+ more: set it false on every workflow you write and never switch it on to
343
+ get richer debug data (`debug: true` on executions is the inspection
344
+ path).
345
+ - **Real side effects run in tests:** the user's own email, `[TEST]`
346
+ prefixes, tell them first.
290
347
  - **WordPress forms:** POST server-side from WP to the webhook (forwarder
291
- snippet — [wp-form-handler.md](references/wp-form-handler.md)), never
348
+ snippet, [wp-form-handler.md](references/wp-form-handler.md)), never
292
349
  from the browser.
@@ -8,7 +8,8 @@ triggers.
8
8
  ## Pass criteria
9
9
 
10
10
  1. The right primitive: the build uses `awesomate_n8n_agents` (an n8n Agent),
11
- not a workflow with a Chat Trigger + AI Agent node via `awesomate_n8n_deploy`.
11
+ not a workflow with a Chat Trigger + AI Agent node written through the n8n
12
+ MCP server.
12
13
  2. Setup is checked first: `awesomate_n8n_agents {action:"status"}` is called
13
14
  before any `create_agent`. If it reports `keyConfigured:false` or a setup
14
15
  code, the assistant relays the setup steps in plain words and does NOT ask