n8n-nodes-blossom 2.5.13 → 3.0.2

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.
Files changed (217) hide show
  1. package/README.md +341 -711
  2. package/dist/credentials/BlossomApi.credentials.js +13 -53
  3. package/dist/credentials/BlossomApi.credentials.js.map +1 -1
  4. package/dist/credentials/GithubIssuesApi.credentials.d.ts +10 -0
  5. package/dist/credentials/GithubIssuesApi.credentials.js +37 -0
  6. package/dist/credentials/GithubIssuesApi.credentials.js.map +1 -0
  7. package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +9 -0
  8. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +54 -0
  9. package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +1 -0
  10. package/dist/icons/blossom.svg +14 -6
  11. package/dist/nodes/Blossom/Blossom.node.d.ts +1 -1
  12. package/dist/nodes/Blossom/Blossom.node.js +150 -531
  13. package/dist/nodes/Blossom/Blossom.node.js.map +1 -1
  14. package/dist/nodes/Blossom/Blossom.node.json +7 -4
  15. package/dist/nodes/Blossom/blossom.svg +15 -0
  16. package/dist/nodes/Blossom/resources/data/getMeetings.d.ts +2 -0
  17. package/dist/nodes/Blossom/resources/data/getMeetings.js +99 -0
  18. package/dist/nodes/Blossom/resources/data/getMeetings.js.map +1 -0
  19. package/dist/nodes/Blossom/resources/data/groups.js +77 -0
  20. package/dist/nodes/Blossom/resources/data/groups.js.map +1 -0
  21. package/dist/nodes/Blossom/resources/data/index.d.ts +2 -0
  22. package/dist/nodes/Blossom/resources/data/index.js +91 -0
  23. package/dist/nodes/Blossom/resources/data/index.js.map +1 -0
  24. package/dist/nodes/Blossom/resources/data/membersStatus.d.ts +2 -0
  25. package/dist/nodes/Blossom/resources/data/membersStatus.js +88 -0
  26. package/dist/nodes/Blossom/resources/data/membersStatus.js.map +1 -0
  27. package/dist/nodes/Blossom/resources/data/setDueDate.d.ts +2 -0
  28. package/dist/nodes/Blossom/resources/data/setDueDate.js +113 -0
  29. package/dist/nodes/Blossom/resources/data/setDueDate.js.map +1 -0
  30. package/dist/nodes/Blossom/resources/data/userCompletion.d.ts +2 -0
  31. package/dist/nodes/Blossom/resources/data/userCompletion.js +139 -0
  32. package/dist/nodes/Blossom/resources/data/userCompletion.js.map +1 -0
  33. package/dist/nodes/Blossom/resources/group/attachInstance.d.ts +2 -0
  34. package/dist/nodes/Blossom/resources/group/attachInstance.js +61 -0
  35. package/dist/nodes/Blossom/resources/group/attachInstance.js.map +1 -0
  36. package/dist/nodes/Blossom/resources/group/attachSubGroup.d.ts +2 -0
  37. package/dist/nodes/Blossom/resources/group/attachSubGroup.js +61 -0
  38. package/dist/nodes/Blossom/resources/group/attachSubGroup.js.map +1 -0
  39. package/dist/nodes/Blossom/resources/group/delete.d.ts +2 -0
  40. package/dist/nodes/Blossom/resources/group/delete.js +47 -0
  41. package/dist/nodes/Blossom/resources/group/delete.js.map +1 -0
  42. package/dist/nodes/Blossom/resources/group/detachInstance.d.ts +2 -0
  43. package/dist/nodes/Blossom/resources/group/detachInstance.js +32 -0
  44. package/dist/nodes/Blossom/resources/group/detachInstance.js.map +1 -0
  45. package/dist/nodes/Blossom/resources/group/detachSubGroup.d.ts +2 -0
  46. package/dist/nodes/Blossom/resources/group/detachSubGroup.js +32 -0
  47. package/dist/nodes/Blossom/resources/group/detachSubGroup.js.map +1 -0
  48. package/dist/nodes/Blossom/resources/group/importGroupsCSV.d.ts +2 -0
  49. package/dist/nodes/Blossom/resources/group/importGroupsCSV.js +79 -0
  50. package/dist/nodes/Blossom/resources/group/importGroupsCSV.js.map +1 -0
  51. package/dist/nodes/Blossom/resources/group/index.d.ts +2 -0
  52. package/dist/nodes/Blossom/resources/group/index.js +113 -0
  53. package/dist/nodes/Blossom/resources/group/index.js.map +1 -0
  54. package/dist/nodes/Blossom/resources/group/update.d.ts +2 -0
  55. package/dist/nodes/Blossom/resources/group/update.js +202 -0
  56. package/dist/nodes/Blossom/resources/group/update.js.map +1 -0
  57. package/dist/nodes/Blossom/resources/manager/attach.d.ts +2 -0
  58. package/dist/nodes/Blossom/resources/manager/attach.js +77 -0
  59. package/dist/nodes/Blossom/resources/manager/attach.js.map +1 -0
  60. package/dist/nodes/Blossom/resources/manager/detach.d.ts +2 -0
  61. package/dist/nodes/Blossom/resources/manager/detach.js +43 -0
  62. package/dist/nodes/Blossom/resources/manager/detach.js.map +1 -0
  63. package/dist/nodes/Blossom/resources/manager/index.d.ts +2 -0
  64. package/dist/nodes/Blossom/resources/manager/index.js +49 -0
  65. package/dist/nodes/Blossom/resources/manager/index.js.map +1 -0
  66. package/dist/nodes/Blossom/resources/membership/attach.d.ts +2 -0
  67. package/dist/nodes/Blossom/resources/membership/attach.js +43 -0
  68. package/dist/nodes/Blossom/resources/membership/attach.js.map +1 -0
  69. package/dist/nodes/Blossom/resources/membership/detach.d.ts +2 -0
  70. package/dist/nodes/Blossom/resources/membership/detach.js +42 -0
  71. package/dist/nodes/Blossom/resources/membership/detach.js.map +1 -0
  72. package/dist/nodes/Blossom/resources/membership/importGroupsMembersCSV.d.ts +2 -0
  73. package/dist/nodes/Blossom/resources/membership/importGroupsMembersCSV.js +42 -0
  74. package/dist/nodes/Blossom/resources/membership/importGroupsMembersCSV.js.map +1 -0
  75. package/dist/nodes/Blossom/resources/membership/index.d.ts +2 -0
  76. package/dist/nodes/Blossom/resources/membership/index.js +57 -0
  77. package/dist/nodes/Blossom/resources/membership/index.js.map +1 -0
  78. package/dist/nodes/Blossom/resources/performance/importAssignmentPerformancesCSV.d.ts +2 -0
  79. package/dist/nodes/Blossom/resources/performance/importAssignmentPerformancesCSV.js +32 -0
  80. package/dist/nodes/Blossom/resources/performance/importAssignmentPerformancesCSV.js.map +1 -0
  81. package/dist/nodes/Blossom/resources/performance/importGroupPerformancesCSV.d.ts +2 -0
  82. package/dist/nodes/Blossom/resources/performance/importGroupPerformancesCSV.js +32 -0
  83. package/dist/nodes/Blossom/resources/performance/importGroupPerformancesCSV.js.map +1 -0
  84. package/dist/nodes/Blossom/resources/performance/index.d.ts +2 -0
  85. package/dist/nodes/Blossom/resources/performance/index.js +45 -0
  86. package/dist/nodes/Blossom/resources/performance/index.js.map +1 -0
  87. package/dist/nodes/Blossom/resources/performance/uploadDiploma.d.ts +2 -0
  88. package/dist/nodes/Blossom/resources/performance/uploadDiploma.js +104 -0
  89. package/dist/nodes/Blossom/resources/performance/uploadDiploma.js.map +1 -0
  90. package/dist/nodes/Blossom/resources/supplier/delete.d.ts +2 -0
  91. package/dist/nodes/Blossom/resources/supplier/delete.js +32 -0
  92. package/dist/nodes/Blossom/resources/supplier/delete.js.map +1 -0
  93. package/dist/nodes/Blossom/resources/supplier/index.d.ts +2 -0
  94. package/dist/nodes/Blossom/resources/supplier/index.js +49 -0
  95. package/dist/nodes/Blossom/resources/supplier/index.js.map +1 -0
  96. package/dist/nodes/Blossom/resources/supplier/update.d.ts +2 -0
  97. package/dist/nodes/Blossom/resources/supplier/update.js +67 -0
  98. package/dist/nodes/Blossom/resources/supplier/update.js.map +1 -0
  99. package/dist/nodes/Blossom/resources/user/avatarSet.d.ts +2 -0
  100. package/dist/nodes/Blossom/resources/user/avatarSet.js +78 -0
  101. package/dist/nodes/Blossom/resources/user/avatarSet.js.map +1 -0
  102. package/dist/nodes/Blossom/resources/user/delete.d.ts +2 -0
  103. package/dist/nodes/Blossom/resources/user/delete.js +49 -0
  104. package/dist/nodes/Blossom/resources/user/delete.js.map +1 -0
  105. package/dist/nodes/Blossom/resources/user/deleteUsersCSV.d.ts +2 -0
  106. package/dist/nodes/Blossom/resources/user/deleteUsersCSV.js +42 -0
  107. package/dist/nodes/Blossom/resources/user/deleteUsersCSV.js.map +1 -0
  108. package/dist/nodes/Blossom/resources/user/importUsersCSV.d.ts +2 -0
  109. package/dist/nodes/Blossom/resources/user/importUsersCSV.js +93 -0
  110. package/dist/nodes/Blossom/resources/user/importUsersCSV.js.map +1 -0
  111. package/dist/nodes/Blossom/resources/user/index.d.ts +2 -0
  112. package/dist/nodes/Blossom/resources/user/index.js +101 -0
  113. package/dist/nodes/Blossom/resources/user/index.js.map +1 -0
  114. package/dist/nodes/Blossom/resources/user/powerManager.d.ts +2 -0
  115. package/dist/nodes/Blossom/resources/user/powerManager.js +64 -0
  116. package/dist/nodes/Blossom/resources/user/powerManager.js.map +1 -0
  117. package/dist/nodes/Blossom/resources/user/update.d.ts +2 -0
  118. package/dist/nodes/Blossom/resources/user/update.js +233 -0
  119. package/dist/nodes/Blossom/resources/user/update.js.map +1 -0
  120. package/dist/nodes/Blossom/resources/user/userAuthorities.d.ts +2 -0
  121. package/dist/nodes/Blossom/resources/user/userAuthorities.js +101 -0
  122. package/dist/nodes/Blossom/resources/user/userAuthorities.js.map +1 -0
  123. package/dist/nodes/Blossom/resources/utility/index.d.ts +2 -0
  124. package/dist/nodes/Blossom/resources/utility/index.js +77 -0
  125. package/dist/nodes/Blossom/resources/utility/index.js.map +1 -0
  126. package/dist/nodes/Blossom/resources/utility/removeEmptyOrgUnits.d.ts +2 -0
  127. package/dist/nodes/Blossom/resources/utility/removeEmptyOrgUnits.js +21 -0
  128. package/dist/nodes/Blossom/resources/utility/removeEmptyOrgUnits.js.map +1 -0
  129. package/dist/nodes/Blossom/resources/utility/runAutoEnrollmentRules.d.ts +2 -0
  130. package/dist/nodes/Blossom/resources/utility/runAutoEnrollmentRules.js +20 -0
  131. package/dist/nodes/Blossom/resources/utility/runAutoEnrollmentRules.js.map +1 -0
  132. package/dist/nodes/Blossom/resources/utility/runScheduledImports.d.ts +2 -0
  133. package/dist/nodes/Blossom/resources/utility/runScheduledImports.js +20 -0
  134. package/dist/nodes/Blossom/resources/utility/runScheduledImports.js.map +1 -0
  135. package/dist/nodes/Blossom/resources/utility/test.d.ts +2 -0
  136. package/dist/nodes/Blossom/resources/utility/test.js +20 -0
  137. package/dist/nodes/Blossom/resources/utility/test.js.map +1 -0
  138. package/dist/nodes/Blossom/shared/descriptions.d.ts +6 -0
  139. package/dist/nodes/Blossom/shared/descriptions.js +52 -0
  140. package/dist/nodes/Blossom/shared/descriptions.js.map +1 -0
  141. package/dist/nodes/Blossom/shared/errorHandling.d.ts +36 -0
  142. package/dist/nodes/Blossom/shared/errorHandling.js +102 -0
  143. package/dist/nodes/Blossom/shared/errorHandling.js.map +1 -0
  144. package/dist/nodes/Blossom/shared/fileUpload.d.ts +7 -0
  145. package/dist/nodes/Blossom/shared/fileUpload.js +112 -0
  146. package/dist/nodes/Blossom/shared/fileUpload.js.map +1 -0
  147. package/dist/nodes/Blossom/shared/transport.d.ts +4 -23
  148. package/dist/nodes/Blossom/shared/transport.js +19 -222
  149. package/dist/nodes/Blossom/shared/transport.js.map +1 -1
  150. package/dist/nodes/Example/Example.node.d.ts +5 -0
  151. package/dist/nodes/Example/Example.node.js +61 -0
  152. package/dist/nodes/Example/Example.node.js.map +1 -0
  153. package/dist/nodes/Example/Example.node.json +18 -0
  154. package/dist/nodes/Example/example.dark.svg +13 -0
  155. package/dist/nodes/Example/example.svg +13 -0
  156. package/dist/nodes/GithubIssues/GithubIssues.node.json +18 -0
  157. package/dist/nodes/GithubIssues/listSearch/getIssues.d.ts +2 -0
  158. package/dist/nodes/GithubIssues/listSearch/getIssues.js +28 -0
  159. package/dist/nodes/GithubIssues/listSearch/getIssues.js.map +1 -0
  160. package/dist/nodes/GithubIssues/listSearch/getRepositories.d.ts +2 -0
  161. package/dist/nodes/GithubIssues/listSearch/getRepositories.js +31 -0
  162. package/dist/nodes/GithubIssues/listSearch/getRepositories.js.map +1 -0
  163. package/dist/nodes/GithubIssues/listSearch/getUsers.d.ts +2 -0
  164. package/dist/nodes/GithubIssues/listSearch/getUsers.js +29 -0
  165. package/dist/nodes/GithubIssues/listSearch/getUsers.js.map +1 -0
  166. package/dist/nodes/GithubIssues/resources/issue/create.d.ts +2 -0
  167. package/dist/nodes/GithubIssues/resources/issue/create.js +75 -0
  168. package/dist/nodes/GithubIssues/resources/issue/create.js.map +1 -0
  169. package/dist/nodes/GithubIssues/resources/issue/get.d.ts +2 -0
  170. package/dist/nodes/GithubIssues/resources/issue/get.js +15 -0
  171. package/dist/nodes/GithubIssues/resources/issue/get.js.map +1 -0
  172. package/dist/nodes/GithubIssues/resources/issue/getAll.d.ts +2 -0
  173. package/dist/nodes/GithubIssues/resources/issue/getAll.js +125 -0
  174. package/dist/nodes/GithubIssues/resources/issue/getAll.js.map +1 -0
  175. package/dist/nodes/GithubIssues/resources/issue/index.d.ts +2 -0
  176. package/dist/nodes/GithubIssues/resources/issue/index.js +76 -0
  177. package/dist/nodes/GithubIssues/resources/issue/index.js.map +1 -0
  178. package/dist/nodes/GithubIssues/resources/issueComment/getAll.d.ts +2 -0
  179. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js +66 -0
  180. package/dist/nodes/GithubIssues/resources/issueComment/getAll.js.map +1 -0
  181. package/dist/nodes/GithubIssues/resources/issueComment/index.d.ts +2 -0
  182. package/dist/nodes/GithubIssues/resources/issueComment/index.js +48 -0
  183. package/dist/nodes/GithubIssues/resources/issueComment/index.js.map +1 -0
  184. package/dist/nodes/GithubIssues/shared/descriptions.d.ts +4 -0
  185. package/dist/nodes/GithubIssues/shared/descriptions.js +151 -0
  186. package/dist/nodes/GithubIssues/shared/descriptions.js.map +1 -0
  187. package/dist/nodes/GithubIssues/shared/transport.d.ts +2 -0
  188. package/dist/nodes/GithubIssues/shared/transport.js +16 -0
  189. package/dist/nodes/GithubIssues/shared/transport.js.map +1 -0
  190. package/dist/nodes/GithubIssues/shared/utils.d.ts +3 -0
  191. package/dist/nodes/GithubIssues/shared/utils.js +17 -0
  192. package/dist/nodes/GithubIssues/shared/utils.js.map +1 -0
  193. package/dist/package.json +12 -24
  194. package/dist/tsconfig.tsbuildinfo +1 -1
  195. package/package.json +12 -24
  196. package/dist/icons/blossom.dark.svg +0 -7
  197. package/dist/nodes/Blossom/resources/groups/index.js +0 -476
  198. package/dist/nodes/Blossom/resources/groups/index.js.map +0 -1
  199. package/dist/nodes/Blossom/resources/managers/index.d.ts +0 -2
  200. package/dist/nodes/Blossom/resources/managers/index.js +0 -261
  201. package/dist/nodes/Blossom/resources/managers/index.js.map +0 -1
  202. package/dist/nodes/Blossom/resources/memberships/index.d.ts +0 -2
  203. package/dist/nodes/Blossom/resources/memberships/index.js +0 -191
  204. package/dist/nodes/Blossom/resources/memberships/index.js.map +0 -1
  205. package/dist/nodes/Blossom/resources/performances/index.d.ts +0 -2
  206. package/dist/nodes/Blossom/resources/performances/index.js +0 -176
  207. package/dist/nodes/Blossom/resources/performances/index.js.map +0 -1
  208. package/dist/nodes/Blossom/resources/suppliers/index.d.ts +0 -2
  209. package/dist/nodes/Blossom/resources/suppliers/index.js +0 -156
  210. package/dist/nodes/Blossom/resources/suppliers/index.js.map +0 -1
  211. package/dist/nodes/Blossom/resources/users/index.d.ts +0 -2
  212. package/dist/nodes/Blossom/resources/users/index.js +0 -412
  213. package/dist/nodes/Blossom/resources/users/index.js.map +0 -1
  214. package/dist/nodes/Blossom/resources/utilities/index.d.ts +0 -2
  215. package/dist/nodes/Blossom/resources/utilities/index.js +0 -59
  216. package/dist/nodes/Blossom/resources/utilities/index.js.map +0 -1
  217. /package/dist/nodes/Blossom/resources/{groups/index.d.ts → data/groups.d.ts} +0 -0
package/README.md CHANGED
@@ -1,711 +1,341 @@
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
+ ![Blossom Logo](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
4
+
5
+ n8n community node for integrating with **Blossom LMS/LXP** (Learning Management System / Learning Experience Platform).
6
+
7
+ ## Features
8
+
9
+ This node provides comprehensive integration with Blossom API, allowing you to:
10
+
11
+ - **User Management**: Create, update, and delete users
12
+ - **Group/Workspace Management**: Manage groups, courses, qualifications, and organizational units
13
+ - **Membership Management**: Attach and detach users from groups
14
+ - **Data Queries**: Retrieve completion status, member status, groups, and meetings
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install n8n-nodes-blossom
20
+ ```
21
+
22
+ ## Authentication
23
+
24
+ The node uses **Basic Authentication**. Configure your credentials:
25
+
26
+ 1. **Base URL**: `https://your-instance.blossom-kc.com` (your Blossom instance URL)
27
+ 2. **Username**: Your API username
28
+ 3. **Password**: Your API password
29
+
30
+ ### Getting Credentials
31
+
32
+ Contact your Blossom administrator to obtain API credentials with appropriate permissions.
33
+
34
+ ## Resources and Operations
35
+
36
+ ### User Resource
37
+
38
+ #### Update User
39
+ Create or update a user in Blossom.
40
+
41
+ **Required Fields:**
42
+ - External ID
43
+ - Domain
44
+ - Username (recommended)
45
+ - First Name (recommended)
46
+ - Last Name (recommended)
47
+
48
+ **Optional Fields:**
49
+ - Email
50
+ - Password
51
+ - Department
52
+ - Job Title
53
+ - Employee ID
54
+ - Company
55
+ - Birthday
56
+ - Custom Fields (field_1, field_2, etc.)
57
+
58
+ **Example:**
59
+ ```json
60
+ {
61
+ "domain": 1,
62
+ "details": {
63
+ "external_id": "u123",
64
+ "username": "john.doe",
65
+ "firstname": "John",
66
+ "lastname": "Doe",
67
+ "email": "john.doe@example.com",
68
+ "department": "IT",
69
+ "job_title": "Developer"
70
+ }
71
+ }
72
+ ```
73
+
74
+ #### Delete User
75
+ Delete a user by identifier (External ID, User ID, User Name, or Identity Number).
76
+
77
+ ### Group Resource
78
+
79
+ #### Update Group
80
+ Create or update a group/workspace in Blossom.
81
+
82
+ **Group Types:**
83
+ - Group
84
+ - Course
85
+ - Role
86
+ - Org Unit (OU)
87
+ - Template
88
+ - Qualification
89
+ - Workplan
90
+
91
+ **Required Fields:**
92
+ - Domain
93
+ - External ID
94
+ - Name
95
+ - Type
96
+
97
+ **Optional Fields:**
98
+ - Description
99
+ - Open Date
100
+ - Close Date
101
+ - Passing Grade
102
+ - Parent External ID
103
+ - Template External ID
104
+ - Custom Fields
105
+
106
+ **Example:**
107
+ ```json
108
+ {
109
+ "domain": 1,
110
+ "details": {
111
+ "external_id": "g456",
112
+ "name": "Safety Training Course",
113
+ "type": "course",
114
+ "description": "Mandatory safety training",
115
+ "open_date": "2025-01-01",
116
+ "close_date": "2025-12-31"
117
+ }
118
+ }
119
+ ```
120
+
121
+ #### Delete Group
122
+ Delete a group by identifier (External ID or Group ID).
123
+
124
+ ### Membership Resource
125
+
126
+ #### Attach User to Group
127
+ Attach a user to a group/workspace.
128
+
129
+ **Required Fields:**
130
+ - Domain
131
+ - User External ID
132
+ - Group External ID
133
+
134
+ #### Detach User from Group
135
+ Detach a user from a group/workspace.
136
+
137
+ **Required Fields:**
138
+ - Domain
139
+ - User External ID
140
+ - Group External ID (optional - leave empty to detach from all OUs)
141
+
142
+ ### Data Resource
143
+
144
+ #### Get User Completion
145
+ Retrieve user completion status for qualifications, courses, and assignments.
146
+
147
+ **Required Fields:**
148
+ - Domain
149
+ - Start Date
150
+ - End Date
151
+ - Types (Qualifications, Courses, Assignments)
152
+
153
+ **Optional Filters:**
154
+ - Group External ID
155
+ - Group ID
156
+ - User External ID
157
+ - User Name
158
+ - User ID
159
+ - Employee ID
160
+
161
+ **Example:**
162
+ ```json
163
+ {
164
+ "domain": 1,
165
+ "start_date": "2020-01-01",
166
+ "end_date": "2030-01-01",
167
+ "types": "Courses,Qualifications",
168
+ "filters": {
169
+ "user_external_id": "u123"
170
+ }
171
+ }
172
+ ```
173
+
174
+ #### Get Members Status
175
+ Get member status in workspace(s).
176
+
177
+ **Required Fields:**
178
+ - Domain
179
+ - Group (with Group External ID, Group ID, or Group Type)
180
+
181
+ **Optional Fields:**
182
+ - Start Date (can use relative format like "-24 hours")
183
+
184
+ **Example:**
185
+ ```json
186
+ {
187
+ "domain": 1,
188
+ "start_date": "-24 hours",
189
+ "group": {
190
+ "group_type": "course"
191
+ }
192
+ }
193
+ ```
194
+
195
+ #### Get Groups
196
+ Get list of groups/workspaces.
197
+
198
+ **Required Fields:**
199
+ - Domain
200
+
201
+ **Optional Filters:**
202
+ - Type (group, course, qualification, etc.)
203
+
204
+ ## Usage Examples
205
+
206
+ ### Example 1: Create a User
207
+
208
+ 1. Add the Blossom node to your workflow
209
+ 2. Select **Resource**: User
210
+ 3. Select **Operation**: Update
211
+ 4. Fill in:
212
+ - Domain: `1`
213
+ - External ID: `u123`
214
+ - Username: `john.doe`
215
+ - First Name: `John`
216
+ - Last Name: `Doe`
217
+ - Email: `john.doe@example.com`
218
+
219
+ ### Example 2: Attach User to Course
220
+
221
+ 1. Add the Blossom node
222
+ 2. Select **Resource**: Membership
223
+ 3. Select **Operation**: Attach User to Group
224
+ 4. Fill in:
225
+ - Domain: `1`
226
+ - User External ID: `u123`
227
+ - Group External ID: `course_456`
228
+
229
+ ### Example 3: Get User Completions
230
+
231
+ 1. Add the Blossom node
232
+ 2. Select **Resource**: Data
233
+ 3. Select **Operation**: Get User Completion
234
+ 4. Fill in:
235
+ - Domain: `1`
236
+ - Start Date: `2020-01-01`
237
+ - End Date: `2030-01-01`
238
+ - Types: Select `Courses` and `Qualifications`
239
+ - Filters: User External ID = `u123`
240
+
241
+ ## API Documentation
242
+
243
+ For complete API documentation, refer to:
244
+ - [Blossom API Documentation](https://docs.blossom-kc.com/api)
245
+ - Contact your Blossom administrator for instance-specific documentation
246
+
247
+ ## Rate Limits
248
+
249
+ - **API Requests**: 30 requests per second
250
+ - **CSV Methods**: 4 calls per 24 hours each
251
+ - **RunAutoEnrollmentRules**: 4 calls per 24 hours
252
+
253
+ ## Sync Workflow
254
+
255
+ When performing a complete sync, follow this order:
256
+
257
+ 1. Delete Users CSV
258
+ 2. Import Users CSV
259
+ 3. Import Groups CSV
260
+ 4. Import Groups Members CSV
261
+ 5. Run Auto Enrollment Rules (once at the end)
262
+
263
+ > **Note**: CSV import methods are not yet implemented in this node. Use the Update operations for individual records or contact the maintainers for CSV support.
264
+
265
+ ## External IDs
266
+
267
+ Blossom uses `external_id` as the primary identifier for synchronization with external systems. Always use `external_id` when possible for seamless integration.
268
+
269
+ ## Error Handling
270
+
271
+ The node handles API errors gracefully:
272
+ - **Success Response**: `{"res": "success", "results": []}`
273
+ - **Error Response**: `{"res": "error", "error_msg": "Description"}`
274
+
275
+ Errors are automatically converted to n8n error format with appropriate messages.
276
+
277
+ ## Development
278
+
279
+ ### Prerequisites
280
+
281
+ - Node.js 18.x or higher
282
+ - npm 9.x or higher
283
+
284
+ ### Setup
285
+
286
+ ```bash
287
+ # Clone the repository
288
+ git clone https://github.com/mer-group/n8n-nodes-blossom.git
289
+ cd n8n-nodes-blossom
290
+
291
+ # Install dependencies
292
+ npm install
293
+
294
+ # Build the project
295
+ npm run build
296
+
297
+ # Run in development mode
298
+ npm run dev
299
+ ```
300
+
301
+ ### Testing Locally
302
+
303
+ ```bash
304
+ # Start n8n with the node loaded
305
+ npm run dev
306
+ ```
307
+
308
+ This will:
309
+ - Build the node with watch mode
310
+ - Start n8n with your node available
311
+ - Automatically rebuild when you make changes
312
+ - Open n8n in your browser (usually http://localhost:5678)
313
+
314
+ ## Contributing
315
+
316
+ Contributions are welcome! Please feel free to submit a Pull Request.
317
+
318
+ ## License
319
+
320
+ [MIT](LICENSE.md)
321
+
322
+ ## Support
323
+
324
+ For issues and questions:
325
+ - [GitHub Issues](https://github.com/mer-group/n8n-nodes-blossom/issues)
326
+ - [n8n Community Forum](https://community.n8n.io/)
327
+
328
+ ## About Blossom
329
+
330
+ Blossom is a Learning Management System (LMS) and Learning Experience Platform (LXP) established in 2007, supporting:
331
+ - SCORM and xAPI learning objects
332
+ - SAML2 single sign-on (SSO)
333
+ - Multi-factor authentication (MFA)
334
+ - IP-restricted API access
335
+ - Integration with HR systems, MS Teams, Google Workspace
336
+
337
+ For more information, visit: [Blossom Platform](https://www.blossom-kc.com)
338
+
339
+ ---
340
+
341
+ **Maintained by the n8n community**