n8n-nodes-base-wework 2.1.6 → 2.1.7
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
CHANGED
|
@@ -1,396 +1,396 @@
|
|
|
1
|
-
# n8n-nodes-base-wework
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-

|
|
6
|
-
|
|
7
|
-
**Tích hợp hoàn chỉnh Base WeWork API vào n8n** - Quản lý projects, tasks, departments với action nodes và webhook triggers cho sự kiện real-time!
|
|
8
|
-
|
|
9
|
-
## 🚀 Quick Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install n8n-nodes-base-wework
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Sau đó restart n8n để load node.
|
|
16
|
-
|
|
17
|
-
## ✨ Features
|
|
18
|
-
|
|
19
|
-
### Action Node (Base WeWork)
|
|
20
|
-
- 🎯 **15+ Operations** - Quản lý đầy đủ các hoạt động từ Base WeWork API v3
|
|
21
|
-
- 📦 **3 Resources** - Project, Task, Department
|
|
22
|
-
- 🔐 **Secure Authentication** - API key authentication với domain configuration
|
|
23
|
-
- ⚡ **Production Ready** - Error handling, type-safe, tested
|
|
24
|
-
|
|
25
|
-
### Trigger Node (Base WeWork Trigger)
|
|
26
|
-
- ⚡ **6 Webhook Triggers** - Nhận sự kiện real-time từ Base WeWork
|
|
27
|
-
- 🎪 **Task Events** - Task created, done, status updated
|
|
28
|
-
- 📋 **Subtask Events** - Subtask created, done, status updated
|
|
29
|
-
- 🔔 **Real-time** - Phản ứng ngay lập tức với các thay đổi
|
|
30
|
-
|
|
31
|
-
## 📚 Resources & Operations
|
|
32
|
-
|
|
33
|
-
### Action Node Resources
|
|
34
|
-
|
|
35
|
-
| Resource | Operations | Description |
|
|
36
|
-
|----------|-----------|-------------|
|
|
37
|
-
| 📁 **Project** | Create, Edit, Get Full, List | Quản lý dự án (tạo, sửa, xem chi tiết, danh sách) |
|
|
38
|
-
| ✅ **Task** | Create, Create Subtask, Edit Basic Info, Edit Extra, Get, List by Project, Mark Done | Quản lý công việc và subtask |
|
|
39
|
-
| 🏢 **Department** | Create, Edit, Get, List, Remove | Quản lý phòng ban |
|
|
40
|
-
|
|
41
|
-
### Trigger Node Events
|
|
42
|
-
|
|
43
|
-
| Event | Description |
|
|
44
|
-
|-------|-------------|
|
|
45
|
-
| 🆕 **On Task Created** | Trigger khi task mới được tạo |
|
|
46
|
-
| ✅ **On Task Done** | Trigger khi task được đánh dấu hoàn thành |
|
|
47
|
-
| 🔄 **On Task Status Updated** | Trigger khi trạng thái task thay đổi |
|
|
48
|
-
| 📋 **On Subtask Created** | Trigger khi subtask mới được tạo |
|
|
49
|
-
| ✔️ **On Subtask Done** | Trigger khi subtask được đánh dấu hoàn thành |
|
|
50
|
-
| 🔄 **On Subtask Status Updated** | Trigger khi trạng thái subtask thay đổi |
|
|
51
|
-
|
|
52
|
-
## 🔧 Setup
|
|
53
|
-
|
|
54
|
-
### 1. Install node
|
|
55
|
-
```bash
|
|
56
|
-
npm install n8n-nodes-base-wework
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 2. Restart n8n
|
|
60
|
-
```bash
|
|
61
|
-
n8n start
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### 3. Configure Credential
|
|
65
|
-
1. Mở n8n UI → **Credentials** → **Add Credential**
|
|
66
|
-
2. Chọn **Base WeWork API**
|
|
67
|
-
3. Nhập:
|
|
68
|
-
- **Domain**: `basevn.tech` (hoặc domain Base WeWork của bạn)
|
|
69
|
-
- **Access Token**: Token từ Base WeWork
|
|
70
|
-
4. Click **Save**
|
|
71
|
-
|
|
72
|
-
### 4. Use in Workflow
|
|
73
|
-
- Add node → Search "Base WeWork"
|
|
74
|
-
- Select credential
|
|
75
|
-
- Choose Resource and Operation
|
|
76
|
-
- Execute! ⚡
|
|
77
|
-
|
|
78
|
-
## 📖 Example Usage
|
|
79
|
-
|
|
80
|
-
### Action Node Examples
|
|
81
|
-
|
|
82
|
-
#### Create Project
|
|
83
|
-
```yaml
|
|
84
|
-
Node: Base WeWork
|
|
85
|
-
Resource: Project
|
|
86
|
-
Operation: Create
|
|
87
|
-
Username: @admin
|
|
88
|
-
Metatype: project
|
|
89
|
-
Name: My New Project
|
|
90
|
-
External: Inhouse (0)
|
|
91
|
-
Owners: @admin
|
|
92
|
-
Content: Project description
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
#### Create Task
|
|
96
|
-
```yaml
|
|
97
|
-
Node: Base WeWork
|
|
98
|
-
Resource: Task
|
|
99
|
-
Operation: Create
|
|
100
|
-
Username: @admin
|
|
101
|
-
Project ID: 123
|
|
102
|
-
Tasklist ID: 456
|
|
103
|
-
Name: Important Task
|
|
104
|
-
Content: Task description
|
|
105
|
-
Assign: @user
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
#### List Projects
|
|
109
|
-
```yaml
|
|
110
|
-
Node: Base WeWork
|
|
111
|
-
Resource: Project
|
|
112
|
-
Operation: List
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Trigger Node Examples
|
|
116
|
-
|
|
117
|
-
#### Trigger on Task Created
|
|
118
|
-
```yaml
|
|
119
|
-
Node: Base WeWork Trigger
|
|
120
|
-
Event: On Task Created
|
|
121
|
-
# Webhook URL sẽ được tạo tự động
|
|
122
|
-
# Cấu hình webhook này trong Base WeWork để nhận events
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
#### Trigger on Task Done
|
|
126
|
-
```yaml
|
|
127
|
-
Node: Base WeWork Trigger
|
|
128
|
-
Event: On Task Done
|
|
129
|
-
# Tự động trigger workflow khi task được hoàn thành
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
## 🌐 API Documentation
|
|
133
|
-
|
|
134
|
-
Full API documentation: https://documenter.getpostman.com/view/1345096/SztA68Az?version=latest
|
|
135
|
-
|
|
136
|
-
## 🛠️ Development
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
# Clone repository
|
|
140
|
-
git clone https://github.com/basevn/n8n-nodes-base-wework.git
|
|
141
|
-
cd n8n-nodes-base-wework
|
|
142
|
-
|
|
143
|
-
# Install dependencies
|
|
144
|
-
npm install
|
|
145
|
-
|
|
146
|
-
# Build
|
|
147
|
-
npm run build
|
|
148
|
-
|
|
149
|
-
# Link for local development
|
|
150
|
-
npm link
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## 📝 License
|
|
154
|
-
|
|
155
|
-
MIT © BaseVN
|
|
156
|
-
|
|
157
|
-
## 🆘 Support
|
|
158
|
-
|
|
159
|
-
- 📧 Email: support@basevn.tech
|
|
160
|
-
- 🌐 Website: https://basevn.tech
|
|
161
|
-
- 📖 Documentation: https://github.com/basevn/n8n-nodes-base-wework
|
|
162
|
-
|
|
163
|
-
## 🙏 Credits
|
|
164
|
-
|
|
165
|
-
Built with ❤️ for the n8n community
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
**Keywords**: n8n, base, wework, project management, task management, automation, workflow
|
|
170
|
-
npm run dev
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
This starts n8n with your nodes loaded and hot reload enabled.
|
|
174
|
-
|
|
175
|
-
## What's Included
|
|
176
|
-
|
|
177
|
-
This starter repository includes two example nodes to learn from:
|
|
178
|
-
|
|
179
|
-
- **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
|
|
180
|
-
- **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
|
|
181
|
-
- **Low-code approach** - Define operations declaratively without writing request logic
|
|
182
|
-
- Multiple resources (Issues, Comments)
|
|
183
|
-
- Multiple operations (Get, Get All, Create)
|
|
184
|
-
- Two authentication methods (OAuth2 and Personal Access Token)
|
|
185
|
-
- List search functionality for dynamic dropdowns
|
|
186
|
-
- Proper error handling and typing
|
|
187
|
-
- Ideal for HTTP API-based integrations
|
|
188
|
-
|
|
189
|
-
> [!TIP]
|
|
190
|
-
> 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.
|
|
191
|
-
|
|
192
|
-
Browse these examples to understand both approaches, then modify them or create your own.
|
|
193
|
-
|
|
194
|
-
## Finding Inspiration
|
|
195
|
-
|
|
196
|
-
Looking for more examples? Check out these resources:
|
|
197
|
-
|
|
198
|
-
- **[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
|
|
199
|
-
- **[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
|
|
200
|
-
- **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
|
|
201
|
-
|
|
202
|
-
These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
|
|
203
|
-
|
|
204
|
-
## Prerequisites
|
|
205
|
-
|
|
206
|
-
Before you begin, install the following on your development machine:
|
|
207
|
-
|
|
208
|
-
### Required
|
|
209
|
-
|
|
210
|
-
- **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
|
|
211
|
-
- Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
|
|
212
|
-
- Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
|
|
213
|
-
- **[git](https://git-scm.com/downloads)**
|
|
214
|
-
|
|
215
|
-
### Recommended
|
|
216
|
-
|
|
217
|
-
- Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
|
|
218
|
-
|
|
219
|
-
> [!NOTE]
|
|
220
|
-
> 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.
|
|
221
|
-
|
|
222
|
-
## Getting Started with this Starter
|
|
223
|
-
|
|
224
|
-
Follow these steps to create your own n8n community node package:
|
|
225
|
-
|
|
226
|
-
### 1. Create Your Repository
|
|
227
|
-
|
|
228
|
-
[Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
git clone https://github.com/<your-organization>/<your-repo-name>.git
|
|
232
|
-
cd <your-repo-name>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### 2. Install Dependencies
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
npm install
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
This installs all required dependencies including the `@n8n/node-cli`.
|
|
242
|
-
|
|
243
|
-
### 3. Explore the Examples
|
|
244
|
-
|
|
245
|
-
Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
|
|
246
|
-
|
|
247
|
-
- Start with [nodes/Example/](nodes/Example/) for a basic node
|
|
248
|
-
- Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
|
|
249
|
-
|
|
250
|
-
### 4. Build Your Node
|
|
251
|
-
|
|
252
|
-
Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
|
|
253
|
-
|
|
254
|
-
> [!TIP]
|
|
255
|
-
> If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
|
|
256
|
-
|
|
257
|
-
### 5. Configure Your Package
|
|
258
|
-
|
|
259
|
-
Update `package.json` with your details:
|
|
260
|
-
|
|
261
|
-
- `name` - Your package name (must start with `n8n-nodes-`)
|
|
262
|
-
- `author` - Your name and email
|
|
263
|
-
- `repository` - Your repository URL
|
|
264
|
-
- `description` - What your node does
|
|
265
|
-
|
|
266
|
-
Make sure your node is registered in the `n8n.nodes` array.
|
|
267
|
-
|
|
268
|
-
### 6. Develop and Test Locally
|
|
269
|
-
|
|
270
|
-
Start n8n with your node loaded:
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
npm run dev
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
This command runs `n8n-node dev` which:
|
|
277
|
-
|
|
278
|
-
- Builds your node with watch mode
|
|
279
|
-
- Starts n8n with your node available
|
|
280
|
-
- Automatically rebuilds when you make changes
|
|
281
|
-
- Opens n8n in your browser (usually http://localhost:5678)
|
|
282
|
-
|
|
283
|
-
You can now test your node in n8n workflows!
|
|
284
|
-
|
|
285
|
-
> [!NOTE]
|
|
286
|
-
> Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
|
|
287
|
-
|
|
288
|
-
### 7. Lint Your Code
|
|
289
|
-
|
|
290
|
-
Check for errors:
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
npm run lint
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
Auto-fix issues when possible:
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
npm run lint:fix
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### 8. Build for Production
|
|
303
|
-
|
|
304
|
-
When ready to publish:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
npm run build
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
This compiles your TypeScript code to the `dist/` folder.
|
|
311
|
-
|
|
312
|
-
### 9. Prepare for Publishing
|
|
313
|
-
|
|
314
|
-
Before publishing:
|
|
315
|
-
|
|
316
|
-
1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
|
|
317
|
-
2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
|
|
318
|
-
3. **Test thoroughly**: Ensure your node works in different scenarios.
|
|
319
|
-
|
|
320
|
-
### 10. Publish to npm
|
|
321
|
-
|
|
322
|
-
Publish your package to make it available to the n8n community:
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
npm publish
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
|
|
329
|
-
|
|
330
|
-
### 11. Submit for Verification (Optional)
|
|
331
|
-
|
|
332
|
-
Get your node verified for n8n Cloud:
|
|
333
|
-
|
|
334
|
-
1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
|
|
335
|
-
- Uses MIT license ✅ (included in this starter)
|
|
336
|
-
- No external package dependencies
|
|
337
|
-
- Follows n8n's design guidelines
|
|
338
|
-
- Passes quality and security review
|
|
339
|
-
|
|
340
|
-
2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
|
|
341
|
-
|
|
342
|
-
**Benefits of verification:**
|
|
343
|
-
|
|
344
|
-
- Available directly in n8n Cloud
|
|
345
|
-
- Discoverable in the n8n nodes panel
|
|
346
|
-
- Verified badge for quality assurance
|
|
347
|
-
- Increased visibility in the n8n community
|
|
348
|
-
|
|
349
|
-
## Available Scripts
|
|
350
|
-
|
|
351
|
-
This starter includes several npm scripts to streamline development:
|
|
352
|
-
|
|
353
|
-
| Script | Description |
|
|
354
|
-
| --------------------- | ---------------------------------------------------------------- |
|
|
355
|
-
| `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
|
|
356
|
-
| `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
|
|
357
|
-
| `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
|
|
358
|
-
| `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
|
|
359
|
-
| `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
|
|
360
|
-
| `npm run release` | Create a new release (runs `n8n-node release`) |
|
|
361
|
-
|
|
362
|
-
> [!TIP]
|
|
363
|
-
> These scripts use the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli) under the hood. You can also run CLI commands directly, e.g., `npx n8n-node dev`.
|
|
364
|
-
|
|
365
|
-
## Troubleshooting
|
|
366
|
-
|
|
367
|
-
### My node doesn't appear in n8n
|
|
368
|
-
|
|
369
|
-
1. Make sure you ran `npm install` to install dependencies
|
|
370
|
-
2. Check that your node is listed in `package.json` under `n8n.nodes`
|
|
371
|
-
3. Restart the dev server with `npm run dev`
|
|
372
|
-
4. Check the console for any error messages
|
|
373
|
-
|
|
374
|
-
### Linting errors
|
|
375
|
-
|
|
376
|
-
Run `npm run lint:fix` to automatically fix most common issues. For remaining errors, check the [n8n node development guidelines](https://docs.n8n.io/integrations/creating-nodes/).
|
|
377
|
-
|
|
378
|
-
### TypeScript errors
|
|
379
|
-
|
|
380
|
-
Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
|
|
381
|
-
|
|
382
|
-
## Resources
|
|
383
|
-
|
|
384
|
-
- **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
|
|
385
|
-
- **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
|
|
386
|
-
- **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
|
|
387
|
-
- **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
|
|
388
|
-
- **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
|
|
389
|
-
|
|
390
|
-
## Contributing
|
|
391
|
-
|
|
392
|
-
Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
|
|
393
|
-
|
|
394
|
-
## License
|
|
395
|
-
|
|
396
|
-
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
|
|
1
|
+
# n8n-nodes-base-wework
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**Tích hợp hoàn chỉnh Base WeWork API vào n8n** - Quản lý projects, tasks, departments với action nodes và webhook triggers cho sự kiện real-time!
|
|
8
|
+
|
|
9
|
+
## 🚀 Quick Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install n8n-nodes-base-wework
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Sau đó restart n8n để load node.
|
|
16
|
+
|
|
17
|
+
## ✨ Features
|
|
18
|
+
|
|
19
|
+
### Action Node (Base WeWork)
|
|
20
|
+
- 🎯 **15+ Operations** - Quản lý đầy đủ các hoạt động từ Base WeWork API v3
|
|
21
|
+
- 📦 **3 Resources** - Project, Task, Department
|
|
22
|
+
- 🔐 **Secure Authentication** - API key authentication với domain configuration
|
|
23
|
+
- ⚡ **Production Ready** - Error handling, type-safe, tested
|
|
24
|
+
|
|
25
|
+
### Trigger Node (Base WeWork Trigger)
|
|
26
|
+
- ⚡ **6 Webhook Triggers** - Nhận sự kiện real-time từ Base WeWork
|
|
27
|
+
- 🎪 **Task Events** - Task created, done, status updated
|
|
28
|
+
- 📋 **Subtask Events** - Subtask created, done, status updated
|
|
29
|
+
- 🔔 **Real-time** - Phản ứng ngay lập tức với các thay đổi
|
|
30
|
+
|
|
31
|
+
## 📚 Resources & Operations
|
|
32
|
+
|
|
33
|
+
### Action Node Resources
|
|
34
|
+
|
|
35
|
+
| Resource | Operations | Description |
|
|
36
|
+
|----------|-----------|-------------|
|
|
37
|
+
| 📁 **Project** | Create, Edit, Get Full, List | Quản lý dự án (tạo, sửa, xem chi tiết, danh sách) |
|
|
38
|
+
| ✅ **Task** | Create, Create Subtask, Edit Basic Info, Edit Extra, Get, List by Project, Mark Done | Quản lý công việc và subtask |
|
|
39
|
+
| 🏢 **Department** | Create, Edit, Get, List, Remove | Quản lý phòng ban |
|
|
40
|
+
|
|
41
|
+
### Trigger Node Events
|
|
42
|
+
|
|
43
|
+
| Event | Description |
|
|
44
|
+
|-------|-------------|
|
|
45
|
+
| 🆕 **On Task Created** | Trigger khi task mới được tạo |
|
|
46
|
+
| ✅ **On Task Done** | Trigger khi task được đánh dấu hoàn thành |
|
|
47
|
+
| 🔄 **On Task Status Updated** | Trigger khi trạng thái task thay đổi |
|
|
48
|
+
| 📋 **On Subtask Created** | Trigger khi subtask mới được tạo |
|
|
49
|
+
| ✔️ **On Subtask Done** | Trigger khi subtask được đánh dấu hoàn thành |
|
|
50
|
+
| 🔄 **On Subtask Status Updated** | Trigger khi trạng thái subtask thay đổi |
|
|
51
|
+
|
|
52
|
+
## 🔧 Setup
|
|
53
|
+
|
|
54
|
+
### 1. Install node
|
|
55
|
+
```bash
|
|
56
|
+
npm install n8n-nodes-base-wework
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. Restart n8n
|
|
60
|
+
```bash
|
|
61
|
+
n8n start
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Configure Credential
|
|
65
|
+
1. Mở n8n UI → **Credentials** → **Add Credential**
|
|
66
|
+
2. Chọn **Base WeWork API**
|
|
67
|
+
3. Nhập:
|
|
68
|
+
- **Domain**: `basevn.tech` (hoặc domain Base WeWork của bạn)
|
|
69
|
+
- **Access Token**: Token từ Base WeWork
|
|
70
|
+
4. Click **Save**
|
|
71
|
+
|
|
72
|
+
### 4. Use in Workflow
|
|
73
|
+
- Add node → Search "Base WeWork"
|
|
74
|
+
- Select credential
|
|
75
|
+
- Choose Resource and Operation
|
|
76
|
+
- Execute! ⚡
|
|
77
|
+
|
|
78
|
+
## 📖 Example Usage
|
|
79
|
+
|
|
80
|
+
### Action Node Examples
|
|
81
|
+
|
|
82
|
+
#### Create Project
|
|
83
|
+
```yaml
|
|
84
|
+
Node: Base WeWork
|
|
85
|
+
Resource: Project
|
|
86
|
+
Operation: Create
|
|
87
|
+
Username: @admin
|
|
88
|
+
Metatype: project
|
|
89
|
+
Name: My New Project
|
|
90
|
+
External: Inhouse (0)
|
|
91
|
+
Owners: @admin
|
|
92
|
+
Content: Project description
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Create Task
|
|
96
|
+
```yaml
|
|
97
|
+
Node: Base WeWork
|
|
98
|
+
Resource: Task
|
|
99
|
+
Operation: Create
|
|
100
|
+
Username: @admin
|
|
101
|
+
Project ID: 123
|
|
102
|
+
Tasklist ID: 456
|
|
103
|
+
Name: Important Task
|
|
104
|
+
Content: Task description
|
|
105
|
+
Assign: @user
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### List Projects
|
|
109
|
+
```yaml
|
|
110
|
+
Node: Base WeWork
|
|
111
|
+
Resource: Project
|
|
112
|
+
Operation: List
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Trigger Node Examples
|
|
116
|
+
|
|
117
|
+
#### Trigger on Task Created
|
|
118
|
+
```yaml
|
|
119
|
+
Node: Base WeWork Trigger
|
|
120
|
+
Event: On Task Created
|
|
121
|
+
# Webhook URL sẽ được tạo tự động
|
|
122
|
+
# Cấu hình webhook này trong Base WeWork để nhận events
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
#### Trigger on Task Done
|
|
126
|
+
```yaml
|
|
127
|
+
Node: Base WeWork Trigger
|
|
128
|
+
Event: On Task Done
|
|
129
|
+
# Tự động trigger workflow khi task được hoàn thành
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 🌐 API Documentation
|
|
133
|
+
|
|
134
|
+
Full API documentation: https://documenter.getpostman.com/view/1345096/SztA68Az?version=latest
|
|
135
|
+
|
|
136
|
+
## 🛠️ Development
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# Clone repository
|
|
140
|
+
git clone https://github.com/basevn/n8n-nodes-base-wework.git
|
|
141
|
+
cd n8n-nodes-base-wework
|
|
142
|
+
|
|
143
|
+
# Install dependencies
|
|
144
|
+
npm install
|
|
145
|
+
|
|
146
|
+
# Build
|
|
147
|
+
npm run build
|
|
148
|
+
|
|
149
|
+
# Link for local development
|
|
150
|
+
npm link
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## 📝 License
|
|
154
|
+
|
|
155
|
+
MIT © BaseVN
|
|
156
|
+
|
|
157
|
+
## 🆘 Support
|
|
158
|
+
|
|
159
|
+
- 📧 Email: support@basevn.tech
|
|
160
|
+
- 🌐 Website: https://basevn.tech
|
|
161
|
+
- 📖 Documentation: https://github.com/basevn/n8n-nodes-base-wework
|
|
162
|
+
|
|
163
|
+
## 🙏 Credits
|
|
164
|
+
|
|
165
|
+
Built with ❤️ for the n8n community
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
**Keywords**: n8n, base, wework, project management, task management, automation, workflow
|
|
170
|
+
npm run dev
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
This starts n8n with your nodes loaded and hot reload enabled.
|
|
174
|
+
|
|
175
|
+
## What's Included
|
|
176
|
+
|
|
177
|
+
This starter repository includes two example nodes to learn from:
|
|
178
|
+
|
|
179
|
+
- **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
|
|
180
|
+
- **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
|
|
181
|
+
- **Low-code approach** - Define operations declaratively without writing request logic
|
|
182
|
+
- Multiple resources (Issues, Comments)
|
|
183
|
+
- Multiple operations (Get, Get All, Create)
|
|
184
|
+
- Two authentication methods (OAuth2 and Personal Access Token)
|
|
185
|
+
- List search functionality for dynamic dropdowns
|
|
186
|
+
- Proper error handling and typing
|
|
187
|
+
- Ideal for HTTP API-based integrations
|
|
188
|
+
|
|
189
|
+
> [!TIP]
|
|
190
|
+
> 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.
|
|
191
|
+
|
|
192
|
+
Browse these examples to understand both approaches, then modify them or create your own.
|
|
193
|
+
|
|
194
|
+
## Finding Inspiration
|
|
195
|
+
|
|
196
|
+
Looking for more examples? Check out these resources:
|
|
197
|
+
|
|
198
|
+
- **[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
|
|
199
|
+
- **[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
|
|
200
|
+
- **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
|
|
201
|
+
|
|
202
|
+
These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
|
|
203
|
+
|
|
204
|
+
## Prerequisites
|
|
205
|
+
|
|
206
|
+
Before you begin, install the following on your development machine:
|
|
207
|
+
|
|
208
|
+
### Required
|
|
209
|
+
|
|
210
|
+
- **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
|
|
211
|
+
- Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
|
|
212
|
+
- Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
|
|
213
|
+
- **[git](https://git-scm.com/downloads)**
|
|
214
|
+
|
|
215
|
+
### Recommended
|
|
216
|
+
|
|
217
|
+
- Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
|
|
218
|
+
|
|
219
|
+
> [!NOTE]
|
|
220
|
+
> 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.
|
|
221
|
+
|
|
222
|
+
## Getting Started with this Starter
|
|
223
|
+
|
|
224
|
+
Follow these steps to create your own n8n community node package:
|
|
225
|
+
|
|
226
|
+
### 1. Create Your Repository
|
|
227
|
+
|
|
228
|
+
[Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
git clone https://github.com/<your-organization>/<your-repo-name>.git
|
|
232
|
+
cd <your-repo-name>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### 2. Install Dependencies
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
npm install
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
This installs all required dependencies including the `@n8n/node-cli`.
|
|
242
|
+
|
|
243
|
+
### 3. Explore the Examples
|
|
244
|
+
|
|
245
|
+
Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
|
|
246
|
+
|
|
247
|
+
- Start with [nodes/Example/](nodes/Example/) for a basic node
|
|
248
|
+
- Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
|
|
249
|
+
|
|
250
|
+
### 4. Build Your Node
|
|
251
|
+
|
|
252
|
+
Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
|
|
253
|
+
|
|
254
|
+
> [!TIP]
|
|
255
|
+
> If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
|
|
256
|
+
|
|
257
|
+
### 5. Configure Your Package
|
|
258
|
+
|
|
259
|
+
Update `package.json` with your details:
|
|
260
|
+
|
|
261
|
+
- `name` - Your package name (must start with `n8n-nodes-`)
|
|
262
|
+
- `author` - Your name and email
|
|
263
|
+
- `repository` - Your repository URL
|
|
264
|
+
- `description` - What your node does
|
|
265
|
+
|
|
266
|
+
Make sure your node is registered in the `n8n.nodes` array.
|
|
267
|
+
|
|
268
|
+
### 6. Develop and Test Locally
|
|
269
|
+
|
|
270
|
+
Start n8n with your node loaded:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
npm run dev
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
This command runs `n8n-node dev` which:
|
|
277
|
+
|
|
278
|
+
- Builds your node with watch mode
|
|
279
|
+
- Starts n8n with your node available
|
|
280
|
+
- Automatically rebuilds when you make changes
|
|
281
|
+
- Opens n8n in your browser (usually http://localhost:5678)
|
|
282
|
+
|
|
283
|
+
You can now test your node in n8n workflows!
|
|
284
|
+
|
|
285
|
+
> [!NOTE]
|
|
286
|
+
> Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
|
|
287
|
+
|
|
288
|
+
### 7. Lint Your Code
|
|
289
|
+
|
|
290
|
+
Check for errors:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
npm run lint
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Auto-fix issues when possible:
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
npm run lint:fix
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 8. Build for Production
|
|
303
|
+
|
|
304
|
+
When ready to publish:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
npm run build
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
This compiles your TypeScript code to the `dist/` folder.
|
|
311
|
+
|
|
312
|
+
### 9. Prepare for Publishing
|
|
313
|
+
|
|
314
|
+
Before publishing:
|
|
315
|
+
|
|
316
|
+
1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
|
|
317
|
+
2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
|
|
318
|
+
3. **Test thoroughly**: Ensure your node works in different scenarios.
|
|
319
|
+
|
|
320
|
+
### 10. Publish to npm
|
|
321
|
+
|
|
322
|
+
Publish your package to make it available to the n8n community:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
npm publish
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
|
|
329
|
+
|
|
330
|
+
### 11. Submit for Verification (Optional)
|
|
331
|
+
|
|
332
|
+
Get your node verified for n8n Cloud:
|
|
333
|
+
|
|
334
|
+
1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
|
|
335
|
+
- Uses MIT license ✅ (included in this starter)
|
|
336
|
+
- No external package dependencies
|
|
337
|
+
- Follows n8n's design guidelines
|
|
338
|
+
- Passes quality and security review
|
|
339
|
+
|
|
340
|
+
2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
|
|
341
|
+
|
|
342
|
+
**Benefits of verification:**
|
|
343
|
+
|
|
344
|
+
- Available directly in n8n Cloud
|
|
345
|
+
- Discoverable in the n8n nodes panel
|
|
346
|
+
- Verified badge for quality assurance
|
|
347
|
+
- Increased visibility in the n8n community
|
|
348
|
+
|
|
349
|
+
## Available Scripts
|
|
350
|
+
|
|
351
|
+
This starter includes several npm scripts to streamline development:
|
|
352
|
+
|
|
353
|
+
| Script | Description |
|
|
354
|
+
| --------------------- | ---------------------------------------------------------------- |
|
|
355
|
+
| `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
|
|
356
|
+
| `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
|
|
357
|
+
| `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
|
|
358
|
+
| `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
|
|
359
|
+
| `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
|
|
360
|
+
| `npm run release` | Create a new release (runs `n8n-node release`) |
|
|
361
|
+
|
|
362
|
+
> [!TIP]
|
|
363
|
+
> These scripts use the [@n8n/node-cli](https://www.npmjs.com/package/@n8n/node-cli) under the hood. You can also run CLI commands directly, e.g., `npx n8n-node dev`.
|
|
364
|
+
|
|
365
|
+
## Troubleshooting
|
|
366
|
+
|
|
367
|
+
### My node doesn't appear in n8n
|
|
368
|
+
|
|
369
|
+
1. Make sure you ran `npm install` to install dependencies
|
|
370
|
+
2. Check that your node is listed in `package.json` under `n8n.nodes`
|
|
371
|
+
3. Restart the dev server with `npm run dev`
|
|
372
|
+
4. Check the console for any error messages
|
|
373
|
+
|
|
374
|
+
### Linting errors
|
|
375
|
+
|
|
376
|
+
Run `npm run lint:fix` to automatically fix most common issues. For remaining errors, check the [n8n node development guidelines](https://docs.n8n.io/integrations/creating-nodes/).
|
|
377
|
+
|
|
378
|
+
### TypeScript errors
|
|
379
|
+
|
|
380
|
+
Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
|
|
381
|
+
|
|
382
|
+
## Resources
|
|
383
|
+
|
|
384
|
+
- **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
|
|
385
|
+
- **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
|
|
386
|
+
- **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
|
|
387
|
+
- **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
|
|
388
|
+
- **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
|
|
389
|
+
|
|
390
|
+
## Contributing
|
|
391
|
+
|
|
392
|
+
Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
|
|
393
|
+
|
|
394
|
+
## License
|
|
395
|
+
|
|
396
|
+
[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
|