@funnelchat-hq/n8n-nodes-funnelchat 0.1.1 → 0.2.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 +231 -108
- package/dist/nodes/Funnelchat/Funnelchat.node.js +1 -1
- package/dist/nodes/Funnelchat/Funnelchat.node.js.map +1 -1
- package/dist/nodes/Funnelchat/description.js +3 -3
- package/dist/nodes/Funnelchat/description.js.map +1 -1
- package/dist/nodes/Funnelchat/generated/operations.js +1964 -620
- package/dist/nodes/Funnelchat/generated/operations.js.map +1 -1
- package/dist/nodes/Funnelchat/operationTypes.d.ts +3 -0
- package/dist/nodes/FunnelchatTrigger/FunnelchatTrigger.node.d.ts +1 -0
- package/dist/nodes/FunnelchatTrigger/FunnelchatTrigger.node.js +17 -2
- package/dist/nodes/FunnelchatTrigger/FunnelchatTrigger.node.js.map +1 -1
- package/dist/nodes/FunnelchatTrigger/generated/events.js +38 -3
- package/dist/nodes/FunnelchatTrigger/generated/events.js.map +1 -1
- package/dist/package.json +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,31 +1,126 @@
|
|
|
1
1
|
# @funnelchat-hq/n8n-nodes-funnelchat
|
|
2
2
|
|
|
3
|
-
[n8n](https://n8n.io) community node for the Funnelchat public API
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
[n8n](https://n8n.io) community node for the Funnelchat public API: connect your WhatsApp numbers, send messages and
|
|
4
|
+
know when they are read, receive messages and work with your groups, from your workflows and without code.
|
|
5
|
+
|
|
6
|
+
## First use
|
|
7
|
+
|
|
8
|
+
1. **Install the node.** In n8n, **Settings → Community nodes → Install** and type
|
|
9
|
+
`@funnelchat-hq/n8n-nodes-funnelchat` (other ways in [Installation](#installation)).
|
|
10
|
+
2. **Create your key.** In the Funnelchat panel, **Developers → Create key**. It is shown **only once**: copy it then.
|
|
11
|
+
If you also use it from code, keep it in the `FUNNELCHAT_API_KEY` environment variable, never in the code.
|
|
12
|
+
3. **Add the credential.** In n8n, create a **Funnelchat API** credential: paste the key in **API Key** and leave
|
|
13
|
+
**Environment** on **Production**. n8n keeps it encrypted.
|
|
14
|
+
4. **Connect a number.** Skip it if you already have one: **Funnelchat → Numbers → List numbers** gives its `id`.
|
|
15
|
+
Otherwise, a **Funnelchat** node with **Numbers → Create a connect link**, **Type** `qr`. Run it and open the `url`
|
|
16
|
+
of the result: the page shows a QR code. Scan it with WhatsApp on your phone (**Linked devices**). The number's `id`
|
|
17
|
+
is then in **List numbers**, and in **Get a connect link** (`device_id`).
|
|
18
|
+
5. **Send a message and know when it was read**: a workflow with two nodes.
|
|
19
|
+
- **Funnelchat**: **Conversations and Messages → Send a message**. **Number ID**: your number's `id`. **Phone**:
|
|
20
|
+
the recipient's, with the country code (`5491100000000`). No need to create the contact first: if the phone is
|
|
21
|
+
new, Funnelchat creates it in your key's workspace (that takes `conversations:write`). **Additional Fields**:
|
|
22
|
+
**Text** `Hello!` and **Client Reference** `order-981`.
|
|
23
|
+
- **Funnelchat Trigger**: **Event Names or IDs**: Message status changed (`message.status_changed`).
|
|
24
|
+
|
|
25
|
+
Activate the workflow (that subscribes the trigger) and click **Execute step** on the **Funnelchat** node. The send
|
|
26
|
+
answers at once with the message in `status: "queued"` and its `contact_id`. Then the trigger starts once per
|
|
27
|
+
status, `sent`,
|
|
28
|
+
`delivered` and `read` (or `failed`, with its `error`), with your `client_reference` and your workspace:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"id": "evt_000000000000000000000002",
|
|
33
|
+
"type": "message.status_changed",
|
|
34
|
+
"version": 1,
|
|
35
|
+
"occurred_at": "2026-11-04T12:00:05Z",
|
|
36
|
+
"data": {
|
|
37
|
+
"message_id": 1001,
|
|
38
|
+
"contact_id": 2001,
|
|
39
|
+
"device_id": 4,
|
|
40
|
+
"status": "read",
|
|
41
|
+
"previous_status": "delivered",
|
|
42
|
+
"error": null,
|
|
43
|
+
"occurred_at": "2026-11-04T12:00:05Z",
|
|
44
|
+
"client_reference": "order-981",
|
|
45
|
+
"workspace_id": 37
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
The trigger needs n8n reachable from the internet over `https` (in self-hosted n8n, `WEBHOOK_URL`): see
|
|
51
|
+
[What you need](#what-you-need). With an official WhatsApp number, the first message to a new contact has to be a
|
|
52
|
+
template (**Templates → Send a template**, with the same **Phone**): a free message only goes out within 24 hours
|
|
53
|
+
of the contact's last message. A number connected by QR has no such rule.
|
|
54
|
+
|
|
55
|
+
<details><summary>The same two nodes, to paste on the canvas (then choose your credential in both)</summary>
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"nodes": [
|
|
60
|
+
{
|
|
61
|
+
"name": "Send a message",
|
|
62
|
+
"type": "@funnelchat-hq/n8n-nodes-funnelchat.funnelchat",
|
|
63
|
+
"typeVersion": 1,
|
|
64
|
+
"position": [0, 0],
|
|
65
|
+
"parameters": {
|
|
66
|
+
"resource": "conversation",
|
|
67
|
+
"operation": "message.sendMessage",
|
|
68
|
+
"device_id": "4",
|
|
69
|
+
"phone": "5491100000000",
|
|
70
|
+
"additionalFields": { "text": "Hello!", "client_reference": "order-981" }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "When its status changes",
|
|
75
|
+
"type": "@funnelchat-hq/n8n-nodes-funnelchat.funnelchatTrigger",
|
|
76
|
+
"typeVersion": 1,
|
|
77
|
+
"position": [0, 240],
|
|
78
|
+
"parameters": { "events": ["message.status_changed"] }
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"connections": {}
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</details>
|
|
86
|
+
|
|
87
|
+
**What the key needs** for all of this: `accounts:read` (list numbers, and the credential test), `accounts:operate`
|
|
88
|
+
(connect a number), `conversations:write` (sending to a phone that is not a contact yet creates the contact, as
|
|
89
|
+
**Create or update a contact** does; it includes `conversations:send`, and without it that send answers `403`),
|
|
90
|
+
`conversations:read`, `webhooks:read` and `webhooks:write` (the trigger on message events). Sending to a phone or a
|
|
91
|
+
contact you already have, in your key's workspace, only needs `conversations:send`. A key with full access has them
|
|
92
|
+
all.
|
|
93
|
+
|
|
94
|
+
### Receive messages
|
|
95
|
+
|
|
96
|
+
**Funnelchat Trigger** with **Message received** (`message.received`). Each message brings `data.message` (`id`,
|
|
97
|
+
`type`, `text`, `media`), `data.contact` (`id`, `name`, `phone`), `data.device_id` and `data.workspace_id`. To answer
|
|
98
|
+
it, see [Receive a message and reply](#receive-a-message-and-reply). Your numbers tell you when they connect or
|
|
99
|
+
disconnect with **Number connected** (`device.connected`) and **Number disconnected** (`device.disconnected`, with its
|
|
100
|
+
`reason`).
|
|
101
|
+
|
|
102
|
+
### Groups
|
|
24
103
|
|
|
25
|
-
|
|
104
|
+
- **Groups → List groups**: your groups, with the `uid` the other operations use.
|
|
105
|
+
- **Groups → Send a message to a group**: **Group UID**, **Number ID** (connected, and an admin of the group if it is a
|
|
106
|
+
QR number), **Type** `text` and **Additional Fields → Text**. It answers at once with an `action_id`; **Groups → Get
|
|
107
|
+
a group action** says how it went, and so do the `group_action.completed` and `group_action.failed` events. The key
|
|
108
|
+
needs `communities:send` (and `communities:read` to list).
|
|
109
|
+
- **Funnelchat Trigger** with **Participant joined** (`group_participant.joined`) and **Participant left**
|
|
110
|
+
(`group_participant.left`), with `communities:read`.
|
|
111
|
+
|
|
112
|
+
### Workspaces
|
|
113
|
+
|
|
114
|
+
Each API key sees and operates only the workspace where it was created: numbers, contacts, groups and webhook
|
|
115
|
+
subscriptions of other workspaces do not show up, as if they did not exist. The trigger's subscription belongs to the
|
|
116
|
+
key's workspace and receives only its events, and every event says which one in `data.workspace_id`. One integration
|
|
117
|
+
per workspace: one key, and one credential, for each.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Reference
|
|
26
122
|
|
|
27
123
|
- [Installation](#installation)
|
|
28
|
-
- [Minimal example](#minimal-example)
|
|
29
124
|
- [Credential](#credential)
|
|
30
125
|
- [The Funnelchat node](#the-funnelchat-node)
|
|
31
126
|
- [The Funnelchat Trigger](#the-funnelchat-trigger)
|
|
@@ -35,6 +130,13 @@ API documentation: [Funnelchat developer portal](https://developers-portal.funne
|
|
|
35
130
|
- [Development](#development)
|
|
36
131
|
- [Sources and what is left to verify](#sources-and-what-is-left-to-verify)
|
|
37
132
|
|
|
133
|
+
API documentation: [Funnelchat developer portal](https://developers-portal.funnelchat.app/docs/).
|
|
134
|
+
|
|
135
|
+
The package has three parts: the **Funnelchat API** credential (your key and the environment: production, staging or
|
|
136
|
+
a URL of your own, such as the sandbox); the **Funnelchat** node, with the API operations grouped as in the portal,
|
|
137
|
+
generated from its unified specification and from what the domains opened later; and the **Funnelchat Trigger**, which
|
|
138
|
+
starts a workflow with each event Funnelchat sends by webhook, with its signature verified.
|
|
139
|
+
|
|
38
140
|
## Installation
|
|
39
141
|
|
|
40
142
|
### From n8n (community nodes)
|
|
@@ -63,39 +165,10 @@ git clone https://github.com/Funnelchat20/n8n-nodes-funnelchat.git
|
|
|
63
165
|
cd n8n-nodes-funnelchat
|
|
64
166
|
npm ci
|
|
65
167
|
npm run build
|
|
66
|
-
npm pack # creates funnelchat-hq-n8n-nodes-funnelchat-0.
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Then, in n8n's nodes folder, `npm install /path/to/funnelchat-hq-n8n-nodes-funnelchat-0.1.1.tgz`.
|
|
70
|
-
|
|
71
|
-
## Minimal example
|
|
72
|
-
|
|
73
|
-
A workflow that sends a message to a contact and keeps the message ID:
|
|
74
|
-
|
|
75
|
-
1. Create the **Funnelchat API** credential with your key (see [Credential](#credential)).
|
|
76
|
-
2. Add the **Funnelchat** node — resource "Conversations and Messages", operation "Send a message to a contact":
|
|
77
|
-
- Contact ID (in the route and in the body): `2001`
|
|
78
|
-
- Number ID: the ID of the number that sends, from "Numbers → List numbers".
|
|
79
|
-
- Additional Fields → Phone: the contact's, `5491100000000`; Text: `Hello`; Client Reference: `order-981`.
|
|
80
|
-
3. Run it. You get one item with the queued message:
|
|
81
|
-
|
|
82
|
-
```json
|
|
83
|
-
{
|
|
84
|
-
"id": 1001,
|
|
85
|
-
"contact_id": 2001,
|
|
86
|
-
"device_id": 7,
|
|
87
|
-
"direction": "outbound",
|
|
88
|
-
"type": "text",
|
|
89
|
-
"status": "queued",
|
|
90
|
-
"error": null,
|
|
91
|
-
"client_reference": "order-981",
|
|
92
|
-
"created_at": "2026-10-22T13:05:00Z",
|
|
93
|
-
"updated_at": "2026-10-22T13:05:00Z"
|
|
94
|
-
}
|
|
168
|
+
npm pack # creates funnelchat-hq-n8n-nodes-funnelchat-0.2.1.tgz
|
|
95
169
|
```
|
|
96
170
|
|
|
97
|
-
|
|
98
|
-
`message.status_changed` event, which carries your `client_reference`, or by reading the message with "Get a message".
|
|
171
|
+
Then, in n8n's nodes folder, `npm install /path/to/funnelchat-hq-n8n-nodes-funnelchat-0.2.1.tgz`.
|
|
99
172
|
|
|
100
173
|
## Credential
|
|
101
174
|
|
|
@@ -157,7 +230,7 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
157
230
|
|
|
158
231
|
<!-- operations:start (generated by npm run generate) -->
|
|
159
232
|
|
|
160
|
-
|
|
233
|
+
153 operations generated from the specification (sha256 `8228ea7369da`) and its supplements. The ones marked ⚠ show a notice in the node (what the code requires and the specification does not say, a route closed to keys, or an irreversible operation).
|
|
161
234
|
|
|
162
235
|
<details><summary><strong>Contacts</strong> (15)</summary>
|
|
163
236
|
|
|
@@ -181,7 +254,7 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
181
254
|
|
|
182
255
|
</details>
|
|
183
256
|
|
|
184
|
-
<details><summary><strong>Conversations and Messages</strong> (
|
|
257
|
+
<details><summary><strong>Conversations and Messages</strong> (20)</summary>
|
|
185
258
|
|
|
186
259
|
| Operation | Route | Permission |
|
|
187
260
|
|---|---|---|
|
|
@@ -196,17 +269,19 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
196
269
|
| Send a message to a contact ⚠ | `POST /api/v1/contacts/{contact}/message` | `conversations:send` |
|
|
197
270
|
| List a contact's messages "return all" | `GET /api/v1/contacts/{contactId}/messages` | `conversations:read` |
|
|
198
271
|
| Send a message ⚠ | `POST /api/v1/message/send-message` | `conversations:send` |
|
|
199
|
-
| Get a message | `GET /api/v1/contacts/{contact}/messages/{message}` | `conversations:read` |
|
|
200
272
|
| React to a message ⚠ | `PUT /api/v1/contacts/{contact}/messages/{message}/reaction` | `conversations:send` |
|
|
201
273
|
| Remove a reaction ⚠ | `DELETE /api/v1/contacts/{contact}/messages/{message}/reaction` | `conversations:send` |
|
|
202
274
|
| Forward a message ⚠ | `POST /api/v1/contacts/{contact}/messages/{message}/forward` | `conversations:send` |
|
|
203
275
|
| Send a poll ⚠ | `POST /api/v1/contacts/{contact}/message/poll` | `conversations:send` |
|
|
204
276
|
| Send an event invitation ⚠ | `POST /api/v1/contacts/{contact}/message/event` | `conversations:send` |
|
|
205
277
|
| Send a contact card ⚠ | `POST /api/v1/contacts/{contact}/message/contact-card` | `conversations:send` |
|
|
278
|
+
| Get a message | `GET /api/v1/contacts/{contact}/messages/{message}` | `conversations:read` |
|
|
279
|
+
| Mark a message as read | `POST /api/v1/contacts/{contact}/messages/{message}/read` | `conversations:send` |
|
|
280
|
+
| Show "typing…" to a contact | `POST /api/v1/contacts/{contact}/typing` | `conversations:send` |
|
|
206
281
|
|
|
207
282
|
</details>
|
|
208
283
|
|
|
209
|
-
<details><summary><strong>Templates</strong> (
|
|
284
|
+
<details><summary><strong>Templates</strong> (8)</summary>
|
|
210
285
|
|
|
211
286
|
| Operation | Route | Permission |
|
|
212
287
|
|---|---|---|
|
|
@@ -217,6 +292,7 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
217
292
|
| Get a template's quick reply buttons | `GET /api/v1/templates/{template}/quick-reply-buttons` | `conversations:read` |
|
|
218
293
|
| Send a template ⚠ | `POST /api/v1/devices/{device}/templates/{template}/send-template` | `conversations:send` |
|
|
219
294
|
| Delete a template from a number | `DELETE /api/v1/devices/{device}/templates/{template}` | `conversations:write` |
|
|
295
|
+
| Get a template's metrics | `GET /api/v1/templates/{template}/metrics` | `conversations:read` |
|
|
220
296
|
|
|
221
297
|
</details>
|
|
222
298
|
|
|
@@ -271,7 +347,7 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
271
347
|
|
|
272
348
|
</details>
|
|
273
349
|
|
|
274
|
-
<details><summary><strong>Groups</strong> (
|
|
350
|
+
<details><summary><strong>Groups</strong> (30)</summary>
|
|
275
351
|
|
|
276
352
|
| Operation | Route | Permission |
|
|
277
353
|
|---|---|---|
|
|
@@ -284,6 +360,22 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
284
360
|
| List the session actions on a group "return all" | `GET /api/v1/groups/{group}/actions` | `communities:read` |
|
|
285
361
|
| List the messages sent to a group "return all" | `GET /api/v1/groups/{group}/messages` | `communities:read` |
|
|
286
362
|
| List the scheduled sends that include a group "return all" | `GET /api/v1/groups/{group}/scheduled-messages` | `communities:read` |
|
|
363
|
+
| Create a group ⚠ | `POST /api/v1/groups` | `communities:operate` |
|
|
364
|
+
| Send a message to a group ⚠ | `POST /api/v1/groups/{group}/messages` | `communities:send` |
|
|
365
|
+
| Get a group action ⚠ | `GET /api/v1/groups/actions/{action}` | `communities:read` |
|
|
366
|
+
| Add participants to a group ⚠ | `POST /api/v1/groups/{group}/participants` | `communities:operate` |
|
|
367
|
+
| Remove participants from a group ⚠ | `POST /api/v1/groups/{group}/participants/remove` | `communities:operate` |
|
|
368
|
+
| Make participants admins ⚠ | `POST /api/v1/groups/{group}/admins` | `communities:operate` |
|
|
369
|
+
| Remove the admin role ⚠ | `POST /api/v1/groups/{group}/admins/remove` | `communities:operate` |
|
|
370
|
+
| Rename a group ⚠ | `PUT /api/v1/groups/{group}/name` | `communities:operate` |
|
|
371
|
+
| Change a group's description ⚠ | `PUT /api/v1/groups/{group}/description` | `communities:operate` |
|
|
372
|
+
| Change a group's photo ⚠ | `PUT /api/v1/groups/{group}/photo` | `communities:operate` |
|
|
373
|
+
| Change who can write in a group ⚠ | `PUT /api/v1/groups/{group}/settings` | `communities:operate` |
|
|
374
|
+
| Renew a group's invite link ⚠ | `POST /api/v1/groups/{group}/invite-link/renew` | `communities:operate` |
|
|
375
|
+
| Get a group's live invite link ⚠ | `GET /api/v1/groups/{group}/invite-link/live` | `communities:read` |
|
|
376
|
+
| List a group's join requests ⚠ | `GET /api/v1/groups/{group}/join-requests` | `communities:read` |
|
|
377
|
+
| Approve join requests ⚠ | `POST /api/v1/groups/{group}/join-requests/approve` | `communities:operate` |
|
|
378
|
+
| Reject join requests ⚠ | `POST /api/v1/groups/{group}/join-requests/reject` | `communities:operate` |
|
|
287
379
|
| List a campaign's participants "return all" | `GET /api/v1/campaigns/{campaign}/participants` | `communities:read` |
|
|
288
380
|
| List participants with their current group "return all" | `GET /api/v1/campaigns/{campaign}/campaign-participants` | `communities:read` |
|
|
289
381
|
| List a campaign's joins and leaves "return all" | `GET /api/v1/campaigns/{campaign}/participant-events` | `communities:read` |
|
|
@@ -292,7 +384,7 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
292
384
|
|
|
293
385
|
</details>
|
|
294
386
|
|
|
295
|
-
<details><summary><strong>Numbers</strong> (
|
|
387
|
+
<details><summary><strong>Numbers</strong> (35)</summary>
|
|
296
388
|
|
|
297
389
|
| Operation | Route | Permission |
|
|
298
390
|
|---|---|---|
|
|
@@ -314,6 +406,12 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
314
406
|
| Empty the message queue ⚠ | `DELETE /api/v1/devices/{device}/message-queue/all` | `accounts:operate` |
|
|
315
407
|
| Get the connection status | `GET /api/v1/devices/{device}/status` | `accounts:read` |
|
|
316
408
|
| Get a token for the WhatsApp Web extension | `POST /api/v1/devices/{device}/extension-token` | `accounts:write` |
|
|
409
|
+
| Create a number to connect by QR ⚠ | `POST /api/v1/devices` | `accounts:operate` |
|
|
410
|
+
| Get a number's QR code ⚠ | `GET /api/v1/devices/{device}/qr` | `accounts:operate` |
|
|
411
|
+
| List connect links "return all" | `GET /api/v1/connect-links` | `accounts:read` |
|
|
412
|
+
| Create a connect link ⚠ | `POST /api/v1/connect-links` | `accounts:operate` |
|
|
413
|
+
| Get a connect link ⚠ | `GET /api/v1/connect-links/{link}` | `accounts:read` |
|
|
414
|
+
| Revoke a connect link ⚠ | `DELETE /api/v1/connect-links/{link}` | `accounts:operate` |
|
|
317
415
|
| Get a number's health | `GET /api/v1/devices/{device}/health` | `accounts:read` |
|
|
318
416
|
| Refresh a number's health | `POST /api/v1/devices/{device}/health/refresh` | `accounts:write` |
|
|
319
417
|
| Get the connection history "return all" | `GET /api/v1/devices/{device}/connection-history` | `accounts:read` |
|
|
@@ -332,13 +430,11 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
332
430
|
|
|
333
431
|
| Operation | Route | Permission |
|
|
334
432
|
|---|---|---|
|
|
335
|
-
| List webhook subscriptions ⚠ | `GET /api/v1/webhooks` | `webhooks:read` |
|
|
433
|
+
| List webhook subscriptions ⚠ "return all" | `GET /api/v1/webhooks` | `webhooks:read` |
|
|
336
434
|
| Create a webhook subscription ⚠ | `POST /api/v1/webhooks` | `webhooks:write` |
|
|
337
435
|
| Get a webhook subscription ⚠ | `GET /api/v1/webhooks/{id}` | `webhooks:read` |
|
|
338
436
|
| Update a webhook subscription ⚠ | `PUT /api/v1/webhooks/{id}` | `webhooks:write` |
|
|
339
437
|
| Delete a webhook subscription ⚠ | `DELETE /api/v1/webhooks/{id}` | `webhooks:write` |
|
|
340
|
-
| List a subscription's deliveries ⚠ "return all" | `GET /api/v1/webhooks/{id}/deliveries` | `webhooks:read` |
|
|
341
|
-
| Send a test event ⚠ | `POST /api/v1/webhooks/{id}/test` | `webhooks:write` |
|
|
342
438
|
| List event types | `GET /api/v1/webhooks/events` | `accounts:read` |
|
|
343
439
|
| List webhooks "return all" | `GET /api/v1/webhooks/endpoints` | `accounts:read` |
|
|
344
440
|
| Create a webhook | `POST /api/v1/webhooks/endpoints` | `accounts:write` |
|
|
@@ -347,6 +443,8 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
347
443
|
| Delete a webhook | `DELETE /api/v1/webhooks/endpoints/{id}` | `accounts:write` |
|
|
348
444
|
| Choose a webhook's events | `PUT /api/v1/webhooks/endpoints/{id}/events` | `accounts:write` |
|
|
349
445
|
| List a webhook's deliveries "return all" | `GET /api/v1/webhooks/endpoints/{id}/deliveries` | `accounts:read` |
|
|
446
|
+
| List a subscription's deliveries ⚠ "return all" | `GET /api/v1/webhooks/{id}/deliveries` | `webhooks:read` |
|
|
447
|
+
| Send a test event ⚠ | `POST /api/v1/webhooks/{id}/test` | `webhooks:write` |
|
|
350
448
|
|
|
351
449
|
</details>
|
|
352
450
|
|
|
@@ -359,9 +457,15 @@ The node can also be used as a tool of an n8n AI agent.
|
|
|
359
457
|
1. You choose the **Events** from the list. The list comes from Funnelchat's catalog (`GET /api/v1/webhooks/events`):
|
|
360
458
|
it shows the types that can be subscribed to, the read permission each one needs, and marks the ones that are not
|
|
361
459
|
emitted yet (`planned`). If the key cannot read the catalog (it needs `accounts:read`), it shows the list built into
|
|
362
|
-
the node, copied from the catalog of accounts `v1.
|
|
363
|
-
`message.status_changed`, `
|
|
364
|
-
`group.
|
|
460
|
+
the node, copied from the catalog of accounts `v1.5.97`: 58 types, among them the six of the first use
|
|
461
|
+
(`message.status_changed`, `message.received`, `device.connected`, `device.disconnected`,
|
|
462
|
+
`group_participant.joined` and `group_participant.left`), `whatsapp_form.completed`, `group.message_received` and
|
|
463
|
+
`group_action.completed`.
|
|
464
|
+
|
|
465
|
+
Events go **by name**, always: Funnelchat does not take `*`, and `message.status_changed` (the busiest one) is
|
|
466
|
+
never included by a wildcard. A list with `*`, or an empty one, stops the activation with an error before calling
|
|
467
|
+
the API. From an expression, the events may come as a list or as text separated by commas.
|
|
468
|
+
|
|
365
469
|
2. When the workflow is **activated**, the node creates a subscription in Funnelchat (`POST /api/v1/webhooks`) with
|
|
366
470
|
n8n's URL, those events and the description `n8n · <workflow name>`, and keeps the `id` and the secret Funnelchat
|
|
367
471
|
returns only once.
|
|
@@ -387,7 +491,8 @@ events of those campaigns (`filters.campaign_ids`; with a filter, an event witho
|
|
|
387
491
|
- **A key of the account owner**, with `webhooks:read` and `webhooks:write` and the read permission of the area of each
|
|
388
492
|
event you choose (for example, `conversations:read` for `message.received`, `communities:read` for the group events).
|
|
389
493
|
Without the one of an area, creating the subscription answers `422` on `events`.
|
|
390
|
-
- **Room in the
|
|
494
|
+
- **Room in the workspace:** there is a cap of 50 subscriptions per workspace. The subscription belongs to the
|
|
495
|
+
workspace of the key and receives only that workspace's events.
|
|
391
496
|
|
|
392
497
|
### What reaches the workflow
|
|
393
498
|
|
|
@@ -408,12 +513,14 @@ One item per delivery, with the event envelope as Funnelchat sends it:
|
|
|
408
513
|
},
|
|
409
514
|
"contact": { "id": 2001, "name": "Sample contact", "phone": "+5491100000000" },
|
|
410
515
|
"receiver": { "phone": "+5491100000001" },
|
|
411
|
-
"device_id": 4521
|
|
516
|
+
"device_id": 4521,
|
|
517
|
+
"workspace_id": 37
|
|
412
518
|
}
|
|
413
519
|
}
|
|
414
520
|
```
|
|
415
521
|
|
|
416
|
-
|
|
522
|
+
Every event carries `data.workspace_id`: the workspace it belongs to, which is the one of your key (accounts
|
|
523
|
+
`v1.5.97`). Delivery is "at least once": the same event may arrive twice with the same `id`. If your workflow does not tolerate
|
|
417
524
|
duplicates, keep the processed `id`s and drop the ones you have already seen. The format of each type is in the
|
|
418
525
|
portal's event catalog.
|
|
419
526
|
|
|
@@ -430,11 +537,9 @@ than 300 seconds away from n8n's clock: keep the server's clock in sync. The cod
|
|
|
430
537
|
|
|
431
538
|
1. **Funnelchat Trigger** — Events: "Message received (message.received)".
|
|
432
539
|
2. **If** (optional) — continue only if `{{ $json.data.message.type }}` is `text`.
|
|
433
|
-
3. **Funnelchat** — resource "Conversations and Messages", operation "Send a message
|
|
434
|
-
- Contact ID (in the route and in the body): `{{ $json.data.contact.id }}`
|
|
540
|
+
3. **Funnelchat** — resource "Conversations and Messages", operation "Send a message":
|
|
435
541
|
- Number ID: `{{ $json.data.device_id }}` (it may be `null`; then, the ID from "Numbers → List numbers").
|
|
436
|
-
-
|
|
437
|
-
must be the contact's: otherwise, `422 recipient_mismatch`.
|
|
542
|
+
- Phone: `{{ $json.data.contact.phone }}` (with or without `+`).
|
|
438
543
|
- Additional Fields → Text: `Thanks for writing to us! We will get back to you shortly.`
|
|
439
544
|
|
|
440
545
|
Reply within the contact's 24-hour window: outside it, WhatsApp requires a template ("Templates → Send a template") and
|
|
@@ -484,10 +589,12 @@ its README. By default it listens on `http://localhost:4010`.
|
|
|
484
589
|
|
|
485
590
|
The credential test calls the sandbox's `GET /api/v1/me`.
|
|
486
591
|
|
|
487
|
-
3. **Actions.**
|
|
488
|
-
|
|
489
|
-
built from the specification. Sending with an API key is open in the sandbox, with the API's
|
|
490
|
-
anti-spam guards, and every response carries `X-Request-Id`.
|
|
592
|
+
3. **Actions.** Contacts, conversations and messages, tags, custom fields, templates, WhatsApp forms, numbers
|
|
593
|
+
(connecting them by QR and with connect links too) and webhook subscriptions keep what you do; most of the rest
|
|
594
|
+
answers an example built from the specification. Sending with an API key is open in the sandbox, with the API's
|
|
595
|
+
24-hour window and anti-spam guards, and every response carries `X-Request-Id`. The sandbox `0.2.0` does not have
|
|
596
|
+
**Send a message to a group** and **Get a group action** yet (`405` and `404`), nor `data.workspace_id` in its
|
|
597
|
+
events.
|
|
491
598
|
4. **Trigger.** The sandbox accepts `http` and local URLs, so an n8n on `http://localhost:5678` receives the events.
|
|
492
599
|
Activate the workflow with the **Funnelchat Trigger** and simulate an incoming message:
|
|
493
600
|
|
|
@@ -502,22 +609,29 @@ its README. By default it listens on `http://localhost:4010`.
|
|
|
502
609
|
`http://localhost:5678/` publishing that port, or `http://host.docker.internal:5678/` if the sandbox runs in Docker
|
|
503
610
|
too).
|
|
504
611
|
|
|
612
|
+
Nothing scans a QR in the sandbox: after **Create a number to connect by QR**, `POST /_sandbox/devices/{id}/connect`
|
|
613
|
+
connects it and sends `device.connected`. `POST /_sandbox/groups/participant-joined` (and `…/participant-left`), with
|
|
614
|
+
`{"group": {"uid": "…@g.us", "name": "…"}, "participant": {"phone": "…"}}`, sends the group events.
|
|
615
|
+
|
|
505
616
|
5. **What the sandbox does not show you:** with the real API, n8n's URL has to be `https` and public (try it with
|
|
506
617
|
`npx @funnelchat-hq/sandbox --require-https`).
|
|
507
618
|
|
|
508
|
-
The end-to-end tests (`npm run test:e2e`, see [Development](#development)) passed on 2026-
|
|
509
|
-
`
|
|
510
|
-
`
|
|
511
|
-
|
|
512
|
-
|
|
619
|
+
The end-to-end tests (`npm run test:e2e`, see [Development](#development)) passed on 2026-11-04 against the sandbox
|
|
620
|
+
`0.2.0` (`main` @ `b3b4513`): the first use of 0.2.0 (**Send a message** to a contact and the trigger up to `read`, with the
|
|
621
|
+
`client_reference`), a number created by QR, its QR and `device.connected` through the trigger, a connect link
|
|
622
|
+
created, read, listed by reference and revoked, the group participant events, sending and reading a message, file by
|
|
623
|
+
URL, `X-Request-Id` in errors, and a WhatsApp form created, published, sent and completed through the trigger. By
|
|
624
|
+
hand, on 2026-10-16 with n8n 2.25.7 and the sandbox @ `7a1b3d8`: the credential test, a workflow with "Create or update
|
|
625
|
+
a contact" and "List tags", and the full trigger cycle.
|
|
513
626
|
|
|
514
627
|
## Regenerating
|
|
515
628
|
|
|
516
629
|
The node's operations are not written by hand: they come from `spec/funnelchat.json` with `npm run generate`. When
|
|
517
630
|
the portal publishes a new specification:
|
|
518
631
|
|
|
519
|
-
1. Copy the portal's unified specification (`
|
|
520
|
-
`spec/funnelchat.json`.
|
|
632
|
+
1. Copy the portal's **full** unified specification (`generated/specs/funnelchat-completa.json`, built by its
|
|
633
|
+
`npm run build`) to `spec/funnelchat.json`. Not the published `/specs/funnelchat.json`: that one only carries the
|
|
634
|
+
operations the portal shows, and generating from it would drop the rest from the node.
|
|
521
635
|
2. Write down in `spec/PROVENANCE.md` where it came from: branch, commit, date and SHA-256
|
|
522
636
|
(`shasum -a 256 spec/funnelchat.json`). The generator refuses to run if the SHA-256 is not there.
|
|
523
637
|
3. Run `npm run generate`. It updates `nodes/Funnelchat/generated/operations.ts` and this README's operations table,
|
|
@@ -529,22 +643,30 @@ What changes on its own, without touching code: new operations, permissions, fie
|
|
|
529
643
|
|
|
530
644
|
- **English texts.** The portal's specification is in Spanish. The name and purpose of each of its operations are in
|
|
531
645
|
`scripts/operations.en.json`: a new operation without an entry makes the generator stop and ask for one.
|
|
532
|
-
- **`scripts/generator.config.json`.** Which tags of the specification go into each resource
|
|
533
|
-
the fields (the ones not listed show their API name)
|
|
534
|
-
|
|
535
|
-
a domain's code requires and its specification does not say
|
|
536
|
-
still needed
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
specification
|
|
646
|
+
- **`scripts/generator.config.json`.** Which tags of the specification go into each resource; the English labels of
|
|
647
|
+
the fields (the ones not listed show their API name) and their English descriptions (`fieldDescriptionsByName`; a
|
|
648
|
+
description of the specification in Spanish is not shown, and the generator warns); in `operationNotes`, notices
|
|
649
|
+
of what a domain's code requires and its specification does not say (check on each regeneration whether they are
|
|
650
|
+
still needed); and what keeps saved workflows working when the specification changes what the node published:
|
|
651
|
+
`keepOperationValues` (a renamed operation keeps its old value), `keepFieldKinds` (a field keeps its kind),
|
|
652
|
+
`fieldDefaults` (the option shown first) and `extraParameters` (query fields the code reads and the specification
|
|
653
|
+
does not list).
|
|
654
|
+
- **Supplements.** `spec/supplements/` has what the specification does not have yet: from conversations, the WhatsApp
|
|
655
|
+
forms and the poll and event invitation, which the node keeps.
|
|
656
|
+
They are written in English. If a new specification includes a route of a supplement, the generator uses the
|
|
657
|
+
specification's and says the supplement is no longer needed: remove it from the config then. A supplement with
|
|
658
|
+
`"replaces": true` wins over the specification instead, with the same `operationId`; none has it today.
|
|
543
659
|
- **Event catalog.** `spec/webhook-events.json` is a copy of `GET /api/v1/webhooks/events` (the trigger's fallback
|
|
544
660
|
list). Replace it with a new copy (for example `snapshots/accounts/events.json` of the portal), write it down in
|
|
545
661
|
`spec/PROVENANCE.md`, add the English label of any new type to `scripts/events.en.json` and regenerate.
|
|
546
662
|
- **Watch out for `operationId` changes.** The value of each operation in n8n is its `operationId`. If the
|
|
547
|
-
specification changes
|
|
663
|
+
specification changes one the node published, add it to `keepOperationValues` (it happened with "Get a message":
|
|
664
|
+
`message.showMessage` in the specification, `showMessage` in the node). Two tests guard this: every operation the
|
|
665
|
+
node has published (`test/fixtures/published-operations.json`) is still there in its resource, and the default
|
|
666
|
+
operation of each resource does not change.
|
|
667
|
+
- **Compare before and after.** For the operations the node already had, look in the diff of
|
|
668
|
+
`generated/operations.ts` for a field that disappears, changes its `name` or kind, or becomes required: a saved
|
|
669
|
+
workflow could lose its value.
|
|
548
670
|
|
|
549
671
|
## Development
|
|
550
672
|
|
|
@@ -558,8 +680,8 @@ FUNNELCHAT_SANDBOX_URL=http://127.0.0.1:4010 npm run test:e2e # e2e against a
|
|
|
558
680
|
npm run dev # starts n8n on http://localhost:5678 with the node loaded
|
|
559
681
|
```
|
|
560
682
|
|
|
561
|
-
**Publishing:**
|
|
562
|
-
(`.github/workflows/publish.yml`) publishes it
|
|
683
|
+
**Publishing:** a `vX.Y.Z` tag on `main`, matching the `package.json` version; GitHub Actions
|
|
684
|
+
(`.github/workflows/publish.yml`) publishes it through npm Trusted Publishing.
|
|
563
685
|
|
|
564
686
|
- `nodes/Funnelchat/`: the action node. `generated/operations.ts` is the generated table; `description.ts` builds the
|
|
565
687
|
fields from it and `request.ts` builds the requests (route, query and body) and the pagination.
|
|
@@ -567,19 +689,20 @@ npm run dev # starts n8n on http://localhost:5678 with the nod
|
|
|
567
689
|
- `nodes/shared/`: the transport (key, base URL, errors, `429`) and the signature check.
|
|
568
690
|
- `test/`: the signature with the portal's vectors, building requests and pagination, the trigger's create, check and
|
|
569
691
|
delete cycle, and the custom base URL.
|
|
570
|
-
- `test/e2e/`: the node with real HTTP against the sandbox:
|
|
571
|
-
|
|
572
|
-
`FUNNELCHAT_SANDBOX_URL` it is
|
|
692
|
+
- `test/e2e/`: the node with real HTTP against the sandbox: the first use, connecting a number by QR and with a
|
|
693
|
+
connect link, the group participant events, send and read a message, file by URL, `X-Request-Id` in errors, the
|
|
694
|
+
trigger cycle with a really signed event, and a WhatsApp form end to end. Without `FUNNELCHAT_SANDBOX_URL` it is
|
|
695
|
+
skipped.
|
|
573
696
|
|
|
574
697
|
## Sources and what is left to verify
|
|
575
698
|
|
|
576
|
-
| What | Where it comes from
|
|
577
|
-
| ------------------------------------------------------- |
|
|
578
|
-
| The unified specification (most operations)
|
|
579
|
-
|
|
|
580
|
-
|
|
|
581
|
-
| The trigger's fallback event catalog | accounts tag `v1.
|
|
582
|
-
| The signature algorithm and vectors, the event envelope | developers-portal (`snippets/verificar-firma.js`, `tests/test_firmas.py`)
|
|
583
|
-
| The local sandbox of "Testing with the sandbox" | funnelchat-sandbox `
|
|
699
|
+
| What | Where it comes from | Status on 2026-11-04 |
|
|
700
|
+
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
701
|
+
| The full unified specification (most operations) | developers-portal `main` @ `f5464516` (`v0.6.2`), with the snapshots of accounts `v1.5.97`, conversations `v1.19.21` and communities `v2.35.5` | The versions in production on 2026-11-05; sending by phone since conversations `v1.19.21` |
|
|
702
|
+
| WhatsApp forms, poll and event invitation | conversations tag `v1.18.10`, read from the code and checked again against `v1.19.7` (production); the 15-10 copy of the specification | Forms open to API keys, routed by api-edge; the portal leaves them out (its edge table is from 13-10). Poll and event are still closed to keys. `operationId`s of the forms not checked against a generated specification |
|
|
703
|
+
| A message to a group, and the other group actions | The specification (communities `v2.35.5`) | Open to API keys in production (`communities:send` to send, `communities:operate` to act on a group) |
|
|
704
|
+
| The trigger's fallback event catalog | accounts tag `v1.5.97`, extracted from the code | 59 types, 54 being emitted; every event carries `data.workspace_id` |
|
|
705
|
+
| The signature algorithm and vectors, the event envelope | developers-portal (`snippets/verificar-firma.js`, `tests/test_firmas.py`) | Published |
|
|
706
|
+
| The local sandbox of "Testing with the sandbox" | funnelchat-sandbox `0.2.0` (`main` @ `b3b4513`) | No group messages nor `workspace_id` yet |
|
|
584
707
|
|
|
585
708
|
The details of each source are in [`spec/PROVENANCE.md`](spec/PROVENANCE.md).
|
|
@@ -113,7 +113,7 @@ class Funnelchat {
|
|
|
113
113
|
group: ['transform'],
|
|
114
114
|
version: 1,
|
|
115
115
|
subtitle: '={{$parameter["operation"]}}',
|
|
116
|
-
description: '
|
|
116
|
+
description: 'Connect WhatsApp numbers, send messages and templates, and work with contacts, groups, WhatsApp forms, tags, custom fields and webhooks of the Funnelchat public API',
|
|
117
117
|
defaults: {
|
|
118
118
|
name: 'Funnelchat',
|
|
119
119
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Funnelchat.node.js","sourceRoot":"","sources":["../../../nodes/Funnelchat/Funnelchat.node.ts"],"names":[],"mappings":";;;AA6BA,sCAEC;AA/BD,+CAUsB;AACtB,mDAA2D;AAC3D,+CAA8F;AAC9F,uDAA+D;AAE/D,uCASmB;AAGnB,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,SAAgB,aAAa,CAAC,QAAgB,EAAE,SAAiB;IAChE,OAAO,uBAAU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|
|
6
6
|
exports.buildProperties = buildProperties;
|
|
7
7
|
function isTopLevel(param) {
|
|
8
|
-
return param.location === 'path' || param.required;
|
|
8
|
+
return param.location === 'path' || param.required || param.topLevel === true;
|
|
9
9
|
}
|
|
10
10
|
function hasJsonBodyOption(op) {
|
|
11
11
|
var _a;
|
|
@@ -138,7 +138,7 @@ function operationProperties(op) {
|
|
|
138
138
|
return props;
|
|
139
139
|
}
|
|
140
140
|
function buildProperties(resources, operations) {
|
|
141
|
-
var _a, _b, _c;
|
|
141
|
+
var _a, _b, _c, _d;
|
|
142
142
|
const defaultResource = (_b = (_a = resources[0]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
|
|
143
143
|
const props = [
|
|
144
144
|
{
|
|
@@ -160,7 +160,7 @@ function buildProperties(resources, operations) {
|
|
|
160
160
|
.sort((a, b) => a.name.localeCompare(b.name, 'es'));
|
|
161
161
|
if (ops.length === 0)
|
|
162
162
|
continue;
|
|
163
|
-
const defaultOperation = (
|
|
163
|
+
const defaultOperation = (_c = resource.defaultOperation) !== null && _c !== void 0 ? _c : ((_d = ops.find((o) => o.list)) !== null && _d !== void 0 ? _d : ops[0]).value;
|
|
164
164
|
props.push({
|
|
165
165
|
displayName: 'Operation',
|
|
166
166
|
name: 'operation',
|