n8n-nodes-blossom 2.3.23 → 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,711 +1,711 @@
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)
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)