@awesomate/hosting-mcp 0.12.0 → 0.13.0
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.
- package/dist/index.js +204 -8
- package/package.json +2 -2
- package/skill/awesomate-app-builder/SKILL.md +5 -1
- package/skill/awesomate-credentials/SKILL.md +1 -1
- package/skill/awesomate-hosting/SKILL.md +50 -159
- package/skill/awesomate-hosting/references/connect-troubleshooting.md +77 -0
- package/skill/awesomate-hosting/references/multi-account.md +33 -0
- package/skill/awesomate-hosting/references/rest-fallback.md +30 -0
- package/skill/awesomate-hosting/scripts/bootstrap.mjs +27 -7
- package/skill/awesomate-n8n/SKILL.md +153 -147
- package/skill/awesomate-n8n/evals/ai-agent-build/graders/grader.md +31 -0
- package/skill/awesomate-n8n/evals/ai-agent-build/prompt.md +1 -0
- package/skill/awesomate-n8n/evals/build-form-email/graders/grader.md +30 -0
- package/skill/awesomate-n8n/evals/build-form-email/prompt.md +1 -0
- package/skill/awesomate-n8n/evals/datatable-dedupe/graders/grader.md +32 -0
- package/skill/awesomate-n8n/evals/datatable-dedupe/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/diagnose-failure/graders/grader.md +27 -0
- package/skill/awesomate-n8n/evals/diagnose-failure/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/essentials-upsell/graders/grader.md +27 -0
- package/skill/awesomate-n8n/evals/essentials-upsell/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/live-change-promote/graders/grader.md +35 -0
- package/skill/awesomate-n8n/evals/live-change-promote/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/possibilities-grounded/graders/grader.md +28 -0
- package/skill/awesomate-n8n/evals/possibilities-grounded/prompt.md +1 -0
- package/skill/awesomate-n8n/evals/validated-not-done/graders/grader.md +27 -0
- package/skill/awesomate-n8n/evals/validated-not-done/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/vars-not-env/graders/grader.md +26 -0
- package/skill/awesomate-n8n/evals/vars-not-env/prompt.md +2 -0
- package/skill/awesomate-n8n/evals/webhook-body-fix/graders/grader.md +26 -0
- package/skill/awesomate-n8n/evals/webhook-body-fix/prompt.md +3 -0
- package/skill/awesomate-n8n/references/ai-agents.md +135 -0
- package/skill/awesomate-n8n/references/datatables.md +105 -0
- package/skill/awesomate-n8n/references/{node-recipes.md → platform-notes.md} +56 -7
- package/skill/awesomate-n8n/references/possibilities.md +83 -0
- package/skill/awesomate-n8n/references/testing-policy.md +115 -0
- package/skill/awesomate-n8n/references/troubleshooting.md +69 -0
- package/skill/awesomate-n8n/references/upgrade-loop.md +98 -0
- package/skill/awesomate-n8n/references/vendor/MANIFEST.json +26 -0
- package/skill/awesomate-n8n/references/vendor/code-node/BUILTIN_FUNCTIONS.md +779 -0
- package/skill/awesomate-n8n/references/vendor/code-node/COMMON_PATTERNS.md +1123 -0
- package/skill/awesomate-n8n/references/vendor/code-node/DATA_ACCESS.md +797 -0
- package/skill/awesomate-n8n/references/vendor/code-node/ERROR_PATTERNS.md +776 -0
- package/skill/awesomate-n8n/references/vendor/code-node/SKILL.md +703 -0
- package/skill/awesomate-n8n/references/vendor/expressions/COMMON_MISTAKES.md +406 -0
- package/skill/awesomate-n8n/references/vendor/expressions/EXAMPLES.md +496 -0
- package/skill/awesomate-n8n/references/vendor/expressions/SKILL.md +525 -0
- package/skill/awesomate-n8n/references/vendor/node-configuration/DEPENDENCIES.md +743 -0
- package/skill/awesomate-n8n/references/vendor/node-configuration/OPERATION_PATTERNS.md +926 -0
- package/skill/awesomate-n8n/references/vendor/node-configuration/SKILL.md +583 -0
- package/skill/awesomate-n8n/references/vendor/validation/ERROR_CATALOG.md +781 -0
- package/skill/awesomate-n8n/references/vendor/validation/FALSE_POSITIVES.md +695 -0
- package/skill/awesomate-n8n/references/vendor/validation/SKILL.md +414 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/SKILL.md +413 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/ai_agent_workflow.md +797 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/database_operations.md +798 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/http_api_integration.md +747 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/scheduled_tasks.md +786 -0
- package/skill/awesomate-n8n/references/vendor/workflow-patterns/webhook_processing.md +558 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Possibilities — grounding "what could I automate?"
|
|
2
|
+
|
|
3
|
+
Rules for suggesting automations. Every idea must be grounded in this
|
|
4
|
+
instance's real inventory — never in what n8n generically supports.
|
|
5
|
+
|
|
6
|
+
## When to offer ideas
|
|
7
|
+
|
|
8
|
+
| Situation | Action |
|
|
9
|
+
|---|---|
|
|
10
|
+
| Explicit ask ("what could I automate", "give me ideas", "what else") | Run the inspect, present the tiers below |
|
|
11
|
+
| Vague request, right after the first inventory pass | ONE offering sentence ("Based on what you have connected I can suggest a few automations — want that?"), then wait |
|
|
12
|
+
| Anything else | Never volunteer an unprompted idea dump |
|
|
13
|
+
|
|
14
|
+
## Data source — facts only
|
|
15
|
+
|
|
16
|
+
`awesomate_n8n_inspect {what:'possibilities'}` returns facts, zero ideas.
|
|
17
|
+
Ideation is your job; this payload is the ground truth you build on:
|
|
18
|
+
|
|
19
|
+
| Field | Meaning |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `services[]` | Connected services: `service`, `credentials` (count), `credentialNames` (≤3 names), `confirmed`, `nodeType` (native n8n node or null), `usedInWorkflows` (inventory refs), `activeInWorkflows` (node present in the LIVE histogram) |
|
|
22
|
+
| `unusedConnections` | Services with a credential but no known usage. Cached inventory cross-checked against live node usage — a workflow wired up after the last weekly refresh still counts as used |
|
|
23
|
+
| `nodesInUse` | `{type, count}` histogram across the instance, descending |
|
|
24
|
+
| `aiToolsAvailable` | AI/langchain nodes on this n8n. **null = unknown (catalog down). Never say "no AI tools" on null** |
|
|
25
|
+
| `communityPackages` | `{packageName, installedVersion, nodeTypes}`. **null = unknown, [] = verified none — never collapse the two** |
|
|
26
|
+
| `counts` | `workflows`, `activeWorkflows`, `credentials`, `datatables` (null = table absent on this n8n version) |
|
|
27
|
+
|
|
28
|
+
## Presentation — at most 8 ideas, three grounded tiers
|
|
29
|
+
|
|
30
|
+
Order by concreteness. Skip a tier rather than pad it.
|
|
31
|
+
|
|
32
|
+
1. **Extend what you already have** — per existing workflow: "your
|
|
33
|
+
`<workflow name>` could also notify X / retry Y / log to a datatable".
|
|
34
|
+
Ground each in a workflow from `awesomate_n8n_workflows` plus the nodes
|
|
35
|
+
it already uses.
|
|
36
|
+
2. **New builds with existing connections** — name the actual credential:
|
|
37
|
+
"using your `<credentialNames[0]>` Gmail credential, a daily digest of…".
|
|
38
|
+
`unusedConnections` is the highest-signal list here: they connected it
|
|
39
|
+
for a reason and nothing uses it yet.
|
|
40
|
+
3. **Needs something new** — labelled honestly with exactly what:
|
|
41
|
+
a new connection ("needs a Slack credential — 2 min in your n8n UI"),
|
|
42
|
+
a plan upgrade ("builds need Support Plus+"), or the FFMPEG variant
|
|
43
|
+
("media nodes are Support Plus+ only"). Never disguise tier 3 as tier 2.
|
|
44
|
+
|
|
45
|
+
## Grounding rules (hard)
|
|
46
|
+
|
|
47
|
+
- Only suggest nodes present on THIS variant. `capabilities.variant` from
|
|
48
|
+
`awesomate_n8n_context`: Standard has no localFiles / better-ffmpeg /
|
|
49
|
+
mediafx. Check `communityPackages` before naming any community node.
|
|
50
|
+
- Only reference credentials in `services[]`. **Never claim a credential
|
|
51
|
+
works because it exists** — inventory shows names, not validity; say
|
|
52
|
+
"you have a credential named X" and verify during the build.
|
|
53
|
+
- AI-agent ideas require `aiToolsAvailable` to be a non-empty array. On
|
|
54
|
+
null, say the catalog is unavailable, not that AI is unsupported.
|
|
55
|
+
- Respect platform invariants in any sketch you show: `$vars` not `$env`,
|
|
56
|
+
webhook data at `$json.body`, HTTP Request nodes not `$helpers`, Code
|
|
57
|
+
nodes return `[{json:{...}}]`, `saveExecutionProgress` stays false,
|
|
58
|
+
webhook trigger (explicit path) instead of formTrigger. Details:
|
|
59
|
+
[platform-notes.md](platform-notes.md).
|
|
60
|
+
- Datatable-backed ideas: only when `counts.datatables` is non-null;
|
|
61
|
+
writes need Support Plus+ (`awesomate_n8n_datatable_write`); tables
|
|
62
|
+
resolve per project at runtime.
|
|
63
|
+
|
|
64
|
+
## Community templates — importable starting points
|
|
65
|
+
|
|
66
|
+
Search by the user's actually-connected services, not by the idea's topic:
|
|
67
|
+
|
|
68
|
+
- `awesomate_n8n_node_docs {tool:'search_templates', args:{query: '<service>'}}`
|
|
69
|
+
then `{tool:'get_template', args:{templateId}}` for the JSON.
|
|
70
|
+
- A template is a starting point, not a deploy: strip nodes needing
|
|
71
|
+
credentials the user lacks, then run the full build loop (validate →
|
|
72
|
+
create_draft → test) from SKILL.md §2.
|
|
73
|
+
- 503 `node_catalog_unavailable` → skip templates this session and fall
|
|
74
|
+
back to the vendored references in `references/vendor/`.
|
|
75
|
+
|
|
76
|
+
## Essentials plan
|
|
77
|
+
|
|
78
|
+
`capabilities.builder: false` → reads work, builds need Support Plus+.
|
|
79
|
+
Say so ONCE, honestly — "I can explain, diagnose, and design these, but
|
|
80
|
+
building on your instance needs Support Plus+ (upgrade at
|
|
81
|
+
hub.awesomate.ai/billing)" — then keep helping within reads: present the
|
|
82
|
+
tiers as a roadmap, sketch designs, diagnose existing workflows. Do not
|
|
83
|
+
repeat the upsell on every idea.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Testing Policy (mandatory)
|
|
2
|
+
|
|
3
|
+
A build or change is NOT done until the workflow has been EXECUTED on the
|
|
4
|
+
user's instance and the execution INSPECTED node by node.
|
|
5
|
+
`awesomate_n8n_deploy {action:'validate'}` checks structure, not behaviour —
|
|
6
|
+
a passing validate plus a green final status is never "tested".
|
|
7
|
+
|
|
8
|
+
Applies to: new builds (SKILL.md Phase 5), the upgrade loop (test the draft
|
|
9
|
+
AND re-verify after promote), and any fix to a failing workflow. Only
|
|
10
|
+
exception: the user explicitly waives testing for that specific task.
|
|
11
|
+
|
|
12
|
+
## How a test runs
|
|
13
|
+
|
|
14
|
+
There is no manual or pin-data execution on this platform. E2E = activate +
|
|
15
|
+
production webhook + poll executions:
|
|
16
|
+
|
|
17
|
+
1. Get approval to go live, then
|
|
18
|
+
`awesomate_n8n_deploy {action:'activate', workflowId}` — production
|
|
19
|
+
webhooks only respond while the workflow is active.
|
|
20
|
+
2. `awesomate_n8n_test {workflowId, payload}` — fires the PRODUCTION webhook
|
|
21
|
+
with the `X-Awesomate-Test` header; returns the webhook response plus the
|
|
22
|
+
`executionId` it caused. Real side effects DO run: emails actually send.
|
|
23
|
+
Address them to the user's own email, prefix subjects `[TEST]`, use
|
|
24
|
+
obviously fake data (`test+<runId>@…`, "TEST SUBMISSION"), and tell the
|
|
25
|
+
user before firing. Non-email side effects (CRM writes, payments, SMS):
|
|
26
|
+
STOP and ask first.
|
|
27
|
+
3. Inspect: `awesomate_n8n_executions {executionId, debug: true}` — read the
|
|
28
|
+
node list, per-node output, and which branches ran. When consent is off,
|
|
29
|
+
debug data is unavailable and the call falls back to the non-debug
|
|
30
|
+
detail (final status + failing node only) — state that in the report;
|
|
31
|
+
you inspected less than usual.
|
|
32
|
+
|
|
33
|
+
A green final status is not inspection. Do not enable
|
|
34
|
+
`saveExecutionProgress` to get richer data — the hub enforces it FALSE
|
|
35
|
+
(write-amplification incident); `debug: true` is the inspection path.
|
|
36
|
+
|
|
37
|
+
## Fixtures (payload classes)
|
|
38
|
+
|
|
39
|
+
The payload passed to `awesomate_n8n_test` is the POST body — the workflow
|
|
40
|
+
sees it at `$json.body`. Run at minimum one of each class:
|
|
41
|
+
|
|
42
|
+
| Class | Payload |
|
|
43
|
+
|---|---|
|
|
44
|
+
| happy-path | Realistic valid input, obviously fake values |
|
|
45
|
+
| empty | `{}` / missing fields entirely |
|
|
46
|
+
| malformed | Wrong types, missing required fields, junk strings |
|
|
47
|
+
| error-`<api>` | Input that drives a named upstream API to a realistic error (nonexistent id → 404, bad enum → 400) — one per external dependency |
|
|
48
|
+
|
|
49
|
+
Quota: `limits` from `awesomate_n8n_context` caps daily test fires. Plan
|
|
50
|
+
the fixture set before burning tests; a 429 `quota_exceeded` means the
|
|
51
|
+
day's cap — tell the user, never retry-loop.
|
|
52
|
+
|
|
53
|
+
## Error-path testing (required, minimum 3)
|
|
54
|
+
|
|
55
|
+
1. Failed upstream call (error-`<api>` fixture)
|
|
56
|
+
2. Empty payload
|
|
57
|
+
3. Malformed payload
|
|
58
|
+
|
|
59
|
+
Verify `onError` branches ACTUALLY ROUTE: in the execution's node list,
|
|
60
|
+
confirm the error path's nodes ran and the post-failure happy-path nodes
|
|
61
|
+
did not. Final status alone proves nothing — an execution whose error
|
|
62
|
+
branch routed can still finish green.
|
|
63
|
+
|
|
64
|
+
## Multi-trigger gotcha
|
|
65
|
+
|
|
66
|
+
`awesomate_n8n_test` reaches the webhook trigger only. A schedule (or any
|
|
67
|
+
non-webhook) branch NEVER runs from a test fire — it is untested unless
|
|
68
|
+
exercised deliberately:
|
|
69
|
+
|
|
70
|
+
- Draft phase: temporarily wire the branch behind a webhook trigger via
|
|
71
|
+
`awesomate_n8n_deploy {action:'update_draft'}`, test-fire it, then
|
|
72
|
+
REMOVE the temporary trigger before promote.
|
|
73
|
+
- Never promote or leave live a workflow carrying a temporary test
|
|
74
|
+
trigger — it is a world-callable production URL.
|
|
75
|
+
- If the branch cannot be exercised this way, list it under "needs human"
|
|
76
|
+
in the report. Do not report it as tested.
|
|
77
|
+
|
|
78
|
+
## What Claude cannot verify → human checklist
|
|
79
|
+
|
|
80
|
+
List explicitly, per test run:
|
|
81
|
+
|
|
82
|
+
- Real side effects landing (the `[TEST]` email in their inbox, the CRM
|
|
83
|
+
record, the SMS)
|
|
84
|
+
- OAuth/credential-gated calls that could not be exercised
|
|
85
|
+
- External services actually pointing at the production webhook URL
|
|
86
|
+
- Schedule/non-webhook branches that never fired (see above)
|
|
87
|
+
|
|
88
|
+
Ask the user to confirm each ("check your inbox for [TEST] …") and record
|
|
89
|
+
their answer in the report.
|
|
90
|
+
|
|
91
|
+
## Test Report (required in every handoff)
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
## Test Report — <workflow> @ <instance>
|
|
95
|
+
Executed: <executionIds + payload class for each>
|
|
96
|
+
Inspection: debug / non-debug fallback (consent off)
|
|
97
|
+
Passed: <node paths verified, outputs checked>
|
|
98
|
+
Error paths: <fixture → which branch routed → result>
|
|
99
|
+
Not verifiable by Claude (needs human): <list + why>
|
|
100
|
+
Post-test state: restored ✔ (checklist below)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Post-test state restore
|
|
104
|
+
|
|
105
|
+
- [ ] Temporary test triggers/nodes removed from drafts
|
|
106
|
+
- [ ] Test drafts deactivated; deleted via
|
|
107
|
+
`awesomate_n8n_deploy {action:'delete_draft'}` unless the user wants
|
|
108
|
+
them kept
|
|
109
|
+
- [ ] `[TEST]` rows written to datatables during tests cleaned up
|
|
110
|
+
(`awesomate_n8n_datatable_write {action:'delete_rows'}`)
|
|
111
|
+
- [ ] Live workflow's activation state matches what the user expects
|
|
112
|
+
- [ ] After a promote: the ORIGINAL production URL re-verified with a test
|
|
113
|
+
fire (promote preserves webhookIds — the old URL must still respond)
|
|
114
|
+
- [ ] User told which `[TEST]` artifacts (emails, records) to expect and
|
|
115
|
+
discard
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Troubleshooting — diagnosing a failing workflow
|
|
2
|
+
|
|
3
|
+
Diagnosis playbook. Work the flow top-to-bottom; do not jump to fixes before
|
|
4
|
+
you have the failing execution's detail.
|
|
5
|
+
|
|
6
|
+
## Diagnosis flow
|
|
7
|
+
|
|
8
|
+
1. `awesomate_n8n_context` — confirm consent flags, capabilities, and the
|
|
9
|
+
instance fingerprint before reading anything else.
|
|
10
|
+
2. `awesomate_n8n_executions {workflowId}` — list recent runs. Pick the
|
|
11
|
+
failing execution (or the first failure in a streak — later failures are
|
|
12
|
+
often downstream noise from the same cause).
|
|
13
|
+
3. `awesomate_n8n_executions {executionId}` — detail: error message, the node
|
|
14
|
+
that threw, last node executed.
|
|
15
|
+
4. **Walk the item data BACKWARDS from the failing node.** The node that
|
|
16
|
+
throws is rarely the node that is wrong — the usual cause is an upstream
|
|
17
|
+
node emitting a mis-mapped or missing field that a downstream expression
|
|
18
|
+
consumes. Compare what each upstream node emitted against what the failing
|
|
19
|
+
node's expressions expect. Read the node config with
|
|
20
|
+
`awesomate_n8n_workflows {id, detail:'full'}`.
|
|
21
|
+
5. `awesomate_n8n_executions {executionId, debug: true}` — node-level output
|
|
22
|
+
data. Requires `error_content_analysis` consent:
|
|
23
|
+
- `403 consent_required` → give the user the `settingsUrl` from the error
|
|
24
|
+
response and stop; they enable it under Settings → Privacy.
|
|
25
|
+
- `tooLarge: true` → payload over 15MB. Use the summary in the response;
|
|
26
|
+
do NOT retry hoping for the full payload.
|
|
27
|
+
6. Node behaving strangely rather than erroring → check its schema with
|
|
28
|
+
`awesomate_n8n_node_docs {tool: "get_node"}` (on `503
|
|
29
|
+
node_catalog_unavailable`, fall back to the `vendor/` references).
|
|
30
|
+
|
|
31
|
+
## Common errors → cause → fix
|
|
32
|
+
|
|
33
|
+
| Error / symptom | Likely cause | Fix |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Downstream fields empty/undefined on a webhook workflow | Webhook data lives at `$json.body`, not `$json` | Use `{{ $json.body.field }}`. #1 cause of "undefined" in webhook flows |
|
|
36
|
+
| "access to environment variables is denied" | `$env` is blocked fleet-wide — in Code nodes AND regular field expressions | Use `{{ $vars.key \|\| 'fallback' }}` or a Config Set-node literal; never `$env` |
|
|
37
|
+
| "$helpers is not defined" (works in editor preview, fails at run time) | Task runners strip `$helpers` from Code nodes | Move HTTP calls to HTTP Request nodes; process results in a downstream Code node |
|
|
38
|
+
| "Could not find the data table: '<id>'" | PROJECT scope, not existence — datatables resolve within the workflow's own project at runtime | Check which project owns the table (`awesomate_n8n_inspect {what: "datatables"}`) vs the workflow. Recreate/move the table into the workflow's project (`awesomate_n8n_datatable_write`, Support Plus+). Reference tables by name, never by id |
|
|
39
|
+
| Credential "could not be found" | Sharing/RBAC — the credential exists but is not shared with the workflow's project/owner. Almost never deletion | Verify it exists via `awesomate_n8n_inspect {what: "credentials"}`; user shares it to the project in the n8n editor |
|
|
40
|
+
| Webhook URL returns 404 | Workflow not active — production webhook paths register only while active. Test URLs work only while the editor is listening | Activate via `awesomate_n8n_deploy`. Never activate a copy — `promote` preserves webhookIds |
|
|
41
|
+
| Form URL 404s at its custom path | formTrigger ignores the custom `path`; forms serve only at `/form/<webhookId>` | Use a webhook trigger when a stable path matters |
|
|
42
|
+
| "Unrecognized node type" / unknown node at activation | Community media node on an instance without the FFMPEG variant (Support Plus+ gate) | Check `awesomate_n8n_context` capabilities; upgrade variant or rebuild on core nodes. Note: static validation flagging `CUSTOM.*` nodes "unknown" is a false positive — trust activation, not the validator |
|
|
43
|
+
| Output shows literal "[object Object]" | Expression resolves to an object where a string is expected | Drill to the scalar (`{{ $json.body.user.email }}`) or wrap in `JSON.stringify()` |
|
|
44
|
+
| Workflow saved but never executes | Draft was never activated/published; saving is not publishing | `awesomate_n8n_deploy {action: "activate"}` (new) or `promote` (replacing a live one). E2E-verify: activate + hit the production webhook + poll executions |
|
|
45
|
+
| Code node output vanishes or breaks downstream | Not returning `[{ json: {...} }]`, or leftover template boilerplate | Return an array of `{json}` objects; check whether the node is unedited boilerplate |
|
|
46
|
+
| Node config valid yesterday, "Invalid value for 'operation'" today | Partial update stripped the `operation` discriminator | Set `resource` + `operation` together in the same update; re-validate |
|
|
47
|
+
| `crashed` status, hours-long runtime, loop workflow | `saveExecutionProgress: true` (quadratic writes — 2TB WAL incident) and/or no `executionTimeout` on a `splitInBatches` loop | Keep `saveExecutionProgress` FALSE (the hub enforces it); add `executionTimeout` to every loop workflow; bound rows per run |
|
|
48
|
+
| `429 quota_exceeded` | Plan daily cap reached | STOP immediately. Do not retry-loop — tell the user the cap is hit; it resets daily or they upgrade. Limits are in `awesomate_n8n_context` |
|
|
49
|
+
|
|
50
|
+
## Verification after a fix
|
|
51
|
+
|
|
52
|
+
- Re-run realistically: `awesomate_n8n_test {workflowId, payload}` for manual
|
|
53
|
+
runs; for live paths, activate + POST the production webhook + poll
|
|
54
|
+
`awesomate_n8n_executions` until the new run appears.
|
|
55
|
+
- Inspect the fixed run's data, not just its status — an `onError: continue`
|
|
56
|
+
branch can turn a failure into a "successful" run carrying an `error` key.
|
|
57
|
+
|
|
58
|
+
## When to STOP and hand off
|
|
59
|
+
|
|
60
|
+
- **`agency_managed` error** — the workflow is managed by Awesomate. Reads
|
|
61
|
+
are fine: list it, read executions, run `debug`, and explain the failure to
|
|
62
|
+
the user freely. Do NOT attempt any change (`deploy`, `test`, datatable
|
|
63
|
+
writes) — changes to agency-managed workflows go through Awesomate support.
|
|
64
|
+
Summarize your diagnosis so the user can paste it into their ticket.
|
|
65
|
+
- `403 consent_required` the user declines to enable — diagnose from the
|
|
66
|
+
execution summary only; say plainly what deeper access would show.
|
|
67
|
+
- `429 quota_exceeded` — never burn remaining quota on retries.
|
|
68
|
+
- Fix requires the FFMPEG variant or a higher plan — explain the gate; the
|
|
69
|
+
upgrade happens in the hub, not here.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Upgrade loop — changing a workflow that already exists
|
|
2
|
+
|
|
3
|
+
Use this whenever the target workflow is not a fresh build: a live self-built
|
|
4
|
+
workflow, a draft mid-iteration, or a workflow the user built in the n8n UI.
|
|
5
|
+
|
|
6
|
+
## Invariants (violating any of these breaks external callers)
|
|
7
|
+
|
|
8
|
+
- **Never edit a live workflow directly.** Live changes go draft → test →
|
|
9
|
+
promote. `update_draft` on a live workflow is refused (409, below).
|
|
10
|
+
- **Never activate the copy.** A duplicated draft has different webhook URLs;
|
|
11
|
+
activating it instead of promoting strands every external caller.
|
|
12
|
+
- **Promote preserves webhookIds** — that is the whole point. The live id and
|
|
13
|
+
its production URLs never change across a promote.
|
|
14
|
+
- **Promote only works between self-built (`awm:client-cli`) workflows.**
|
|
15
|
+
UI-built workflows need the duplication path at the bottom.
|
|
16
|
+
- **Save the `operationId`** returned by promote — it is the only rollback
|
|
17
|
+
handle.
|
|
18
|
+
|
|
19
|
+
## Which path
|
|
20
|
+
|
|
21
|
+
| Situation | Path |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Iterating on an INACTIVE draft (not yet promoted/activated) | `update_draft` in place — no new workflow ids |
|
|
24
|
+
| Changing a LIVE self-built workflow | Duplicate → draft loop → promote (steps below) |
|
|
25
|
+
| Changing a workflow built in the n8n UI (no `awm:client-cli` tag) | Duplicate into a CLI draft; coordinated URL cutover |
|
|
26
|
+
| Agency-managed workflow (`agency_managed` 403) | Read/explain only; changes go through Awesomate support |
|
|
27
|
+
|
|
28
|
+
## Iterating on a draft: `update_draft`
|
|
29
|
+
|
|
30
|
+
`awesomate_n8n_deploy {action:'update_draft', workflowId,
|
|
31
|
+
workflowJson:{name?, nodes, connections, settings?}}`
|
|
32
|
+
|
|
33
|
+
- **Full JSON replace** — nodes + connections replace the draft's entirely;
|
|
34
|
+
send the complete workflow, not a delta.
|
|
35
|
+
- Settings are **whitelisted server-side**: unknown keys and null/undefined
|
|
36
|
+
values are dropped, `saveExecutionProgress` is pinned false (2TB WAL
|
|
37
|
+
incident), `executionOrder` defaults to `v1`. Omit a key to keep the
|
|
38
|
+
draft's current value.
|
|
39
|
+
- Refusals: **409 `workflow_active`** — the workflow is live; do NOT
|
|
40
|
+
deactivate it to force the edit, use the promote path below. 403
|
|
41
|
+
`not_self_built` — only `awm:client-cli` workflows. 403 `agency_managed`.
|
|
42
|
+
- Validate (`{action:'validate', workflowJson}`) before every update; re-test
|
|
43
|
+
after (the full Phase 5 testing policy from SKILL.md applies).
|
|
44
|
+
|
|
45
|
+
## Upgrading a LIVE self-built workflow
|
|
46
|
+
|
|
47
|
+
1. **Duplicate.** Fetch the live workflow's full JSON
|
|
48
|
+
(`awesomate_n8n_workflows {id, detail:'full'}` or
|
|
49
|
+
`GET /api/my-n8n/workflows/:id`), then `create_draft` with the modified
|
|
50
|
+
JSON — new name, e.g. same name; the hub adds `[CLI] ` + fresh test
|
|
51
|
+
webhookIds automatically.
|
|
52
|
+
2. **Iterate.** Apply the requested changes; validate. Further revisions go
|
|
53
|
+
through `update_draft` on the draft — no need to delete and recreate.
|
|
54
|
+
3. **Test the draft on its own (test) URLs.** Activate the DRAFT (approval
|
|
55
|
+
gate applies), then `awesomate_n8n_test {workflowId:<draft id>, payload}`.
|
|
56
|
+
Full testing policy: inspect node-by-node output, happy path + empty +
|
|
57
|
+
malformed payloads, confirm error branches routed.
|
|
58
|
+
4. **Present the diff — mandatory before promote.** Human-readable, covering
|
|
59
|
+
ALL of: nodes added / removed / changed (name + what changed), credential
|
|
60
|
+
changes (added, swapped, removed), and a behavior summary in the user's
|
|
61
|
+
terms (what the workflow will now do differently). **Wait for explicit
|
|
62
|
+
approval.** No diff, no promote.
|
|
63
|
+
5. **Promote.** `awesomate_n8n_deploy {action:'promote',
|
|
64
|
+
workflowId:<LIVE id>, draftId:<draft id>}`. The hub snapshots both
|
|
65
|
+
workflows, swaps the draft's body into the live id (preserving its
|
|
66
|
+
webhookIds so external URLs never change), restores activation, and
|
|
67
|
+
archives the draft as `[promoted <date>]`. Save the returned
|
|
68
|
+
`operationId`.
|
|
69
|
+
6. **Verify against the ORIGINAL URL.** `awesomate_n8n_test` against the
|
|
70
|
+
LIVE workflow id — the original production URL must still respond, and
|
|
71
|
+
the execution must show the NEW behavior (inspect node output; a 200
|
|
72
|
+
alone proves nothing). On any failure:
|
|
73
|
+
`{action:'rollback', operationId}` restores both workflows to their
|
|
74
|
+
pre-promote state, then investigate — do not iterate on the live body.
|
|
75
|
+
7. **Cleanup.** Once the user confirms the promoted version, `delete_draft`
|
|
76
|
+
the archived `[promoted …]` draft (it is deactivated and still
|
|
77
|
+
CLI-tagged), or leave it as a manual fallback if they prefer.
|
|
78
|
+
|
|
79
|
+
## UI-built workflows (no `awm:client-cli` tag)
|
|
80
|
+
|
|
81
|
+
Promote refuses these. Instead:
|
|
82
|
+
|
|
83
|
+
1. Fetch the UI workflow's JSON; `create_draft` a CLI copy with the changes.
|
|
84
|
+
2. Test the draft fully (steps 2–3 above).
|
|
85
|
+
3. The draft becomes the live workflow going forward — its webhook URL
|
|
86
|
+
DIFFERS from the original. Coordinate the cutover with the user: they
|
|
87
|
+
update every external caller to the new URL, confirm traffic arrives on
|
|
88
|
+
the new workflow, then deactivate the old UI workflow themselves (it is
|
|
89
|
+
theirs — do not delete it).
|
|
90
|
+
|
|
91
|
+
## Errors you will hit
|
|
92
|
+
|
|
93
|
+
| Code | Meaning | Do |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| 409 `workflow_active` | `update_draft` on a live workflow | Promote path, never deactivate-to-edit |
|
|
96
|
+
| 403 `not_self_built` | No `awm:client-cli` tag | UI-built duplication path |
|
|
97
|
+
| 403 `agency_managed` | Awesomate-deployed workflow | Explain only; route to support |
|
|
98
|
+
| 429 `quota_exceeded` | Daily plan cap | Tell the user; never retry-loop |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"syncedAt": "2026-08-19T03:06:35.506Z",
|
|
3
|
+
"sourceSha": "d293559",
|
|
4
|
+
"files": {
|
|
5
|
+
"expressions/SKILL.md": "n8n-expression-syntax/SKILL.md",
|
|
6
|
+
"expressions/COMMON_MISTAKES.md": "n8n-expression-syntax/COMMON_MISTAKES.md",
|
|
7
|
+
"expressions/EXAMPLES.md": "n8n-expression-syntax/EXAMPLES.md",
|
|
8
|
+
"code-node/SKILL.md": "n8n-code-javascript/SKILL.md",
|
|
9
|
+
"code-node/DATA_ACCESS.md": "n8n-code-javascript/DATA_ACCESS.md",
|
|
10
|
+
"code-node/BUILTIN_FUNCTIONS.md": "n8n-code-javascript/BUILTIN_FUNCTIONS.md",
|
|
11
|
+
"code-node/ERROR_PATTERNS.md": "n8n-code-javascript/ERROR_PATTERNS.md",
|
|
12
|
+
"code-node/COMMON_PATTERNS.md": "n8n-code-javascript/COMMON_PATTERNS.md",
|
|
13
|
+
"node-configuration/SKILL.md": "n8n-node-configuration/SKILL.md",
|
|
14
|
+
"node-configuration/OPERATION_PATTERNS.md": "n8n-node-configuration/OPERATION_PATTERNS.md",
|
|
15
|
+
"node-configuration/DEPENDENCIES.md": "n8n-node-configuration/DEPENDENCIES.md",
|
|
16
|
+
"workflow-patterns/SKILL.md": "n8n-workflow-patterns/SKILL.md",
|
|
17
|
+
"workflow-patterns/webhook_processing.md": "n8n-workflow-patterns/webhook_processing.md",
|
|
18
|
+
"workflow-patterns/http_api_integration.md": "n8n-workflow-patterns/http_api_integration.md",
|
|
19
|
+
"workflow-patterns/database_operations.md": "n8n-workflow-patterns/database_operations.md",
|
|
20
|
+
"workflow-patterns/ai_agent_workflow.md": "n8n-workflow-patterns/ai_agent_workflow.md",
|
|
21
|
+
"workflow-patterns/scheduled_tasks.md": "n8n-workflow-patterns/scheduled_tasks.md",
|
|
22
|
+
"validation/SKILL.md": "n8n-validation-expert/SKILL.md",
|
|
23
|
+
"validation/ERROR_CATALOG.md": "n8n-validation-expert/ERROR_CATALOG.md",
|
|
24
|
+
"validation/FALSE_POSITIVES.md": "n8n-validation-expert/FALSE_POSITIVES.md"
|
|
25
|
+
}
|
|
26
|
+
}
|