@zellifyapp/mcp 0.2.0 → 0.3.1
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/README.md +6 -3
- package/build/client.d.ts +4 -0
- package/build/client.d.ts.map +1 -1
- package/build/index.js +55 -11
- package/build/init.d.ts.map +1 -1
- package/build/init.js +10 -1
- package/build/tools/get-integrations.d.ts.map +1 -1
- package/build/tools/get-integrations.js +4 -0
- package/build/tools/validate-setup.d.ts +3 -0
- package/build/tools/validate-setup.d.ts.map +1 -0
- package/build/tools/validate-setup.js +58 -0
- package/package.json +1 -1
- package/skill/SKILL.md +20 -20
- package/skill/references/debugging.md +1 -1
- package/skill/references/integration-paths.md +1 -1
- package/skill/references/revenuecat.md +2 -2
- package/skill/references/types-and-payload.md +1 -1
- package/skill/references/webhook-handler.md +1 -1
package/README.md
CHANGED
|
@@ -8,22 +8,25 @@ An MCP server that gives Claude Code full context about your Zellify funnels —
|
|
|
8
8
|
|
|
9
9
|
2. Register the MCP server, then run the init command to copy the skill + slash command into your project:
|
|
10
10
|
```bash
|
|
11
|
-
claude mcp add zellify -- npx -y @zellifyapp/mcp@latest
|
|
11
|
+
claude mcp add zellify -e ZELLIFY_API_KEY=YOUR_API_KEY -- npx -y @zellifyapp/mcp@latest
|
|
12
12
|
npx -y @zellifyapp/mcp@latest init
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
The init command is pure Node, so it works on macOS, Linux, and Windows (PowerShell, cmd.exe, and Git Bash) without shell-specific tweaks. Re-run it any time to update the skill files to the latest version.
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The API key is passed as an environment variable (`-e ZELLIFY_API_KEY=…`), not on the command line — argv-passed secrets leak to `ps`, shell history, and process inspection. If you previously installed with `--api-key`, rotate that key in the dashboard and re-add with the form above.
|
|
18
|
+
|
|
19
|
+
3. Fully quit and reopen Claude Code (⌘Q on macOS — closing the window is not enough; the MCP server registration is loaded once at startup). Then run `/integrationcheck` in Claude Code. Claude will analyze your codebase, ask any clarifying questions, pick the easiest integration path, and produce a complete plan you can approve and execute in one session.
|
|
18
20
|
|
|
19
21
|
## Available tools
|
|
20
22
|
|
|
21
23
|
| Tool | Description |
|
|
22
24
|
|------|-------------|
|
|
25
|
+
| `validate_setup` | Verify the MCP is configured: env var present, API key valid, backend reachable, funnels published. Run this first if anything else fails. |
|
|
23
26
|
| `list_funnels` | List all funnels with IDs, names, published status, and last updated date |
|
|
24
27
|
| `get_funnel_schema` | Get a funnel's variables — names, question types, option ID-to-label mappings |
|
|
25
28
|
| `get_example_payload` | Get a realistic example webhook payload and TypeScript interface for a funnel |
|
|
26
|
-
| `get_integrations` | Check configured integrations, payment provider, and active campaign count |
|
|
29
|
+
| `get_integrations` | Check configured integrations, payment provider, registration webhook URL, and active campaign count |
|
|
27
30
|
| `send_test_webhook` | Fire a signed test webhook to your configured endpoint and report the result |
|
|
28
31
|
|
|
29
32
|
## Example prompts
|
package/build/client.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ export interface ExamplePayloadResponse {
|
|
|
24
24
|
export interface Integration {
|
|
25
25
|
name: string;
|
|
26
26
|
configured: boolean;
|
|
27
|
+
/** Present for `registration_webhook` only. The configured public webhook URL, or null if unset. */
|
|
28
|
+
url?: string | null;
|
|
29
|
+
/** Present for `registration_webhook` only. Whether the signing secret is configured. */
|
|
30
|
+
secretConfigured?: boolean;
|
|
27
31
|
}
|
|
28
32
|
export interface IntegrationsResponse {
|
|
29
33
|
integrations: Integration[];
|
package/build/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAyCA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAyCA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,oGAAoG;IACpG,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAID,wBAAsB,WAAW,IAAI,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAElE;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,SAAS,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAE1C;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAErE;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,CAAC,CAI9B"}
|
package/build/index.js
CHANGED
|
@@ -2,24 +2,67 @@
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
if (args.includes("--help") || args.includes("-h") || args[0] === "help") {
|
|
7
|
+
process.stdout.write(`zellify-mcp — Zellify MCP server for Claude Code
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
zellify-mcp Run the MCP server (stdio transport)
|
|
11
|
+
zellify-mcp init Install the Zellify skill + /integrationcheck
|
|
12
|
+
slash command into ./.claude/ in the current
|
|
13
|
+
project. Re-run any time to update.
|
|
14
|
+
zellify-mcp --help Show this message.
|
|
15
|
+
|
|
16
|
+
Authentication:
|
|
17
|
+
The server reads ZELLIFY_API_KEY from its environment. With Claude Code:
|
|
18
|
+
|
|
19
|
+
claude mcp add zellify -e ZELLIFY_API_KEY=YOUR_KEY -- npx -y @zellifyapp/mcp@latest
|
|
20
|
+
|
|
21
|
+
Pass the key via -e (env), not on the command line — argv leaks to ps,
|
|
22
|
+
shell history, and process inspection.
|
|
23
|
+
|
|
24
|
+
Environment variables:
|
|
25
|
+
ZELLIFY_API_KEY Required. Generate at https://dash.zellify.app/dashboard/settings/developer
|
|
26
|
+
ZELLIFY_API_URL Optional. Defaults to https://standalone-api.zellify.app
|
|
27
|
+
|
|
28
|
+
Docs:
|
|
29
|
+
https://docs.zellify.app
|
|
30
|
+
`);
|
|
31
|
+
process.exit(0);
|
|
32
|
+
}
|
|
33
|
+
if (args[0] === "init") {
|
|
14
34
|
const { run } = await import("./init.js");
|
|
15
35
|
run();
|
|
16
36
|
process.exit(0);
|
|
17
37
|
}
|
|
38
|
+
// Backward compatibility: a previous version of the install docs used
|
|
39
|
+
// `--api-key VALUE` on the command line. The server reads from env, so the
|
|
40
|
+
// flag silently did nothing. Accept it now (set the env), warn loudly that
|
|
41
|
+
// it's insecure, and tell the user how to migrate.
|
|
42
|
+
const apiKeyFlagIdx = args.indexOf("--api-key");
|
|
43
|
+
if (apiKeyFlagIdx !== -1 && args[apiKeyFlagIdx + 1]) {
|
|
44
|
+
process.env.ZELLIFY_API_KEY = args[apiKeyFlagIdx + 1];
|
|
45
|
+
process.stderr.write("[zellify-mcp] WARNING: --api-key on the command line is insecure (leaks to ps, shell history, process inspection).\n" +
|
|
46
|
+
"[zellify-mcp] Rotate this key in the dashboard and re-add the MCP with -e ZELLIFY_API_KEY=…:\n" +
|
|
47
|
+
"[zellify-mcp] claude mcp remove zellify\n" +
|
|
48
|
+
"[zellify-mcp] claude mcp add zellify -e ZELLIFY_API_KEY=NEW_KEY -- npx -y @zellifyapp/mcp@latest\n");
|
|
49
|
+
}
|
|
50
|
+
// Imports below depend on env being read (client.ts captures ZELLIFY_API_KEY
|
|
51
|
+
// at module-eval time), so do them after the --api-key fallback above.
|
|
52
|
+
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
53
|
+
const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
54
|
+
const { registerListFunnels } = await import("./tools/list-funnels.js");
|
|
55
|
+
const { registerGetFunnelSchema } = await import("./tools/get-funnel-schema.js");
|
|
56
|
+
const { registerGetExamplePayload } = await import("./tools/get-example-payload.js");
|
|
57
|
+
const { registerGetIntegrations } = await import("./tools/get-integrations.js");
|
|
58
|
+
const { registerSendTestWebhook } = await import("./tools/send-test-webhook.js");
|
|
59
|
+
const { registerValidateSetup } = await import("./tools/validate-setup.js");
|
|
60
|
+
const { registerIntegrationPlanPrompt } = await import("./prompts/integration-plan.js");
|
|
18
61
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
62
|
const referencesDir = join(__dirname, "..", "skill", "references");
|
|
20
63
|
const server = new McpServer({
|
|
21
64
|
name: "zellify",
|
|
22
|
-
version: "0.
|
|
65
|
+
version: "0.3.0",
|
|
23
66
|
}, {
|
|
24
67
|
instructions: `Zellify MCP — integrate with Zellify web funnels.
|
|
25
68
|
|
|
@@ -48,7 +91,7 @@ flow: discover → ask → decide → plan → implement → verify.
|
|
|
48
91
|
## Reference resources
|
|
49
92
|
Read the MCP resources for detailed guides: webhook-handler, debugging,
|
|
50
93
|
integration-paths, revenuecat, types-and-payload, language-guides. For full
|
|
51
|
-
recipes, fetch the matching guide on https://
|
|
94
|
+
recipes, fetch the matching guide on https://developers.zellify.app/developers/guides.`,
|
|
52
95
|
});
|
|
53
96
|
// ── Reference resources ──────────────────────────────────
|
|
54
97
|
const referenceFiles = [
|
|
@@ -66,6 +109,7 @@ for (const ref of referenceFiles) {
|
|
|
66
109
|
});
|
|
67
110
|
}
|
|
68
111
|
// ── Tools ────────────────────────────────────────────────
|
|
112
|
+
registerValidateSetup(server);
|
|
69
113
|
registerListFunnels(server);
|
|
70
114
|
registerGetFunnelSchema(server);
|
|
71
115
|
registerGetExamplePayload(server);
|
package/build/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAIA,wBAAgB,GAAG,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAIA,wBAAgB,GAAG,IAAI,IAAI,CA8B1B"}
|
package/build/init.js
CHANGED
|
@@ -17,5 +17,14 @@ export function run() {
|
|
|
17
17
|
console.log("Installed Zellify skill at .claude/skills/zellify-integration/");
|
|
18
18
|
console.log("Installed /integrationcheck slash command at .claude/commands/integrationcheck.md");
|
|
19
19
|
console.log("");
|
|
20
|
-
console.log("
|
|
20
|
+
console.log("Next:");
|
|
21
|
+
console.log(" 1. Register the MCP server (one-time, per project):");
|
|
22
|
+
console.log(" claude mcp add zellify -e ZELLIFY_API_KEY=YOUR_KEY -- npx -y @zellifyapp/mcp@latest");
|
|
23
|
+
console.log(" Get a key at https://dash.zellify.app/dashboard/settings/developer.");
|
|
24
|
+
console.log("");
|
|
25
|
+
console.log(" 2. Fully quit and reopen Claude Code (⌘Q on macOS — closing the");
|
|
26
|
+
console.log(" window is not enough; MCP server registrations are loaded once");
|
|
27
|
+
console.log(" at app start and do not hot-reload).");
|
|
28
|
+
console.log("");
|
|
29
|
+
console.log(" 3. In your project, run /integrationcheck.");
|
|
21
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-integrations.d.ts","sourceRoot":"","sources":["../../src/tools/get-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"get-integrations.d.ts","sourceRoot":"","sources":["../../src/tools/get-integrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,QAuCxD"}
|
|
@@ -7,6 +7,10 @@ export function registerGetIntegrations(server) {
|
|
|
7
7
|
lines.push("Configured integrations:");
|
|
8
8
|
for (const i of data.integrations) {
|
|
9
9
|
lines.push(` - ${i.name}`);
|
|
10
|
+
if (i.name === "registration_webhook") {
|
|
11
|
+
lines.push(` URL: ${i.url ?? "(not set)"}`);
|
|
12
|
+
lines.push(` Secret: ${i.secretConfigured ? "configured" : "missing"}`);
|
|
13
|
+
}
|
|
10
14
|
}
|
|
11
15
|
}
|
|
12
16
|
else {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-setup.d.ts","sourceRoot":"","sources":["../../src/tools/validate-setup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMzE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QA2EtD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { listFunnels } from "../client.js";
|
|
2
|
+
const API_URL = process.env.ZELLIFY_API_URL ?? "https://standalone-api.zellify.app";
|
|
3
|
+
const API_KEY_PRESENT = Boolean(process.env.ZELLIFY_API_KEY);
|
|
4
|
+
export function registerValidateSetup(server) {
|
|
5
|
+
server.tool("validate_setup", "Verify that the Zellify MCP is correctly configured: env var present, API key valid, backend reachable, and at least one published funnel exists. Run this first if anything else fails — it pinpoints whether the problem is auth, network, or empty org. Returns a checklist with PASS/FAIL for each check.", {}, async () => {
|
|
6
|
+
const lines = [];
|
|
7
|
+
lines.push(`API URL: ${API_URL}`);
|
|
8
|
+
lines.push(`ZELLIFY_API_KEY env var: ${API_KEY_PRESENT ? "PRESENT" : "MISSING"}`);
|
|
9
|
+
if (!API_KEY_PRESENT) {
|
|
10
|
+
lines.push("");
|
|
11
|
+
lines.push("✗ FAIL — ZELLIFY_API_KEY is not in the MCP server's environment.");
|
|
12
|
+
lines.push("");
|
|
13
|
+
lines.push("Re-add the MCP with the env var:");
|
|
14
|
+
lines.push(" claude mcp remove zellify");
|
|
15
|
+
lines.push(" claude mcp add zellify -e ZELLIFY_API_KEY=YOUR_KEY -- npx -y @zellifyapp/mcp@latest");
|
|
16
|
+
lines.push("Then fully quit Claude Code (⌘Q) and reopen — MCP config does not hot-reload.");
|
|
17
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const data = await listFunnels();
|
|
21
|
+
const total = data.funnels.length;
|
|
22
|
+
const published = data.funnels.filter((f) => f.published).length;
|
|
23
|
+
lines.push("✓ API key valid (auth check passed)");
|
|
24
|
+
lines.push(`✓ Backend reachable at ${API_URL}`);
|
|
25
|
+
lines.push(`Funnels in this org: ${total} total, ${published} published`);
|
|
26
|
+
if (total === 0) {
|
|
27
|
+
lines.push("");
|
|
28
|
+
lines.push("⚠ No funnels exist in this organization. Create one in the dashboard before integrating.");
|
|
29
|
+
}
|
|
30
|
+
else if (published === 0) {
|
|
31
|
+
lines.push("");
|
|
32
|
+
lines.push("⚠ No published funnels. Webhooks only fire from published funnels (preview mode disables them). Publish at least one before integrating.");
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
lines.push("");
|
|
36
|
+
lines.push("✓ Setup looks good. Proceed with /integrationcheck or call list_funnels.");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
41
|
+
lines.push("");
|
|
42
|
+
lines.push(`✗ FAIL — ${message}`);
|
|
43
|
+
lines.push("");
|
|
44
|
+
if (message.includes("401") || message.toLowerCase().includes("invalid api key")) {
|
|
45
|
+
lines.push("The API key was rejected. Generate a fresh one at:");
|
|
46
|
+
lines.push(" https://dash.zellify.app/dashboard/settings/developer");
|
|
47
|
+
lines.push("Then re-add the MCP with -e ZELLIFY_API_KEY=NEW_KEY and fully quit Claude Code.");
|
|
48
|
+
}
|
|
49
|
+
else if (message.includes("ENOTFOUND") || message.includes("ECONNREFUSED")) {
|
|
50
|
+
lines.push(`The MCP can't reach ${API_URL}. Check your network / VPN / proxy.`);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
lines.push("Unexpected error — likely a backend issue. Check status.zellify.app and try again.");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
57
|
+
});
|
|
58
|
+
}
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -23,9 +23,9 @@ Run these phases in order. Don't skip ahead. Each phase has an exit condition.
|
|
|
23
23
|
|
|
24
24
|
Call in parallel:
|
|
25
25
|
1. `list_funnels` — confirms the API key works, returns funnel IDs and published status.
|
|
26
|
-
2. `get_integrations` — returns the customer's payment provider, RevenueCat status, webhook configuration status, campaign count.
|
|
26
|
+
2. `get_integrations` — returns the customer's payment provider, RevenueCat status, webhook configuration status (including the configured URL for `registration_webhook`), campaign count.
|
|
27
27
|
|
|
28
|
-
If `list_funnels` fails with auth: stop.
|
|
28
|
+
If `list_funnels` fails with auth, network error, or anything ambiguous: stop and run `validate_setup`. It pinpoints whether the problem is the env var not being set, an invalid key, the backend being unreachable, or no funnels existing — each with the exact remediation. Only ask the user to generate a new key (`https://dash.zellify.app/dashboard/settings/developer`) if `validate_setup` says the key was rejected. Otherwise the docs/install guide remediation is in its output.
|
|
29
29
|
|
|
30
30
|
If no funnels are published yet: tell the user to publish at least one funnel before integrating, and stop. Integration without a published funnel is meaningless.
|
|
31
31
|
|
|
@@ -150,20 +150,20 @@ Now fetch the deep recipe. The skill's bundled references are summaries — the
|
|
|
150
150
|
|
|
151
151
|
| Path | URL |
|
|
152
152
|
|---|---|
|
|
153
|
-
| Mobile App with RevenueCat | `https://
|
|
154
|
-
| Mobile App with Custom Backend | `https://
|
|
155
|
-
| Web App with Signup Page | `https://
|
|
156
|
-
| Using Existing Webhooks | `https://
|
|
157
|
-
| Early Account Creation | `https://
|
|
158
|
-
| Free Funnel with Deep Link | `https://
|
|
159
|
-
| Custom Registration Component | `https://
|
|
160
|
-
|
|
161
|
-
Use WebFetch to read the page.
|
|
162
|
-
- `https://
|
|
163
|
-
- `https://
|
|
164
|
-
- `https://
|
|
165
|
-
- `https://
|
|
166
|
-
- `https://
|
|
153
|
+
| Mobile App with RevenueCat | `https://developers.zellify.app/developers/guides/mobile-app-revenuecat` |
|
|
154
|
+
| Mobile App with Custom Backend | `https://developers.zellify.app/developers/guides/mobile-app-custom-backend` |
|
|
155
|
+
| Web App with Signup Page | `https://developers.zellify.app/developers/guides/web-app-signup` |
|
|
156
|
+
| Using Existing Webhooks | `https://developers.zellify.app/developers/guides/existing-webhooks` |
|
|
157
|
+
| Early Account Creation | `https://developers.zellify.app/developers/guides/early-account-creation` |
|
|
158
|
+
| Free Funnel with Deep Link | `https://developers.zellify.app/developers/guides/free-funnel` |
|
|
159
|
+
| Custom Registration Component | `https://developers.zellify.app/developers/guides/custom-registration-component` |
|
|
160
|
+
|
|
161
|
+
Use WebFetch to read the page. Also fetch the underlying concept pages on the first run:
|
|
162
|
+
- `https://developers.zellify.app/developers/concepts/app-user-id`
|
|
163
|
+
- `https://developers.zellify.app/developers/concepts/deep-link-button`
|
|
164
|
+
- `https://developers.zellify.app/developers/concepts/checkout-metadata`
|
|
165
|
+
- `https://developers.zellify.app/developers/webhooks/registration` (if the path involves the registration webhook)
|
|
166
|
+
- `https://developers.zellify.app/developers/webhooks/registration/payload` (when generating types)
|
|
167
167
|
|
|
168
168
|
Output the plan as a numbered checklist with file paths and code snippets matched to the user's framework. Sections to cover (skip ones that don't apply to the chosen path):
|
|
169
169
|
|
|
@@ -204,7 +204,7 @@ If approved, generate the files. Apply the universal rules below to every webhoo
|
|
|
204
204
|
|
|
205
205
|
After writing code, run this checklist:
|
|
206
206
|
|
|
207
|
-
1. Call `get_integrations` again — confirm
|
|
207
|
+
1. Call `get_integrations` again — confirm `registration_webhook` is configured and that its `url` field exactly matches the new endpoint you just deployed (don't accept "configured: true" as proof; the URL may still point at a stale deployment). If `url` is null or wrong, tell the user where to fix it: dashboard → Settings → Integrations → Registration Webhook.
|
|
208
208
|
2. Call `send_test_webhook` against the funnel — must return 200 (or whatever the user's success code is).
|
|
209
209
|
3. Walk through the `app_user_id` chain manually:
|
|
210
210
|
- Webhook payload has `context.appUserId`? ✓
|
|
@@ -226,7 +226,7 @@ Funnel answer access is `payload.answers.gender.value` and `payload.answers.gend
|
|
|
226
226
|
For singleselect/multiselect questions, `value` is an opaque ID like `"1"`. Resolve to a human-readable label via `answer.label` or by mapping against `get_funnel_schema` options. Don't ship code that switches on raw IDs without a comment explaining what they mean.
|
|
227
227
|
|
|
228
228
|
**MUST: Verify HMAC against the raw request body.**
|
|
229
|
-
Re-stringifying the JSON before HMAC will break the signature on any handler. Use `express.raw`, Fastify's `rawBody` plugin, Flask's `request.get_data(as_text=False)`, etc. Reference `references/language-guides.md` for per-framework patterns, or fetch `https://
|
|
229
|
+
Re-stringifying the JSON before HMAC will break the signature on any handler. Use `express.raw`, Fastify's `rawBody` plugin, Flask's `request.get_data(as_text=False)`, etc. Reference `references/language-guides.md` for per-framework patterns, or fetch `https://developers.zellify.app/developers/webhooks/registration` for the canonical version.
|
|
230
230
|
|
|
231
231
|
**IMPORTANT: Preview mode silently disables webhooks.**
|
|
232
232
|
Funnel URLs containing `/preview/` will not fire webhooks no matter how perfect the handler is. Make sure the user is testing on a published funnel URL or with `send_test_webhook`.
|
|
@@ -249,14 +249,14 @@ Use these when the user's request is narrow and you don't need the full cold-sta
|
|
|
249
249
|
| Debug webhook delivery | `get_integrations` → `send_test_webhook` → diagnose response code → fix |
|
|
250
250
|
| Generate TypeScript types | `get_funnel_schema` → `get_example_payload` → extract interface |
|
|
251
251
|
| Choose an integration path | Phases 2 → 3 → 4 of cold-start workflow above |
|
|
252
|
-
| Wire up RevenueCat | Read `references/revenuecat.md` + WebFetch `https://
|
|
252
|
+
| Wire up RevenueCat | Read `references/revenuecat.md` + WebFetch `https://developers.zellify.app/developers/guides/mobile-app-revenuecat` |
|
|
253
253
|
| Wire up something other than RevenueCat | Phase 5b research mode → map to "Mobile App with Custom Backend" |
|
|
254
254
|
|
|
255
255
|
---
|
|
256
256
|
|
|
257
257
|
## Reference files (npm-bundled summaries)
|
|
258
258
|
|
|
259
|
-
These are quick-reference. For the canonical recipe, fetch the matching `
|
|
259
|
+
These are quick-reference. For the canonical recipe, fetch the matching `developers.zellify.app` page.
|
|
260
260
|
|
|
261
261
|
| File | Use when |
|
|
262
262
|
|---|---|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Integration Paths
|
|
2
2
|
|
|
3
|
-
> **Canonical recipes (live):** https://
|
|
3
|
+
> **Canonical recipes (live):** https://developers.zellify.app/developers/guides
|
|
4
4
|
> Fetch the specific guide for the chosen path. The summaries below are for path-picking only.
|
|
5
5
|
|
|
6
6
|
Use `get_integrations` to determine which path fits the developer.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# RevenueCat Integration
|
|
2
2
|
|
|
3
|
-
> **Canonical recipe (live):** https://
|
|
4
|
-
> Plus integration setup: https://
|
|
3
|
+
> **Canonical recipe (live):** https://developers.zellify.app/developers/guides/mobile-app-revenuecat
|
|
4
|
+
> Plus integration setup: https://developers.zellify.app/integrations/subscriptions/revenuecat
|
|
5
5
|
|
|
6
6
|
## The chain
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Building a Registration Webhook Handler
|
|
2
2
|
|
|
3
|
-
> **Canonical recipe (live):** https://
|
|
3
|
+
> **Canonical recipe (live):** https://developers.zellify.app/developers/webhooks/registration
|
|
4
4
|
> Fetch this when writing handler code. The bundled summary below is for offline / quick-reference only.
|
|
5
5
|
|
|
6
6
|
## Step 1: Gather funnel-specific data
|