n8n-nodes-blossom 2.3.22 → 2.3.24

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,680 +1,711 @@
1
- # n8n-nodes-blossom
2
-
3
- A comprehensive n8n community node for integrating with Blossom Learning Management System (LMS) API. This node provides full access to the Blossom Sync API V2, supporting all operations for users, groups, memberships, utilities, suppliers, and performance data.
4
-
5
- ## Features
6
-
7
- - **Complete API Coverage**: Supports all Blossom Sync API V2 operations
8
- - **Multiple Authentication Methods**: Basic Auth, API Key, JWT, and OAuth 2.0
9
- - **User Management**: Create, update, delete users and bulk import/export via CSV
10
- - Complete user profiles with all available fields (gender, employment_date, about, user_nt, etc.)
11
- - Avatar management (upload/remove)
12
- - Custom field support by name, ID, or key
13
- - **Group Management**: Manage groups, courses, roles, organizational units, templates, qualifications, and workplans
14
- - Full group hierarchy support (attach/detach subgroups)
15
- - Template attachment for courses and groups
16
- - Grade publishing controls and visibility settings
17
- - **Membership Management**: Attach/detach users to groups and manage managers
18
- - Manager permissions (all, none, specific permissions)
19
- - Primary manager settings
20
- - User authorities (HR manager, professional manager, coach, supervisor)
21
- - **Performance Tracking**: Import assignment and group performances
22
- - CSV import for assignment performances
23
- - CSV import for group performances (qualifications and courses)
24
- - Diploma upload support
25
- - **Supplier Management**: Manage external suppliers and institutions
26
- - **Utility Functions**: Test connections, run auto-enrollment rules, manage user authorities
27
- - **File Upload Support**: Handle CSV imports, avatar uploads, and diploma uploads
28
- - **Generic API Access**: Make custom requests to any Blossom API endpoint
29
- - **Comprehensive Error Handling**: Detailed error messages and validation
30
-
31
- ## Installation
32
-
33
- ```bash
34
- npm install n8n-nodes-blossom
35
- ```
36
-
37
- ### Important Note for Existing Users
38
-
39
- If you already have an older version installed and are experiencing issues with updates, you may need to:
40
-
41
- 1. **Clear npm cache** (if getting 404 errors):
42
- ```bash
43
- npm cache clean --force
44
- ```
45
-
46
- 2. **Uninstall the old version**:
47
- ```bash
48
- npm uninstall n8n-nodes-blossom
49
- ```
50
-
51
- 3. **Install the latest version**:
52
- ```bash
53
- npm install n8n-nodes-blossom@latest
54
- ```
55
-
56
- 4. **If still having issues, try installing specific version**:
57
- ```bash
58
- npm install n8n-nodes-blossom@2.0.0
59
- ```
60
-
61
- **Note**: Older versions (1.1.1 and below) were removed from NPM for security reasons. If you're getting 404 errors, it means n8n is trying to download a version that no longer exists.
62
-
63
- ## Troubleshooting
64
-
65
- ### Common Connection Issues
66
-
67
- #### 1. Authentication Failed (401)
68
- **Symptoms**: "Authorization failed - please check your credentials"
69
-
70
- **Possible Causes**:
71
- - Wrong username/password (using login credentials instead of API credentials)
72
- - Wrong domain (check with your Blossom admin)
73
- - Wrong Base URL format
74
- - Server not accessible from your network
75
-
76
- **Solutions**:
77
- 1. **Verify API Credentials**: Use API user credentials, not your login credentials
78
- 2. **Check Domain**: Verify domain ID or name with your Blossom administrator
79
- 3. **Verify Base URL**: Should be `https://YOUR-COMPANY.blossom-kc.com/WebServices/sync_2`
80
- 4. **Test Network**: Try accessing the URL in a browser
81
- 5. **Check Firewall**: Ensure your network allows outbound HTTPS connections
82
-
83
- #### 2. Connection Failed
84
- **Symptoms**: "Connection failed" or "ENOTFOUND" errors
85
-
86
- **Possible Causes**:
87
- - Network connectivity issues
88
- - Firewall blocking the connection
89
- - Proxy configuration
90
- - Server not available
91
-
92
- **Solutions**:
93
- 1. **Check Network**: Test internet connectivity
94
- 2. **Firewall**: Allow outbound HTTPS connections on port 443
95
- 3. **Proxy**: Configure proxy settings if required
96
- 4. **Server Status**: Contact your Blossom administrator
97
-
98
- #### 3. Endpoint Not Found (404)
99
- **Symptoms**: "Endpoint not found" errors
100
-
101
- **Possible Causes**:
102
- - Wrong Base URL
103
- - Wrong endpoint path
104
- - API version mismatch
105
-
106
- **Solutions**:
107
- 1. **Verify Base URL**: Should end with `/WebServices/sync_2`
108
- 2. **Check Endpoint**: Ensure the endpoint path is correct
109
- 3. **API Version**: Verify you're using the correct API version
110
-
111
- #### 4. Server Error (5xx)
112
- **Symptoms**: "Server error" messages
113
-
114
- **Possible Causes**:
115
- - Server maintenance
116
- - Server overload
117
- - Internal server issues
118
-
119
- **Solutions**:
120
- 1. **Retry**: Wait a few minutes and try again
121
- 2. **Contact Admin**: Reach out to your Blossom administrator
122
- 3. **Check Status**: Verify server status with your IT team
123
-
124
- ### Debug Information
125
-
126
- When connection fails, the error message will include:
127
- - Base URL being used
128
- - Authentication type
129
- - Domain setting
130
- - Credential status (Set/Missing)
131
- - Specific error details
132
-
133
- ### Getting Help
134
-
135
- 1. **Check Logs**: Review n8n logs for detailed error information
136
- 2. **Test Credentials**: Use the "Test" button in credentials
137
- 3. **Contact Support**: Reach out to your Blossom administrator
138
- 4. **Documentation**: Check the [API Documentation](docs/API_DOCUMENTATION.md)
139
-
140
- ## Configuration
141
-
142
- ### Base Configuration
143
- ```javascript
144
- const config = {
145
- baseURL: 'https://YOUR-COMPANY.blossom-kc.com/WebServices/sync_2',
146
- authentication: 'basic',
147
- username: 'YOUR_USERNAME',
148
- password: 'YOUR_PASSWORD',
149
- domain: 'YOUR_DOMAIN' // domain name or id (e.g., '1' or 'company-name')
150
- };
151
- ```
152
-
153
- ### Finding Your Configuration
154
- 1. **baseURL**: Replace `YOUR-COMPANY` with your organization's subdomain
155
- 2. **domain**: Check with your Blossom admin or use domain name/ID from system
156
- 3. **credentials**: Use your API user credentials (not your login credentials)
157
-
158
- ### Rate Limits
159
- - **API Calls**: Maximum 30 requests per second
160
- - **CSV Import Methods**: Maximum 4 calls per 24 hours per method
161
- - DeleteUsersCSV
162
- - ImportUsersCSV
163
- - ImportGroupsCSV
164
- - ImportGroupsMembersCSV
165
- - **System Operations**: Maximum 4 calls per 24 hours
166
- - RunAutoEnrollmentRules
167
- - RunScheduledImports
168
-
169
- ## Authentication
170
-
171
- The node supports multiple authentication methods:
172
-
173
- ### Basic Authentication
174
- - **Username**: Your API user credentials (not your login credentials)
175
- - **Password**: Your API user password (not your login password)
176
- - **Domain**: Domain name or ID (e.g., '1' or 'company-name')
177
- - **Base URL**: Your Blossom instance URL (e.g., `https://YOUR-COMPANY.blossom-kc.com/`)
178
-
179
- **Finding Your Configuration:**
180
- - **Base URL**: Replace `YOUR-COMPANY` with your organization's subdomain
181
- - **Domain**: Check with your Blossom admin or use domain name/ID from system
182
- - **Credentials**: Use your API user credentials (not your login credentials)
183
-
184
- ### API Key Authentication
185
- - **API Key**: Your Blossom API key
186
- - **Base URL**: Your Blossom instance URL
187
-
188
- ### JWT Authentication
189
- - **JWT Token**: JWT token generated with payload: `{"iss":"<user_name>","exp":<unix_timestamp>}`
190
- - **Base URL**: Your Blossom instance URL
191
-
192
- ### OAuth 2.0 Authentication
193
- - **OAuth 2.0 Token**: Access token obtained from `{{baseUrl}}/WebServices/sync_2?auth_token`
194
- - **Base URL**: Your Blossom instance URL
195
-
196
- ## Available Operations
197
-
198
- ### User Management
199
- - **Update User**: Create or update user with full profile details
200
- - **Get User**: Get user details by identifier (external_id, user_id, username, identity_num)
201
- - **Get Users**: Get list of users with filters (limit, offset, search, department, company)
202
- - **Import Users CSV**: Bulk import users from CSV/Excel files
203
- - **Delete User**: Delete a single user (soft delete)
204
- - **Delete Users CSV**: Bulk delete users from CSV/Excel files
205
- - **Set Avatar**: Upload or remove user avatar (JPG/PNG)
206
- - **User Authorities**: Set user authorities (HR manager, professional manager, coach, supervisor)
207
-
208
- ### Group Management
209
- - **Update Group**: Create or update groups, courses, roles, organizational units, templates, qualifications, and workplans
210
- - **Get Group**: Get group details by identifier (group_id, group_external_id)
211
- - **Get Groups**: Get list of groups with filters (limit, offset, search, type)
212
- - **Get Group Members**: Get list of group members
213
- - **Import Groups CSV**: Bulk import groups from CSV/Excel files
214
- - **Delete Group**: Delete a group object
215
- - **Attach Sub Group**: Attach sub group to parent group
216
- - **Detach Sub Group**: Detach sub group from parent
217
- - **Attach Instance**: Attach group/course to template
218
- - **Detach Instance**: Detach group/course from template
219
-
220
- ### Membership Management
221
- - **Attach User to Group**: Add user to group, course, OU, qualification, or workplan
222
- - **Detach User from Group**: Remove user from group
223
- - **Detach User from OU**: Remove user from organizational unit
224
- - **Get Memberships**: Get list of memberships with filters
225
- - **Get User Groups**: Get groups for a specific user
226
- - **Import Groups Members CSV**: Bulk attach users to groups via CSV
227
- - **Attach Manager**: Add manager to group with permissions
228
- - **Detach Manager**: Remove manager from group
229
-
230
- ### Utility Functions
231
- - **Test**: Test API connection and get random number
232
- - **Get System Info**: Get system information and version
233
- - **Get Domain Info**: Get domain information and settings
234
- - **Run Auto Enrollment Rules**: Execute auto enrollment for all workspaces and users
235
- - **Run Scheduled Imports**: Execute scheduled imports from SFTP or local folder
236
- - **Remove Empty Org Units**: Delete empty organizational units
237
- - **User Authorities**: Set HR manager, professional manager, coach, and supervisor
238
- - **Power Manager**: Set/unset user as power manager
239
- - **Upload Diploma**: Upload or remove diploma file for user in group
240
-
241
- ### Supplier Management
242
- - **Update Supplier**: Create or update supplier by external ID
243
- - **Delete Supplier**: Delete supplier by external ID
244
-
245
- ### Performance Management
246
- - **Import Assignment Performances CSV**: Import assignment performance data
247
- - **Import Group Performances CSV**: Import group performance data for qualifications and courses
248
-
249
- ### Generic API
250
- - **Make Request**: Make custom API requests to any Blossom endpoint
251
-
252
- ## Usage Examples
253
-
254
- ### 1. Complete User Profile Creation
255
-
256
- ```json
257
- {
258
- "resource": "users",
259
- "operation": "updateUser",
260
- "userDetails": {
261
- "details": {
262
- "external_id": "a123",
263
- "username": "john.doe",
264
- "firstname": "John",
265
- "lastname": "Doe",
266
- "password": "SecurePass123!",
267
- "email": "john.doe@company.com",
268
- "gender": "M",
269
- "birthday": "1990-05-15",
270
- "employee_id": "EMP001",
271
- "company": "Tech Corp",
272
- "department": "Engineering",
273
- "job_title": "Senior Developer",
274
- "employment_date": "2024-01-15",
275
- "address": "123 Main Street",
276
- "city": "New York",
277
- "zip": "10001",
278
- "mphone": "+1-555-0100",
279
- "bphone": "+1-555-0101",
280
- "hphone": "+1-555-0102",
281
- "user_nt": "DOMAIN\\johndoe",
282
- "about": "Experienced developer",
283
- "disabled": false
284
- }
285
- }
286
- }
287
- ```
288
-
289
- **Configuration Notes:**
290
- - **Base URL**: Replace `YOUR-COMPANY` with your organization's subdomain (e.g., `https://mer-group.blossom-kc.com/`)
291
- - **Domain**: Configure in credentials (e.g., '1' or 'company-name')
292
- - **Credentials**: Use your API user credentials, not your login credentials
293
-
294
- ### 2. CSV Import with Options
295
-
296
- ```json
297
- {
298
- "resource": "users",
299
- "operation": "importUsersCSV",
300
- "csvFile": "external_id,username,firstname,lastname,email,password,disabled\na123,john.doe,John,Doe,john@company.com,Pass123!,0\na124,jane.smith,Jane,Smith,jane@company.com,Pass456!,0",
301
- "importOptions": {
302
- "options": {
303
- "keep_old_values": true,
304
- "temp_password": true,
305
- "new_user_notification": true,
306
- "password_not_required": false,
307
- "manager_ou": true,
308
- "clean_ou": true
309
- }
310
- }
311
- }
312
- ```
313
-
314
- ### 3. Group Creation with All Fields
315
-
316
- ```json
317
- {
318
- "resource": "groups",
319
- "operation": "updateGroup",
320
- "domain": "1",
321
- "groupDetails": {
322
- "details": {
323
- "external_id": "COURSE001",
324
- "name": "JavaScript Fundamentals",
325
- "type": "course",
326
- "description": "Learn JavaScript programming",
327
- "open_date": "2024-01-15",
328
- "close_date": "2024-12-31",
329
- "passing_grade": 70,
330
- "gathering_area": "Building A, Room 301",
331
- "location": "New York Office",
332
- "audience": "Developers, Technical Staff",
333
- "estimated_budget": 5000,
334
- "publish_grades_criteria": "on_completion",
335
- "publish_grades_on_add": false,
336
- "hide_score": false,
337
- "hide_from_members": false,
338
- "hide_from_user_profile": false,
339
- "parent_external_id": "OU-ENG",
340
- "template_external_id": "TPL001",
341
- "classification": "Technical Training"
342
- }
343
- }
344
- }
345
- ```
346
-
347
- ### 4. Manager Operations
348
-
349
- ```json
350
- {
351
- "resource": "memberships",
352
- "operation": "attachManager",
353
- "domain": "1",
354
- "userIdentifier": {
355
- "identifier": {
356
- "external_id": "a123"
357
- }
358
- },
359
- "groupIdentifier": {
360
- "identifier": {
361
- "group_external_id": "COURSE001"
362
- }
363
- },
364
- "managerType": "all",
365
- "setPrimary": 1
366
- }
367
- ```
368
-
369
- ### 5. Performance Import
370
-
371
- ```json
372
- {
373
- "resource": "performances",
374
- "operation": "importAssignmentPerformancesCSV",
375
- "csvFile": "user_name,assignment_id,date,grade,completed\njohn.doe,ASSIGN001,2024-01-15,85,Yes\njane.smith,ASSIGN001,2024-01-16,92,Yes"
376
- }
377
- ```
378
-
379
- ### 6. User Authorities
380
-
381
- ```json
382
- {
383
- "resource": "utilities",
384
- "operation": "setUserAuthorities",
385
- "domain": "1",
386
- "userIdentifier": {
387
- "identifier": {
388
- "external_id": "a123"
389
- }
390
- },
391
- "authorities": {
392
- "user_hr_manager_id": "a007",
393
- "user_professional_manager_id": "a007",
394
- "user_coach_id": "a007",
395
- "user_auth_supervisor_id": "a007"
396
- }
397
- }
398
- ```
399
-
400
- ### 5. Upload User Avatar
401
-
402
- ```json
403
- {
404
- "resource": "User",
405
- "operation": "setAvatar",
406
- "domain": "1",
407
- "user_identifier": {
408
- "external_id": "user123"
409
- },
410
- "remove_avatar": "0",
411
- "avatarfile": {
412
- "value": "binary_image_data",
413
- "options": {
414
- "filename": "avatar.jpg",
415
- "contentType": "image/jpeg"
416
- }
417
- }
418
- }
419
- ```
420
-
421
- ### 6. Test API Connection
422
-
423
- ```json
424
- {
425
- "resource": "Utility",
426
- "operation": "test"
427
- }
428
- ```
429
-
430
- ## CSV Import Templates
431
-
432
- ### Users CSV Template
433
- Required columns: `external_id`, `username`, `firstname`, `lastname`, `email`
434
- Optional columns: `password`, `birthday`, `job_title`, `department`, `company`, `address`, `city`, `zip`, `bphone`, `hphone`, `mphone`, `gender`, `employment_date`, `about`, `user_nt`, `disabled`, `חטיבה`, `קבלן שטח`, `קבלן משרדי`
435
-
436
- ### Groups CSV Template
437
- Required columns: `external_id`, `name`, `type`
438
- Optional columns: `description`, `open_date`, `close_date`, `passing_grade`, `gathering_area`, `location`, `audience`, `estimated_budget`, `publish_grades_criteria`, `publish_grades_on_add`, `hide_score`, `hide_from_members`, `hide_from_user_profile`, `parent_external_id`, `template_external_id`, `classification`
439
-
440
- ### Group Members CSV Template
441
- Required columns: `user_external_id` (or `user_id`), `workspace_external_id` (or `group_id`)
442
- Optional columns: `manager_external_id`, `manager_type`
443
-
444
- ## Error Handling
445
-
446
- The node provides comprehensive error handling with detailed error messages:
447
-
448
- - **API Errors**: Returns specific error messages from the Blossom API
449
- - **Validation Errors**: Validates required parameters before making requests
450
- - **File Upload Errors**: Handles file format and size validation
451
- - **Authentication Errors**: Clear messages for authentication failures
452
-
453
- ## Rate Limits
454
-
455
- - **CSV Operations**: Maximum 4 calls per 24 hours
456
- - **General API**: 30 requests per second
457
- - **Scheduled Operations**: Run outside working hours for best performance
458
-
459
- ## What's Included
460
-
461
- This starter repository includes two example nodes to learn from:
462
-
463
- - **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
464
- - **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
465
- - **Low-code approach** - Define operations declaratively without writing request logic
466
- - Multiple resources (Issues, Comments)
467
- - Multiple operations (Get, Get All, Create)
468
- - Two authentication methods (OAuth2 and Personal Access Token)
469
- - List search functionality for dynamic dropdowns
470
- - Proper error handling and typing
471
- - Ideal for HTTP API-based integrations
472
-
473
- > [!TIP]
474
- > 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.
475
-
476
- Browse these examples to understand both approaches, then modify them or create your own.
477
-
478
- ## Finding Inspiration
479
-
480
- Looking for more examples? Check out these resources:
481
-
482
- - **[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
483
- - **[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
484
- - **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
485
-
486
- These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
487
-
488
- ## Prerequisites
489
-
490
- Before you begin, install the following on your development machine:
491
-
492
- ### Required
493
-
494
- - **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
495
- - Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
496
- - Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
497
- - **[git](https://git-scm.com/downloads)**
498
-
499
- ### Recommended
500
-
501
- - Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
502
-
503
- > [!NOTE]
504
- > 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.
505
-
506
- ## Getting Started with this Starter
507
-
508
- Follow these steps to create your own n8n community node package:
509
-
510
- ### 1. Create Your Repository
511
-
512
- [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
513
-
514
- ```bash
515
- git clone https://github.com/<your-organization>/<your-repo-name>.git
516
- cd <your-repo-name>
517
- ```
518
-
519
- ### 2. Install Dependencies
520
-
521
- ```bash
522
- npm install
523
- ```
524
-
525
- This installs all required dependencies including the `@n8n/node-cli`.
526
-
527
- ### 3. Explore the Examples
528
-
529
- Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
530
-
531
- - Start with [nodes/Example/](nodes/Example/) for a basic node
532
- - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
533
-
534
- ### 4. Build Your Node
535
-
536
- Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
537
-
538
- > [!TIP]
539
- > If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
540
-
541
- ### 5. Configure Your Package
542
-
543
- Update `package.json` with your details:
544
-
545
- - `name` - Your package name (must start with `n8n-nodes-`)
546
- - `author` - Your name and email
547
- - `repository` - Your repository URL
548
- - `description` - What your node does
549
-
550
- Make sure your node is registered in the `n8n.nodes` array.
551
-
552
- ### 6. Develop and Test Locally
553
-
554
- Start n8n with your node loaded:
555
-
556
- ```bash
557
- npm run dev
558
- ```
559
-
560
- This command runs `n8n-node dev` which:
561
-
562
- - Builds your node with watch mode
563
- - Starts n8n with your node available
564
- - Automatically rebuilds when you make changes
565
- - Opens n8n in your browser (usually http://localhost:5678)
566
-
567
- You can now test your node in n8n workflows!
568
-
569
- > [!NOTE]
570
- > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
571
-
572
- ### 7. Lint Your Code
573
-
574
- Check for errors:
575
-
576
- ```bash
577
- npm run lint
578
- ```
579
-
580
- Auto-fix issues when possible:
581
-
582
- ```bash
583
- npm run lint:fix
584
- ```
585
-
586
- ### 8. Build for Production
587
-
588
- When ready to publish:
589
-
590
- ```bash
591
- npm run build
592
- ```
593
-
594
- This compiles your TypeScript code to the `dist/` folder.
595
-
596
- ### 9. Prepare for Publishing
597
-
598
- Before publishing:
599
-
600
- 1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
601
- 2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
602
- 3. **Test thoroughly**: Ensure your node works in different scenarios.
603
-
604
- ### 10. Publish to npm
605
-
606
- Publish your package to make it available to the n8n community:
607
-
608
- ```bash
609
- npm publish
610
- ```
611
-
612
- Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
613
-
614
- ### 11. Submit for Verification (Optional)
615
-
616
- Get your node verified for n8n Cloud:
617
-
618
- 1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
619
- - Uses MIT license ✅ (included in this starter)
620
- - No external package dependencies
621
- - Follows n8n's design guidelines
622
- - Passes quality and security review
623
-
624
- 2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
625
-
626
- **Benefits of verification:**
627
-
628
- - Available directly in n8n Cloud
629
- - Discoverable in the n8n nodes panel
630
- - Verified badge for quality assurance
631
- - Increased visibility in the n8n community
632
-
633
- ## Available Scripts
634
-
635
- This starter includes several npm scripts to streamline development:
636
-
637
- | Script | Description |
638
- | --------------------- | ---------------------------------------------------------------- |
639
- | `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
640
- | `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
641
- | `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
642
- | `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
643
- | `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
644
- | `npm run release` | Create a new release (runs `n8n-node release`) |
645
-
646
- > [!TIP]
647
- > 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`.
648
-
649
- ## Troubleshooting
650
-
651
- ### My node doesn't appear in n8n
652
-
653
- 1. Make sure you ran `npm install` to install dependencies
654
- 2. Check that your node is listed in `package.json` under `n8n.nodes`
655
- 3. Restart the dev server with `npm run dev`
656
- 4. Check the console for any error messages
657
-
658
- ### Linting errors
659
-
660
- 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/).
661
-
662
- ### TypeScript errors
663
-
664
- Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
665
-
666
- ## Resources
667
-
668
- - **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
669
- - **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
670
- - **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
671
- - **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
672
- - **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
673
-
674
- ## Contributing
675
-
676
- Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
677
-
678
- ## License
679
-
680
- [MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
1
+ # n8n-nodes-blossom
2
+
3
+ A comprehensive n8n community node for integrating with Blossom Sync API V2. This node provides full access to the Blossom synchronization service, supporting all 29 documented operations for users, groups, memberships, managers, suppliers, performances, and system utilities.
4
+
5
+ ## About Blossom Sync API V2
6
+
7
+ The Blossom Sync API V2 is a WebService for synchronizing objects (users/groups/suppliers) with a unified pattern: identification by external_id, support for GET (querystring) and POST (JSON), and CSV/Excel batch methods with a cap of 4 calls per 24 hours for each CSV method. There's a general rate limit of 30 requests per second.
8
+
9
+ ## Features
10
+
11
+ - **Complete API Coverage**: Supports all 29 documented Blossom Sync API V2 operations
12
+ - **Multiple Authentication Methods**: Basic Auth (default), JWT, and OAuth 2.0 (server must enable JWT/OAuth2)
13
+ - **Rate Limiting**: Built-in throttling to respect the 30 requests/second limit
14
+ - **CSV Batch Operations**: Support for bulk operations with 4 calls per 24 hours limit per CSV method
15
+ - **User Management**: Create, update, delete users and bulk import/export via CSV
16
+ - Complete user profiles with all available fields (gender, employment_date, about, user_nt, etc.)
17
+ - Avatar management (upload/remove)
18
+ - Custom field support by name, ID, or key
19
+ - **Group Management**: Manage groups, courses, roles, organizational units, templates, qualifications, and workplans
20
+ - Full group hierarchy support (attach/detach subgroups)
21
+ - Template attachment for courses and groups
22
+ - Grade publishing controls and visibility settings
23
+ - **Membership Management**: Attach/detach users to groups and manage managers
24
+ - Manager permissions (all, none, specific permissions)
25
+ - Primary manager settings
26
+ - User authorities (HR manager, professional manager, coach, supervisor)
27
+ - **Performance Tracking**: Import assignment and group performances
28
+ - CSV import for assignment performances
29
+ - CSV import for group performances (qualifications and courses)
30
+ - Diploma upload support
31
+ - **Supplier Management**: Manage external suppliers and institutions
32
+ - **Utility Functions**: Test connections, run auto-enrollment rules, manage user authorities
33
+ - **File Upload Support**: Handle CSV imports, avatar uploads, and diploma uploads
34
+ - **Generic API Access**: Make custom requests to any Blossom API endpoint
35
+ - **Comprehensive Error Handling**: Detailed error messages and validation
36
+
37
+ ## Recommended Sync Order
38
+
39
+ For optimal synchronization, follow this order:
40
+
41
+ 1. **DeleteUsersCSV** Clean up old users
42
+ 2. **ImportUsersCSV** → Import/update users
43
+ 3. **ImportGroupsCSV** Import/update groups
44
+ 4. **ImportGroupsMembersCSV** → Assign users to groups
45
+ 5. **RunAutoEnrollmentRules** → Apply enrollment rules (run off-hours)
46
+ 6. **RemoveEmptyOrgUnits** Clean up empty organizational units
47
+
48
+ ## Rate Limits & Best Practices
49
+
50
+ - **Rate Limit**: 30 requests per second (node throttles to 25 rps for safety)
51
+ - **CSV Limits**: 4 calls per 24 hours for each CSV method
52
+ - **Heavy Operations**: Run `RunAutoEnrollmentRules` and `RunScheduledImports` during off-hours
53
+ - **File Formats**: CSV files must be UTF-8 RFC-4180/TSV format
54
+ - **Date Format**: Use yyyy-mm-dd for all date fields
55
+ - **Checkbox Format**: Use 1 or 0 for boolean values
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ npm install n8n-nodes-blossom
61
+ ```
62
+
63
+ ### Important Note for Existing Users
64
+
65
+ If you already have an older version installed and are experiencing issues with updates, you may need to:
66
+
67
+ 1. **Clear npm cache** (if getting 404 errors):
68
+ ```bash
69
+ npm cache clean --force
70
+ ```
71
+
72
+ 2. **Uninstall the old version**:
73
+ ```bash
74
+ npm uninstall n8n-nodes-blossom
75
+ ```
76
+
77
+ 3. **Install the latest version**:
78
+ ```bash
79
+ npm install n8n-nodes-blossom@latest
80
+ ```
81
+
82
+ 4. **If still having issues, try installing specific version**:
83
+ ```bash
84
+ npm install n8n-nodes-blossom@2.0.0
85
+ ```
86
+
87
+ **Note**: Older versions (1.1.1 and below) were removed from NPM for security reasons. If you're getting 404 errors, it means n8n is trying to download a version that no longer exists.
88
+
89
+ ## Troubleshooting
90
+
91
+ ### Common Connection Issues
92
+
93
+ #### 1. Authentication Failed (401)
94
+ **Symptoms**: "Authorization failed - please check your credentials"
95
+
96
+ **Possible Causes**:
97
+ - Wrong username/password (using login credentials instead of API credentials)
98
+ - Wrong domain (check with your Blossom admin)
99
+ - Wrong Base URL format
100
+ - Server not accessible from your network
101
+
102
+ **Solutions**:
103
+ 1. **Verify API Credentials**: Use API user credentials, not your login credentials
104
+ 2. **Check Domain**: Verify domain ID or name with your Blossom administrator
105
+ 3. **Verify Base URL**: Should be `https://YOUR-COMPANY.blossom-kc.com/WebServices/sync_2`
106
+ 4. **Test Network**: Try accessing the URL in a browser
107
+ 5. **Check Firewall**: Ensure your network allows outbound HTTPS connections
108
+
109
+ #### 2. Connection Failed
110
+ **Symptoms**: "Connection failed" or "ENOTFOUND" errors
111
+
112
+ **Possible Causes**:
113
+ - Network connectivity issues
114
+ - Firewall blocking the connection
115
+ - Proxy configuration
116
+ - Server not available
117
+
118
+ **Solutions**:
119
+ 1. **Check Network**: Test internet connectivity
120
+ 2. **Firewall**: Allow outbound HTTPS connections on port 443
121
+ 3. **Proxy**: Configure proxy settings if required
122
+ 4. **Server Status**: Contact your Blossom administrator
123
+
124
+ #### 3. Endpoint Not Found (404)
125
+ **Symptoms**: "Endpoint not found" errors
126
+
127
+ **Possible Causes**:
128
+ - Wrong Base URL
129
+ - Wrong endpoint path
130
+ - API version mismatch
131
+
132
+ **Solutions**:
133
+ 1. **Verify Base URL**: Should end with `/WebServices/sync_2`
134
+ 2. **Check Endpoint**: Ensure the endpoint path is correct
135
+ 3. **API Version**: Verify you're using the correct API version
136
+
137
+ #### 4. Server Error (5xx)
138
+ **Symptoms**: "Server error" messages
139
+
140
+ **Possible Causes**:
141
+ - Server maintenance
142
+ - Server overload
143
+ - Internal server issues
144
+
145
+ **Solutions**:
146
+ 1. **Retry**: Wait a few minutes and try again
147
+ 2. **Contact Admin**: Reach out to your Blossom administrator
148
+ 3. **Check Status**: Verify server status with your IT team
149
+
150
+ ### Debug Information
151
+
152
+ When connection fails, the error message will include:
153
+ - Base URL being used
154
+ - Authentication type
155
+ - Domain setting
156
+ - Credential status (Set/Missing)
157
+ - Specific error details
158
+
159
+ ### Getting Help
160
+
161
+ 1. **Check Logs**: Review n8n logs for detailed error information
162
+ 2. **Test Credentials**: Use the "Test" button in credentials
163
+ 3. **Contact Support**: Reach out to your Blossom administrator
164
+ 4. **Documentation**: Check the [API Documentation](docs/API_DOCUMENTATION.md)
165
+
166
+ ## Configuration
167
+
168
+ ### Base Configuration
169
+ ```javascript
170
+ const config = {
171
+ baseURL: 'https://YOUR-COMPANY.blossom-kc.com/WebServices/sync_2',
172
+ authentication: 'basic',
173
+ username: 'YOUR_USERNAME',
174
+ password: 'YOUR_PASSWORD',
175
+ domain: 'YOUR_DOMAIN' // domain name or id (e.g., '1' or 'company-name')
176
+ };
177
+ ```
178
+
179
+ ### Finding Your Configuration
180
+ 1. **baseURL**: Replace `YOUR-COMPANY` with your organization's subdomain
181
+ 2. **domain**: Check with your Blossom admin or use domain name/ID from system
182
+ 3. **credentials**: Use your API user credentials (not your login credentials)
183
+
184
+ ### Rate Limits
185
+ - **API Calls**: Maximum 30 requests per second
186
+ - **CSV Import Methods**: Maximum 4 calls per 24 hours per method
187
+ - DeleteUsersCSV
188
+ - ImportUsersCSV
189
+ - ImportGroupsCSV
190
+ - ImportGroupsMembersCSV
191
+ - **System Operations**: Maximum 4 calls per 24 hours
192
+ - RunAutoEnrollmentRules
193
+ - RunScheduledImports
194
+
195
+ ## Authentication
196
+
197
+ The node supports multiple authentication methods:
198
+
199
+ ### Basic Authentication
200
+ - **Username**: Your API user credentials (not your login credentials)
201
+ - **Password**: Your API user password (not your login password)
202
+ - **Domain**: Domain name or ID (e.g., '1' or 'company-name')
203
+ - **Base URL**: Your Blossom instance URL (e.g., `https://YOUR-COMPANY.blossom-kc.com/`)
204
+
205
+ **Finding Your Configuration:**
206
+ - **Base URL**: Replace `YOUR-COMPANY` with your organization's subdomain
207
+ - **Domain**: Check with your Blossom admin or use domain name/ID from system
208
+ - **Credentials**: Use your API user credentials (not your login credentials)
209
+
210
+ ### API Key Authentication
211
+ - **API Key**: Your Blossom API key
212
+ - **Base URL**: Your Blossom instance URL
213
+
214
+ ### JWT Authentication
215
+ - **JWT Token**: JWT token generated with payload: `{"iss":"<user_name>","exp":<unix_timestamp>}`
216
+ - **Base URL**: Your Blossom instance URL
217
+
218
+ ### OAuth 2.0 Authentication
219
+ - **OAuth 2.0 Token**: Access token obtained from `{{baseUrl}}/WebServices/sync_2?auth_token`
220
+ - **Base URL**: Your Blossom instance URL
221
+
222
+ ## Available Operations
223
+
224
+ ### User Management
225
+ - **Update User**: Create or update user with full profile details
226
+ - **Get User**: Get user details by identifier (external_id, user_id, username, identity_num)
227
+ - **Get Users**: Get list of users with filters (limit, offset, search, department, company)
228
+ - **Import Users CSV**: Bulk import users from CSV/Excel files
229
+ - **Delete User**: Delete a single user (soft delete)
230
+ - **Delete Users CSV**: Bulk delete users from CSV/Excel files
231
+ - **Set Avatar**: Upload or remove user avatar (JPG/PNG)
232
+ - **User Authorities**: Set user authorities (HR manager, professional manager, coach, supervisor)
233
+
234
+ ### Group Management
235
+ - **Update Group**: Create or update groups, courses, roles, organizational units, templates, qualifications, and workplans
236
+ - **Get Group**: Get group details by identifier (group_id, group_external_id)
237
+ - **Get Groups**: Get list of groups with filters (limit, offset, search, type)
238
+ - **Get Group Members**: Get list of group members
239
+ - **Import Groups CSV**: Bulk import groups from CSV/Excel files
240
+ - **Delete Group**: Delete a group object
241
+ - **Attach Sub Group**: Attach sub group to parent group
242
+ - **Detach Sub Group**: Detach sub group from parent
243
+ - **Attach Instance**: Attach group/course to template
244
+ - **Detach Instance**: Detach group/course from template
245
+
246
+ ### Membership Management
247
+ - **Attach User to Group**: Add user to group, course, OU, qualification, or workplan
248
+ - **Detach User from Group**: Remove user from group
249
+ - **Detach User from OU**: Remove user from organizational unit
250
+ - **Get Memberships**: Get list of memberships with filters
251
+ - **Get User Groups**: Get groups for a specific user
252
+ - **Import Groups Members CSV**: Bulk attach users to groups via CSV
253
+ - **Attach Manager**: Add manager to group with permissions
254
+ - **Detach Manager**: Remove manager from group
255
+
256
+ ### Utility Functions
257
+ - **Test**: Test API connection and get random number
258
+ - **Get System Info**: Get system information and version
259
+ - **Get Domain Info**: Get domain information and settings
260
+ - **Run Auto Enrollment Rules**: Execute auto enrollment for all workspaces and users
261
+ - **Run Scheduled Imports**: Execute scheduled imports from SFTP or local folder
262
+ - **Remove Empty Org Units**: Delete empty organizational units
263
+ - **User Authorities**: Set HR manager, professional manager, coach, and supervisor
264
+ - **Power Manager**: Set/unset user as power manager
265
+ - **Upload Diploma**: Upload or remove diploma file for user in group
266
+
267
+ ### Supplier Management
268
+ - **Update Supplier**: Create or update supplier by external ID
269
+ - **Delete Supplier**: Delete supplier by external ID
270
+
271
+ ### Performance Management
272
+ - **Import Assignment Performances CSV**: Import assignment performance data
273
+ - **Import Group Performances CSV**: Import group performance data for qualifications and courses
274
+
275
+ ### System Operations (4)
276
+ - **Test**: Test connection and get server info
277
+ - **Run Auto Enrollment Rules**: Apply enrollment rules (run off-hours)
278
+ - **Run Scheduled Imports**: Execute scheduled imports (run off-hours)
279
+ - **Remove Empty Org Units**: Clean up empty organizational units
280
+
281
+ ## Usage Examples
282
+
283
+ ### 1. Complete User Profile Creation
284
+
285
+ ```json
286
+ {
287
+ "resource": "users",
288
+ "operation": "updateUser",
289
+ "userDetails": {
290
+ "details": {
291
+ "external_id": "a123",
292
+ "username": "john.doe",
293
+ "firstname": "John",
294
+ "lastname": "Doe",
295
+ "password": "SecurePass123!",
296
+ "email": "john.doe@company.com",
297
+ "gender": "M",
298
+ "birthday": "1990-05-15",
299
+ "employee_id": "EMP001",
300
+ "company": "Tech Corp",
301
+ "department": "Engineering",
302
+ "job_title": "Senior Developer",
303
+ "employment_date": "2024-01-15",
304
+ "address": "123 Main Street",
305
+ "city": "New York",
306
+ "zip": "10001",
307
+ "mphone": "+1-555-0100",
308
+ "bphone": "+1-555-0101",
309
+ "hphone": "+1-555-0102",
310
+ "user_nt": "DOMAIN\\johndoe",
311
+ "about": "Experienced developer",
312
+ "disabled": false
313
+ }
314
+ }
315
+ }
316
+ ```
317
+
318
+ **Configuration Notes:**
319
+ - **Base URL**: Replace `YOUR-COMPANY` with your organization's subdomain (e.g., `https://mer-group.blossom-kc.com/WebServices/sync_2`)
320
+ - **Domain**: Required for most operations (e.g., '1' or 'company-name')
321
+ - **Credentials**: Use your API user credentials, not your login credentials
322
+ - **Rate Limits**: Node throttles to 25 rps (API limit is 30 rps)
323
+ - **CSV Limits**: 4 calls per 24 hours for each CSV method
324
+
325
+ ### 2. CSV Import with Options
326
+
327
+ ```json
328
+ {
329
+ "resource": "users",
330
+ "operation": "importUsersCSV",
331
+ "csvFile": "external_id,username,firstname,lastname,email,password,disabled\na123,john.doe,John,Doe,john@company.com,Pass123!,0\na124,jane.smith,Jane,Smith,jane@company.com,Pass456!,0",
332
+ "importOptions": {
333
+ "options": {
334
+ "keep_old_values": true,
335
+ "temp_password": true,
336
+ "new_user_notification": true,
337
+ "password_not_required": false,
338
+ "manager_ou": true,
339
+ "clean_ou": true
340
+ }
341
+ }
342
+ }
343
+ ```
344
+
345
+ ### 3. Group Creation with All Fields
346
+
347
+ ```json
348
+ {
349
+ "resource": "groups",
350
+ "operation": "updateGroup",
351
+ "domain": "1",
352
+ "groupDetails": {
353
+ "details": {
354
+ "external_id": "COURSE001",
355
+ "name": "JavaScript Fundamentals",
356
+ "type": "course",
357
+ "description": "Learn JavaScript programming",
358
+ "open_date": "2024-01-15",
359
+ "close_date": "2024-12-31",
360
+ "passing_grade": 70,
361
+ "gathering_area": "Building A, Room 301",
362
+ "location": "New York Office",
363
+ "audience": "Developers, Technical Staff",
364
+ "estimated_budget": 5000,
365
+ "publish_grades_criteria": "on_completion",
366
+ "publish_grades_on_add": false,
367
+ "hide_score": false,
368
+ "hide_from_members": false,
369
+ "hide_from_user_profile": false,
370
+ "parent_external_id": "OU-ENG",
371
+ "template_external_id": "TPL001",
372
+ "classification": "Technical Training"
373
+ }
374
+ }
375
+ }
376
+ ```
377
+
378
+ ### 4. Manager Operations
379
+
380
+ ```json
381
+ {
382
+ "resource": "memberships",
383
+ "operation": "attachManager",
384
+ "domain": "1",
385
+ "userIdentifier": {
386
+ "identifier": {
387
+ "external_id": "a123"
388
+ }
389
+ },
390
+ "groupIdentifier": {
391
+ "identifier": {
392
+ "group_external_id": "COURSE001"
393
+ }
394
+ },
395
+ "managerType": "all",
396
+ "setPrimary": 1
397
+ }
398
+ ```
399
+
400
+ ### 5. Performance Import
401
+
402
+ ```json
403
+ {
404
+ "resource": "performances",
405
+ "operation": "importAssignmentPerformancesCSV",
406
+ "csvFile": "user_name,assignment_id,date,grade,completed\njohn.doe,ASSIGN001,2024-01-15,85,Yes\njane.smith,ASSIGN001,2024-01-16,92,Yes"
407
+ }
408
+ ```
409
+
410
+ ### 6. User Authorities
411
+
412
+ ```json
413
+ {
414
+ "resource": "utilities",
415
+ "operation": "setUserAuthorities",
416
+ "domain": "1",
417
+ "userIdentifier": {
418
+ "identifier": {
419
+ "external_id": "a123"
420
+ }
421
+ },
422
+ "authorities": {
423
+ "user_hr_manager_id": "a007",
424
+ "user_professional_manager_id": "a007",
425
+ "user_coach_id": "a007",
426
+ "user_auth_supervisor_id": "a007"
427
+ }
428
+ }
429
+ ```
430
+
431
+ ### 5. Upload User Avatar
432
+
433
+ ```json
434
+ {
435
+ "resource": "User",
436
+ "operation": "setAvatar",
437
+ "domain": "1",
438
+ "user_identifier": {
439
+ "external_id": "user123"
440
+ },
441
+ "remove_avatar": "0",
442
+ "avatarfile": {
443
+ "value": "binary_image_data",
444
+ "options": {
445
+ "filename": "avatar.jpg",
446
+ "contentType": "image/jpeg"
447
+ }
448
+ }
449
+ }
450
+ ```
451
+
452
+ ### 6. Test API Connection
453
+
454
+ ```json
455
+ {
456
+ "resource": "Utility",
457
+ "operation": "test"
458
+ }
459
+ ```
460
+
461
+ ## CSV Import Templates
462
+
463
+ ### Users CSV Template
464
+ Required columns: `external_id`, `username`, `firstname`, `lastname`, `email`
465
+ Optional columns: `password`, `birthday`, `job_title`, `department`, `company`, `address`, `city`, `zip`, `bphone`, `hphone`, `mphone`, `gender`, `employment_date`, `about`, `user_nt`, `disabled`, `חטיבה`, `קבלן שטח`, `קבלן משרדי`
466
+
467
+ ### Groups CSV Template
468
+ Required columns: `external_id`, `name`, `type`
469
+ Optional columns: `description`, `open_date`, `close_date`, `passing_grade`, `gathering_area`, `location`, `audience`, `estimated_budget`, `publish_grades_criteria`, `publish_grades_on_add`, `hide_score`, `hide_from_members`, `hide_from_user_profile`, `parent_external_id`, `template_external_id`, `classification`
470
+
471
+ ### Group Members CSV Template
472
+ Required columns: `user_external_id` (or `user_id`), `workspace_external_id` (or `group_id`)
473
+ Optional columns: `manager_external_id`, `manager_type`
474
+
475
+ ## Error Handling
476
+
477
+ The node provides comprehensive error handling with detailed error messages:
478
+
479
+ - **API Errors**: Returns specific error messages from the Blossom API
480
+ - **Validation Errors**: Validates required parameters before making requests
481
+ - **File Upload Errors**: Handles file format and size validation
482
+ - **Authentication Errors**: Clear messages for authentication failures
483
+
484
+ ## Rate Limits
485
+
486
+ - **CSV Operations**: Maximum 4 calls per 24 hours
487
+ - **General API**: 30 requests per second
488
+ - **Scheduled Operations**: Run outside working hours for best performance
489
+
490
+ ## What's Included
491
+
492
+ This starter repository includes two example nodes to learn from:
493
+
494
+ - **[Example Node](nodes/Example/)** - A simple starter node that shows the basic structure with a custom `execute` method
495
+ - **[GitHub Issues Node](nodes/GithubIssues/)** - A complete, production-ready example built using the **declarative style**:
496
+ - **Low-code approach** - Define operations declaratively without writing request logic
497
+ - Multiple resources (Issues, Comments)
498
+ - Multiple operations (Get, Get All, Create)
499
+ - Two authentication methods (OAuth2 and Personal Access Token)
500
+ - List search functionality for dynamic dropdowns
501
+ - Proper error handling and typing
502
+ - Ideal for HTTP API-based integrations
503
+
504
+ > [!TIP]
505
+ > 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.
506
+
507
+ Browse these examples to understand both approaches, then modify them or create your own.
508
+
509
+ ## Finding Inspiration
510
+
511
+ Looking for more examples? Check out these resources:
512
+
513
+ - **[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
514
+ - **[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
515
+ - **[n8n Credentials](https://github.com/n8n-io/n8n/tree/master/packages/nodes-base/credentials)** - See how authentication is implemented for various services
516
+
517
+ These are excellent resources to understand how to structure your nodes, handle different API patterns, and implement advanced features.
518
+
519
+ ## Prerequisites
520
+
521
+ Before you begin, install the following on your development machine:
522
+
523
+ ### Required
524
+
525
+ - **[Node.js](https://nodejs.org/)** (v22 or higher) and npm
526
+ - Linux/Mac/WSL: Install via [nvm](https://github.com/nvm-sh/nvm)
527
+ - Windows: Follow [Microsoft's NodeJS guide](https://learn.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows)
528
+ - **[git](https://git-scm.com/downloads)**
529
+
530
+ ### Recommended
531
+
532
+ - Follow n8n's [development environment setup guide](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/)
533
+
534
+ > [!NOTE]
535
+ > 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.
536
+
537
+ ## Getting Started with this Starter
538
+
539
+ Follow these steps to create your own n8n community node package:
540
+
541
+ ### 1. Create Your Repository
542
+
543
+ [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template, then clone it:
544
+
545
+ ```bash
546
+ git clone https://github.com/<your-organization>/<your-repo-name>.git
547
+ cd <your-repo-name>
548
+ ```
549
+
550
+ ### 2. Install Dependencies
551
+
552
+ ```bash
553
+ npm install
554
+ ```
555
+
556
+ This installs all required dependencies including the `@n8n/node-cli`.
557
+
558
+ ### 3. Explore the Examples
559
+
560
+ Browse the example nodes in [nodes/](nodes/) and [credentials/](credentials/) to understand the structure:
561
+
562
+ - Start with [nodes/Example/](nodes/Example/) for a basic node
563
+ - Study [nodes/GithubIssues/](nodes/GithubIssues/) for a real-world implementation
564
+
565
+ ### 4. Build Your Node
566
+
567
+ Edit the example nodes to fit your use case, or create new node files by copying the structure from [nodes/Example/](nodes/Example/).
568
+
569
+ > [!TIP]
570
+ > If you want to scaffold a completely new node package, use `npm create @n8n/node` to start fresh with the CLI's interactive generator.
571
+
572
+ ### 5. Configure Your Package
573
+
574
+ Update `package.json` with your details:
575
+
576
+ - `name` - Your package name (must start with `n8n-nodes-`)
577
+ - `author` - Your name and email
578
+ - `repository` - Your repository URL
579
+ - `description` - What your node does
580
+
581
+ Make sure your node is registered in the `n8n.nodes` array.
582
+
583
+ ### 6. Develop and Test Locally
584
+
585
+ Start n8n with your node loaded:
586
+
587
+ ```bash
588
+ npm run dev
589
+ ```
590
+
591
+ This command runs `n8n-node dev` which:
592
+
593
+ - Builds your node with watch mode
594
+ - Starts n8n with your node available
595
+ - Automatically rebuilds when you make changes
596
+ - Opens n8n in your browser (usually http://localhost:5678)
597
+
598
+ You can now test your node in n8n workflows!
599
+
600
+ > [!NOTE]
601
+ > Learn more about CLI commands in the [@n8n/node-cli documentation](https://www.npmjs.com/package/@n8n/node-cli).
602
+
603
+ ### 7. Lint Your Code
604
+
605
+ Check for errors:
606
+
607
+ ```bash
608
+ npm run lint
609
+ ```
610
+
611
+ Auto-fix issues when possible:
612
+
613
+ ```bash
614
+ npm run lint:fix
615
+ ```
616
+
617
+ ### 8. Build for Production
618
+
619
+ When ready to publish:
620
+
621
+ ```bash
622
+ npm run build
623
+ ```
624
+
625
+ This compiles your TypeScript code to the `dist/` folder.
626
+
627
+ ### 9. Prepare for Publishing
628
+
629
+ Before publishing:
630
+
631
+ 1. **Update documentation**: Replace this README with your node's documentation. Use [README_TEMPLATE.md](README_TEMPLATE.md) as a starting point.
632
+ 2. **Update the LICENSE**: Add your details to the [LICENSE](LICENSE.md) file.
633
+ 3. **Test thoroughly**: Ensure your node works in different scenarios.
634
+
635
+ ### 10. Publish to npm
636
+
637
+ Publish your package to make it available to the n8n community:
638
+
639
+ ```bash
640
+ npm publish
641
+ ```
642
+
643
+ Learn more about [publishing to npm](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).
644
+
645
+ ### 11. Submit for Verification (Optional)
646
+
647
+ Get your node verified for n8n Cloud:
648
+
649
+ 1. Ensure your node meets the [requirements](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/):
650
+ - Uses MIT license ✅ (included in this starter)
651
+ - No external package dependencies
652
+ - Follows n8n's design guidelines
653
+ - Passes quality and security review
654
+
655
+ 2. Submit through the [n8n Creator Portal](https://creators.n8n.io/nodes)
656
+
657
+ **Benefits of verification:**
658
+
659
+ - Available directly in n8n Cloud
660
+ - Discoverable in the n8n nodes panel
661
+ - Verified badge for quality assurance
662
+ - Increased visibility in the n8n community
663
+
664
+ ## Available Scripts
665
+
666
+ This starter includes several npm scripts to streamline development:
667
+
668
+ | Script | Description |
669
+ | --------------------- | ---------------------------------------------------------------- |
670
+ | `npm run dev` | Start n8n with your node and watch for changes (runs `n8n-node dev`) |
671
+ | `npm run build` | Compile TypeScript to JavaScript for production (runs `n8n-node build`) |
672
+ | `npm run build:watch` | Build in watch mode (auto-rebuild on changes) |
673
+ | `npm run lint` | Check your code for errors and style issues (runs `n8n-node lint`) |
674
+ | `npm run lint:fix` | Automatically fix linting issues when possible (runs `n8n-node lint --fix`) |
675
+ | `npm run release` | Create a new release (runs `n8n-node release`) |
676
+
677
+ > [!TIP]
678
+ > 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`.
679
+
680
+ ## Troubleshooting
681
+
682
+ ### My node doesn't appear in n8n
683
+
684
+ 1. Make sure you ran `npm install` to install dependencies
685
+ 2. Check that your node is listed in `package.json` under `n8n.nodes`
686
+ 3. Restart the dev server with `npm run dev`
687
+ 4. Check the console for any error messages
688
+
689
+ ### Linting errors
690
+
691
+ 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/).
692
+
693
+ ### TypeScript errors
694
+
695
+ Make sure you're using Node.js v22 or higher and have run `npm install` to get all type definitions.
696
+
697
+ ## Resources
698
+
699
+ - **[n8n Node Documentation](https://docs.n8n.io/integrations/creating-nodes/)** - Complete guide to building nodes
700
+ - **[n8n Community Forum](https://community.n8n.io/)** - Get help and share your nodes
701
+ - **[@n8n/node-cli Documentation](https://www.npmjs.com/package/@n8n/node-cli)** - CLI tool reference
702
+ - **[n8n Creator Portal](https://creators.n8n.io/nodes)** - Submit your node for verification
703
+ - **[Submit Community Nodes Guide](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/)** - Verification requirements and process
704
+
705
+ ## Contributing
706
+
707
+ Have suggestions for improving this starter? [Open an issue](https://github.com/n8n-io/n8n-nodes-starter/issues) or submit a pull request!
708
+
709
+ ## License
710
+
711
+ [MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)