n8n-nodes-chatery-whatsapp 0.1.3 → 0.2.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/README.md +204 -228
- package/dist/nodes/ChateryWhatsApp/ChateryWhatsApp.node.js +359 -18
- package/dist/nodes/ChateryWhatsApp/ChateryWhatsApp.node.js.map +1 -1
- package/dist/nodes/ChateryWhatsApp/ChateryWhatsAppTrigger.node.js +60 -20
- package/dist/nodes/ChateryWhatsApp/ChateryWhatsAppTrigger.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,247 +1,223 @@
|
|
|
1
|
-
|
|
1
|
+
# n8n-nodes-chatery-whatsapp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
This
|
|
5
|
+
This is an n8n community node for integrating with **[Chatery WhatsApp API](https://github.com/farinchan/chatery_whatsapp)**. It allows you to automate WhatsApp messaging, manage sessions, retrieve chat history, handle groups, and send bulk messages directly from your n8n workflows.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
> **New to building n8n nodes?** The fastest way to get started is with `npm create @n8n/node`. This command scaffolds a complete node package for you using the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli).
|
|
9
|
+
## Table of Contents
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Credentials](#credentials)
|
|
13
|
+
- [Nodes](#nodes)
|
|
14
|
+
- [Chatery WhatsApp Trigger](#chatery-whatsapp-trigger)
|
|
15
|
+
- [Chatery WhatsApp](#chatery-whatsapp)
|
|
16
|
+
- [Resources & Operations](#resources--operations)
|
|
17
|
+
- [Compatibility](#compatibility)
|
|
18
|
+
- [Usage Examples](#usage-examples)
|
|
19
|
+
- [Links](#links)
|
|
20
|
+
- [License](#license)
|
|
13
21
|
|
|
14
|
-
|
|
15
|
-
npm create @n8n/node
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Already using this starter? Start developing with:**
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm run dev
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
This starts n8n with your nodes loaded and hot reload enabled.
|
|
25
|
-
|
|
26
|
-
## What's Included
|
|
27
|
-
|
|
28
|
-
This starter repository includes two example nodes to learn from:
|
|
29
|
-
|
|
30
|
-
- **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
|
|
31
|
-
- **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
|
|
32
|
-
- **Low-code approach** - Define operations declaratively without writing request logic
|
|
33
|
-
- Multiple resources (Issues, Comments)
|
|
34
|
-
- Multiple operations (Get, Get All, Create)
|
|
35
|
-
- Two authentication methods (OAuth2 and Personal Access Token)
|
|
36
|
-
- List search functionality for dynamic dropdowns
|
|
37
|
-
- Proper error handling and typing
|
|
38
|
-
- Ideal for HTTP API-based integrations
|
|
39
|
-
|
|
40
|
-
> [!TIP]
|
|
41
|
-
> The declarative/low-code style (used in GitHub Issues) is the recommended approach for building nodes that interact with HTTP APIs. It significantly reduces boilerplate code and handles requests automatically.
|
|
42
|
-
|
|
43
|
-
Browse these examples to understand both approaches, then modify them or create your own.
|
|
44
|
-
|
|
45
|
-
## Finding Inspiration
|
|
46
|
-
|
|
47
|
-
Looking for more examples? Check out these resources:
|
|
48
|
-
|
|
49
|
-
- **[npm Community Nodes](https://www.npmjs.com/search?q=keywords:n8n-community-node-package)** - Browse thousands of community-built nodes on npm using the `n8n-community-node-package` tag
|
|
50
|
-
- **[n8n Built-in Nodes](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/nodes)** - Study the source code of n8n's official nodes for production-ready patterns and best practices
|
|
51
|
-
- **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
|
|
52
|
-
|
|
53
|
-
These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
|
|
54
|
-
|
|
55
|
-
## Prerequisites
|
|
56
|
-
|
|
57
|
-
Before you begin, install the following on your development machine:
|
|
58
|
-
|
|
59
|
-
### Required
|
|
60
|
-
|
|
61
|
-
- **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
|
|
62
|
-
- Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
|
|
63
|
-
- Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
|
|
64
|
-
- **[git](https://git-scm.com/downloads)**
|
|
65
|
-
|
|
66
|
-
### Recommended
|
|
67
|
-
|
|
68
|
-
- Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
|
|
69
|
-
|
|
70
|
-
> [!NOTE]
|
|
71
|
-
> The `@n8n/node-cli` is included as a dev dependency and will be installed automatically when you run `npm install`. The CLI includes n8n for local development, so you don't need to install n8n globally.
|
|
72
|
-
|
|
73
|
-
## Getting Started with this Starter
|
|
74
|
-
|
|
75
|
-
Follow these steps to create your own n8n community node package:
|
|
76
|
-
|
|
77
|
-
### 1. Create Your Repository
|
|
78
|
-
|
|
79
|
-
[Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
git clone https://github.com/<your-organization>/<your-repo-name>.git
|
|
83
|
-
cd <your-repo-name>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### 2. Install Dependencies
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
npm install
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
This installs all required dependencies including the `@n8n/node-cli`.
|
|
93
|
-
|
|
94
|
-
### 3. Explore the Examples
|
|
95
|
-
|
|
96
|
-
Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
|
|
97
|
-
|
|
98
|
-
- Start with [nodes/Example/](nodes/Example/) for a basic node
|
|
99
|
-
- Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
|
|
100
|
-
|
|
101
|
-
### 4. Build Your Node
|
|
102
|
-
|
|
103
|
-
Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
|
|
104
|
-
|
|
105
|
-
> [!TIP]
|
|
106
|
-
> If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
|
|
107
|
-
|
|
108
|
-
### 5. Configure Your Package
|
|
109
|
-
|
|
110
|
-
Update `package.json` with your details:
|
|
111
|
-
|
|
112
|
-
- `name` - Your package name (must start with `n8n-nodes-`)
|
|
113
|
-
- `author` - Your name and email
|
|
114
|
-
- `repository` - Your repository URL
|
|
115
|
-
- `description` - What your node does
|
|
116
|
-
|
|
117
|
-
Make sure your node is registered in the `n8n.nodes` array.
|
|
22
|
+
## Installation
|
|
118
23
|
|
|
119
|
-
|
|
24
|
+
Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
|
|
120
25
|
|
|
121
|
-
|
|
26
|
+
### npm Installation
|
|
122
27
|
|
|
123
28
|
```bash
|
|
124
|
-
npm
|
|
29
|
+
npm install n8n-nodes-chatery-whatsapp
|
|
125
30
|
```
|
|
126
31
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
|
208
|
-
|
|
|
209
|
-
|
|
|
210
|
-
|
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
32
|
+
### Manual Installation
|
|
33
|
+
|
|
34
|
+
1. Go to **Settings > Community Nodes**
|
|
35
|
+
2. Select **Install**
|
|
36
|
+
3. Enter `n8n-nodes-chatery-whatsapp` in the **Enter npm package name** field
|
|
37
|
+
4. Agree to the risks of using community nodes
|
|
38
|
+
5. Click **Install**
|
|
39
|
+
|
|
40
|
+
## Credentials
|
|
41
|
+
|
|
42
|
+
To use this node, you need to configure the **Chatery API** credentials:
|
|
43
|
+
|
|
44
|
+
| Field | Description |
|
|
45
|
+
|-------|-------------|
|
|
46
|
+
| **URL** | Your Chatery WhatsApp API host URL (e.g., `https://api.chatery.app`) |
|
|
47
|
+
| **API Key** | Your API key for authentication (X-Api-Key header) |
|
|
48
|
+
|
|
49
|
+
## Nodes
|
|
50
|
+
|
|
51
|
+
This package includes two nodes:
|
|
52
|
+
|
|
53
|
+
### Chatery WhatsApp Trigger
|
|
54
|
+
|
|
55
|
+
A webhook trigger node that listens for WhatsApp events from the Chatery API.
|
|
56
|
+
|
|
57
|
+
**Supported Events:**
|
|
58
|
+
|
|
59
|
+
| Event | Description |
|
|
60
|
+
|-------|-------------|
|
|
61
|
+
| `all` | Listen to all events |
|
|
62
|
+
| `qr` | QR code generated for authentication |
|
|
63
|
+
| `connection.update` | Connection status changed (connected, disconnected) |
|
|
64
|
+
| `message` | New message received |
|
|
65
|
+
| `message.sent` | Message sent confirmation |
|
|
66
|
+
| `message.update` | Message status update (read, delivered) |
|
|
67
|
+
| `message.reaction` | Message reaction added |
|
|
68
|
+
| `message.revoke` | Message deleted/revoked |
|
|
69
|
+
| `presence.update` | Typing, online status |
|
|
70
|
+
| `group.participants` | Group members changed |
|
|
71
|
+
| `group.update` | Group info changed |
|
|
72
|
+
| `chat.update` | Chat updated |
|
|
73
|
+
| `chat.upsert` | New chat created |
|
|
74
|
+
| `chat.delete` | Chat deleted |
|
|
75
|
+
| `contact.update` | Contact updated |
|
|
76
|
+
| `call` | Incoming call |
|
|
77
|
+
| `labels` | Labels updated (business) |
|
|
78
|
+
| `logged.out` | Session logged out |
|
|
79
|
+
|
|
80
|
+
**Options:**
|
|
81
|
+
- **Session Filter**: Filter events by specific session ID
|
|
82
|
+
- **Chat ID Filter**: Filter events by specific chat ID
|
|
83
|
+
- **Ignore Status**: Ignore status/story updates
|
|
84
|
+
- **Only From Me**: Only receive messages sent by you
|
|
85
|
+
- **Only From Others**: Only receive messages from others
|
|
86
|
+
|
|
87
|
+
### Chatery WhatsApp
|
|
88
|
+
|
|
89
|
+
The main node for performing WhatsApp operations via HTTP requests.
|
|
90
|
+
|
|
91
|
+
## Resources & Operations
|
|
92
|
+
|
|
93
|
+
### Bulk Resource (NEW!)
|
|
94
|
+
|
|
95
|
+
Send messages to multiple recipients with background processing.
|
|
96
|
+
|
|
97
|
+
| Operation | Description |
|
|
98
|
+
|-----------|-------------|
|
|
99
|
+
| **Send Bulk Text** | Send a text message to multiple recipients |
|
|
100
|
+
| **Send Bulk Image** | Send an image to multiple recipients |
|
|
101
|
+
| **Send Bulk Document** | Send a document to multiple recipients |
|
|
102
|
+
| **Get Job Status** | Get status of a bulk messaging job |
|
|
103
|
+
| **Get All Jobs** | Get all bulk messaging jobs |
|
|
104
|
+
|
|
105
|
+
### Chat Resource
|
|
106
|
+
|
|
107
|
+
| Operation | Description |
|
|
108
|
+
|-----------|-------------|
|
|
109
|
+
| **Send Text** | Send a text message (supports replyTo) |
|
|
110
|
+
| **Send Image** | Send an image with optional caption (supports replyTo) |
|
|
111
|
+
| **Send Document** | Send a document/file (supports replyTo) |
|
|
112
|
+
| **Send Location** | Send a location with coordinates (supports replyTo) |
|
|
113
|
+
| **Send Contact** | Send a contact card (supports replyTo) |
|
|
114
|
+
| **Send Button** | Send a message with buttons (supports replyTo) |
|
|
115
|
+
| **Send Presence Update** | Update your presence status |
|
|
116
|
+
| **Check Number** | Check if a number is registered on WhatsApp |
|
|
117
|
+
| **Profile Picture** | Get a contact's profile picture URL |
|
|
118
|
+
| **Contact Info** | Get detailed information about a contact |
|
|
119
|
+
|
|
120
|
+
> **NEW:** All send operations now support `replyTo` parameter to reply/quote specific messages!
|
|
121
|
+
|
|
122
|
+
### Session Resource
|
|
123
|
+
|
|
124
|
+
| Operation | Description |
|
|
125
|
+
|-----------|-------------|
|
|
126
|
+
| **List** | List all available sessions |
|
|
127
|
+
| **Connect** | Connect/start a new session |
|
|
128
|
+
| **Get Status** | Get the status of a session |
|
|
129
|
+
| **Update Config** | Update session configuration |
|
|
130
|
+
| **Add Webhook** | Add a webhook URL to receive events |
|
|
131
|
+
| **Remove Webhook** | Remove a webhook from the session |
|
|
132
|
+
| **Get QR Code** | Get QR code as text for authentication |
|
|
133
|
+
| **Get QR Image** | Get QR code as image for authentication |
|
|
134
|
+
| **Delete** | Delete/terminate a session |
|
|
135
|
+
|
|
136
|
+
### History Resource
|
|
137
|
+
|
|
138
|
+
| Operation | Description |
|
|
139
|
+
|-----------|-------------|
|
|
140
|
+
| **Get Overview** | Get an overview of all chats |
|
|
141
|
+
| **Get Contacts** | Get list of all contacts |
|
|
142
|
+
| **Get Messages** | Get messages from a specific chat |
|
|
143
|
+
| **Get Chat Info** | Get detailed information about a chat |
|
|
144
|
+
| **Mark as Read** | Mark messages in a chat as read |
|
|
145
|
+
|
|
146
|
+
### Group Resource
|
|
147
|
+
|
|
148
|
+
| Operation | Description |
|
|
149
|
+
|-----------|-------------|
|
|
150
|
+
| **List** | List all groups you're a member of |
|
|
151
|
+
| **Create** | Create a new group |
|
|
152
|
+
| **Get Metadata** | Get group metadata/information |
|
|
153
|
+
| **Add Participants** | Add participants to a group |
|
|
154
|
+
| **Remove Participants** | Remove participants from a group |
|
|
155
|
+
| **Promote Participants** | Promote participants to admin |
|
|
156
|
+
| **Demote Participants** | Demote admins to regular participants |
|
|
157
|
+
| **Update Subject** | Update group name/subject |
|
|
158
|
+
| **Update Description** | Update group description |
|
|
159
|
+
| **Update Settings** | Set who can send messages or edit group info |
|
|
160
|
+
| **Update Picture** | Update group picture |
|
|
161
|
+
| **Leave** | Leave a group |
|
|
162
|
+
| **Get Invite Code** | Get group invite code |
|
|
163
|
+
| **Revoke Invite** | Revoke and generate new invite code |
|
|
164
|
+
| **Join** | Join a group using invite code |
|
|
165
|
+
|
|
166
|
+
## Compatibility
|
|
167
|
+
|
|
168
|
+
- **n8n version**: 0.5.0 or later
|
|
169
|
+
- **Node.js**: 18.10 or later
|
|
170
|
+
|
|
171
|
+
## Usage Examples
|
|
172
|
+
|
|
173
|
+
### Example 1: Auto-reply to Messages
|
|
174
|
+
|
|
175
|
+
1. Add **Chatery WhatsApp Trigger** node with `message` event
|
|
176
|
+
2. Add **Chatery WhatsApp** node with **Send Text** operation
|
|
177
|
+
3. Connect the trigger to the send node
|
|
178
|
+
4. Map the incoming chat ID to the recipient
|
|
232
179
|
|
|
233
|
-
|
|
180
|
+
### Example 2: Send Bulk Notifications
|
|
181
|
+
|
|
182
|
+
1. Use any trigger (e.g., Webhook, Schedule)
|
|
183
|
+
2. Add **Chatery WhatsApp** node
|
|
184
|
+
3. Select **Bulk** resource and **Send Bulk Text** operation
|
|
185
|
+
4. Enter comma-separated phone numbers and your message
|
|
186
|
+
5. Track job status using **Get Job Status** operation
|
|
234
187
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
188
|
+
### Example 3: Reply to Specific Message
|
|
189
|
+
|
|
190
|
+
1. Capture the message ID from incoming webhook
|
|
191
|
+
2. Use **Chat** resource with **Send Text** operation
|
|
192
|
+
3. Set the `replyTo` parameter with the message ID
|
|
193
|
+
|
|
194
|
+
### Example 4: Session Management
|
|
195
|
+
|
|
196
|
+
1. Use **Chatery WhatsApp** node
|
|
197
|
+
2. Select **Session** resource
|
|
198
|
+
3. Use **Connect** to start a new session
|
|
199
|
+
4. Use **Get QR Image** to get the QR code for scanning
|
|
200
|
+
5. Use **Get Status** to check connection status
|
|
201
|
+
|
|
202
|
+
## Links
|
|
203
|
+
|
|
204
|
+
- [Chatery WhatsApp API](https://github.com/farinchan/chatery_whatsapp)
|
|
205
|
+
- [Chatery Documentation](https://docs.chatery.app)
|
|
206
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
207
|
+
|
|
208
|
+
## Author
|
|
209
|
+
|
|
210
|
+
**Fajri Rinaldi Chan** (Farin Chan)
|
|
211
|
+
- Email: fajri@gariskode.com
|
|
212
|
+
- GitHub: [@farinchan](https://github.com/farinchan)
|
|
213
|
+
|
|
214
|
+
## Support
|
|
240
215
|
|
|
241
|
-
|
|
216
|
+
If you find this project helpful, consider supporting the development:
|
|
242
217
|
|
|
243
|
-
|
|
218
|
+
- [Saweria](https://saweria.co/fajrichan)
|
|
219
|
+
- [PayPal](https://paypal.me/farinchan)
|
|
244
220
|
|
|
245
221
|
## License
|
|
246
222
|
|
|
247
|
-
[MIT](
|
|
223
|
+
[MIT](LICENSE.md)
|