n8n-nodes-commercetools 0.1.35 → 1.0.1

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 (88) hide show
  1. package/README.md +230 -237
  2. package/dist/credentials/CommerceToolsOAuth2Api.credentials.js +4 -6
  3. package/dist/credentials/CommerceToolsOAuth2Api.credentials.js.map +1 -1
  4. package/dist/nodes/Commercetools/Commercetools.node.js +311 -75
  5. package/dist/nodes/Commercetools/Commercetools.node.js.map +1 -1
  6. package/dist/nodes/Commercetools/Commercetools.svg +1 -1
  7. package/dist/nodes/Commercetools/CommercetoolsTrigger.node.js +1 -1
  8. package/dist/nodes/Commercetools/CommercetoolsTrigger.node.js.map +1 -1
  9. package/dist/nodes/Commercetools/generated/ctp-event-registry.json +658 -0
  10. package/dist/nodes/Commercetools/generated/operations.json +13975 -0
  11. package/dist/nodes/Commercetools/generated/properties.d.ts +2 -0
  12. package/dist/nodes/Commercetools/generated/properties.js +6621 -0
  13. package/dist/nodes/Commercetools/generated/properties.js.map +1 -0
  14. package/dist/nodes/Commercetools/generated/subscription.properties.d.ts +11 -0
  15. package/dist/nodes/Commercetools/generated/subscription.properties.js +138 -0
  16. package/dist/nodes/Commercetools/generated/subscription.properties.js.map +1 -0
  17. package/dist/nodes/Commercetools/utils/subscription.utils.d.ts +1 -1
  18. package/dist/nodes/Commercetools/utils/subscription.utils.js +56 -60
  19. package/dist/nodes/Commercetools/utils/subscription.utils.js.map +1 -1
  20. package/dist/package.json +12 -11
  21. package/dist/scripts/parseCollection.d.ts +31 -0
  22. package/dist/scripts/parseCollection.js +221 -0
  23. package/dist/scripts/parseCollection.js.map +1 -0
  24. package/dist/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +12 -11
  26. package/dist/icons/Commercetools.svg +0 -44
  27. package/dist/nodes/Commercetools/Commercetools.node.json +0 -18
  28. package/dist/nodes/Commercetools/PostmanCollection/api/collection.json +0 -150075
  29. package/dist/nodes/Commercetools/descriptions/Commercetools.description.d.ts +0 -2
  30. package/dist/nodes/Commercetools/descriptions/Commercetools.description.js +0 -221
  31. package/dist/nodes/Commercetools/descriptions/Commercetools.description.js.map +0 -1
  32. package/dist/nodes/Commercetools/descriptions/customer.description.d.ts +0 -3
  33. package/dist/nodes/Commercetools/descriptions/customer.description.js +0 -1770
  34. package/dist/nodes/Commercetools/descriptions/customer.description.js.map +0 -1
  35. package/dist/nodes/Commercetools/operations/cart.operations.d.ts +0 -9
  36. package/dist/nodes/Commercetools/operations/cart.operations.js +0 -527
  37. package/dist/nodes/Commercetools/operations/cart.operations.js.map +0 -1
  38. package/dist/nodes/Commercetools/operations/category.operations.d.ts +0 -8
  39. package/dist/nodes/Commercetools/operations/category.operations.js +0 -223
  40. package/dist/nodes/Commercetools/operations/category.operations.js.map +0 -1
  41. package/dist/nodes/Commercetools/operations/customer.operations.d.ts +0 -9
  42. package/dist/nodes/Commercetools/operations/customer.operations.js +0 -955
  43. package/dist/nodes/Commercetools/operations/customer.operations.js.map +0 -1
  44. package/dist/nodes/Commercetools/operations/order.operations.d.ts +0 -9
  45. package/dist/nodes/Commercetools/operations/order.operations.js +0 -341
  46. package/dist/nodes/Commercetools/operations/order.operations.js.map +0 -1
  47. package/dist/nodes/Commercetools/operations/product.operations.d.ts +0 -9
  48. package/dist/nodes/Commercetools/operations/product.operations.js +0 -348
  49. package/dist/nodes/Commercetools/operations/product.operations.js.map +0 -1
  50. package/dist/nodes/Commercetools/properties/cart.properties.d.ts +0 -7
  51. package/dist/nodes/Commercetools/properties/cart.properties.js +0 -4569
  52. package/dist/nodes/Commercetools/properties/cart.properties.js.map +0 -1
  53. package/dist/nodes/Commercetools/properties/category.properties.d.ts +0 -5
  54. package/dist/nodes/Commercetools/properties/category.properties.js +0 -1417
  55. package/dist/nodes/Commercetools/properties/category.properties.js.map +0 -1
  56. package/dist/nodes/Commercetools/properties/order.properties.d.ts +0 -6
  57. package/dist/nodes/Commercetools/properties/order.properties.js +0 -1111
  58. package/dist/nodes/Commercetools/properties/order.properties.js.map +0 -1
  59. package/dist/nodes/Commercetools/properties/product.properties.d.ts +0 -5
  60. package/dist/nodes/Commercetools/properties/product.properties.js +0 -2956
  61. package/dist/nodes/Commercetools/properties/product.properties.js.map +0 -1
  62. package/dist/nodes/Commercetools/properties/subscription.properties.d.ts +0 -27
  63. package/dist/nodes/Commercetools/properties/subscription.properties.js +0 -622
  64. package/dist/nodes/Commercetools/properties/subscription.properties.js.map +0 -1
  65. package/dist/nodes/Commercetools/utils/actionBuilder.d.ts +0 -2
  66. package/dist/nodes/Commercetools/utils/actionBuilder.js +0 -176
  67. package/dist/nodes/Commercetools/utils/actionBuilder.js.map +0 -1
  68. package/dist/nodes/Commercetools/utils/cart.utils.d.ts +0 -10
  69. package/dist/nodes/Commercetools/utils/cart.utils.js +0 -1107
  70. package/dist/nodes/Commercetools/utils/cart.utils.js.map +0 -1
  71. package/dist/nodes/Commercetools/utils/category.utils.d.ts +0 -6
  72. package/dist/nodes/Commercetools/utils/category.utils.js +0 -104
  73. package/dist/nodes/Commercetools/utils/category.utils.js.map +0 -1
  74. package/dist/nodes/Commercetools/utils/common.utils.d.ts +0 -14
  75. package/dist/nodes/Commercetools/utils/common.utils.js +0 -246
  76. package/dist/nodes/Commercetools/utils/common.utils.js.map +0 -1
  77. package/dist/nodes/Commercetools/utils/customer.utils.d.ts +0 -10
  78. package/dist/nodes/Commercetools/utils/customer.utils.js +0 -653
  79. package/dist/nodes/Commercetools/utils/customer.utils.js.map +0 -1
  80. package/dist/nodes/Commercetools/utils/order.utils.d.ts +0 -6
  81. package/dist/nodes/Commercetools/utils/order.utils.js +0 -179
  82. package/dist/nodes/Commercetools/utils/order.utils.js.map +0 -1
  83. package/dist/nodes/Commercetools/utils/product.utils.d.ts +0 -15
  84. package/dist/nodes/Commercetools/utils/product.utils.js +0 -456
  85. package/dist/nodes/Commercetools/utils/product.utils.js.map +0 -1
  86. package/icons/Commercetools.svg +0 -44
  87. package/icons/github.dark.svg +0 -3
  88. package/icons/github.svg +0 -3
package/README.md CHANGED
@@ -1,58 +1,40 @@
1
- ![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
1
+ ![Banner](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)
2
2
 
3
3
  # n8n-nodes-commercetools
4
4
 
5
- A custom n8n community node for integrating with Commercetools. Provides full support for products, categories, customers, orders, carts, and webhook triggers with optional AWS or GCP buffering for reliable event delivery.
5
+ A custom n8n community node for integrating with commercetools. Provides full API coverage for Products, Customers, Carts, and Orders plus a webhook trigger node with optional AWS SQS + Lambda or GCP Pub/Sub + Cloud Functions buffering for reliable event delivery.
6
+
7
+ Operations are **auto-generated** from the official commercetools Postman collection and kept in sync automatically via a daily GitHub Actions workflow.
6
8
 
7
- Designed for production-grade automation, large catalogs, and event-driven workflows.
8
9
  ---
9
10
 
10
11
  ## Table of Contents
11
12
 
12
13
  - [Highlights](#highlights)
13
- - [Features](#features)
14
14
  - [Quick Start](#quick-start)
15
- - [Webhook Triggers](#webhook-triggers)
16
- - [AWS SQS + Lambda Integration (optional)](#aws-sqs--lambda-integration-optional)
17
- - [GCP Pub/Sub + Cloud Functions Integration (optional)](#gcp-pubsub--cloud-functions-integration-optional)
18
- - [Supported Operations](#supported-operations)
19
- - [Examples](#examples)
15
+ - [Nodes](#nodes)
16
+ - [commercetools (Action Node)](#commercetools-action-node)
17
+ - [commercetools Trigger](#commercetools-trigger)
20
18
  - [Credentials](#credentials)
21
19
  - [Development & Scripts](#development--scripts)
20
+ - [Auto-Update Pipeline](#auto-update-pipeline)
22
21
  - [Error Handling & Troubleshooting](#error-handling--troubleshooting)
23
- - [Contributing](#contributing)
24
22
  - [Changelog](#changelog)
25
23
  - [License](#license)
26
- ---
27
-
28
- ## Highlights
29
-
30
- - Full API coverage for Products, Categories, Customers, Carts, and Orders
31
- - Native Commercetools webhook subscriptions
32
- - Optional AWS SQS + Lambda buffering
33
- - Optional GCP Pub/Sub + Cloud Functions buffering
34
- - Automatic infrastructure provisioning & cleanup
35
- - Product & Customer updateAction UI builders
36
- - Production-ready architecture for high-volume event workflows
37
24
 
38
25
  ---
39
26
 
40
- ## Features
41
-
42
- ### Core Integration
43
-
44
- - Complete CRUD operations
45
- - Query and search support
46
- - HEAD existence checks
47
- - OAuth2 authentication
48
- - JSON-based update actions
49
-
50
- ### Webhook Trigger
27
+ ## Highlights
51
28
 
52
- - Native Commercetools subscriptions
53
- - Event buffering via:
54
- - AWS SQS + Lambda
55
- - GCP Pub/Sub + Cloud Functions
29
+ - Full CRUD coverage for Products, Customers, Carts, and Orders
30
+ - Auto-generated operations from the official Postman collection — always in sync
31
+ - Product image upload: downloads from a URL, posts raw binary to commercetools
32
+ - Product and Order search with structured query, sort, limit, and offset fields
33
+ - Update action UI builder — per-action typed field editors, no raw JSON required
34
+ - Native commercetools webhook subscriptions
35
+ - Optional AWS SQS + Lambda event buffering — fully auto-provisioned
36
+ - Optional GCP Pub/Sub + Cloud Functions event buffering — fully auto-provisioned
37
+ - All cloud infrastructure is automatically torn down on workflow deactivation
56
38
 
57
39
  ---
58
40
 
@@ -62,300 +44,311 @@ Designed for production-grade automation, large catalogs, and event-driven workf
62
44
  npm install
63
45
  npm run dev
64
46
  ```
65
- ---
66
-
67
- ## Webhook Triggers
68
-
69
- Use the **Commercetools Trigger** node to receive real-time events.
70
-
71
- 1. Add the node
72
- 2. Select event types
73
- 3. Provide Commercetools credentials
74
- 4. (Optional) Add AWS or GCP credentials
75
- 5. Activate workflow
76
-
77
- The node automatically registers a Commercetools subscription.
78
47
 
79
48
  ---
80
49
 
81
- ## Supported Event Types
82
-
83
- ### Product Events
50
+ ## Nodes
84
51
 
85
- * created, published, unpublished, deleted
86
- * variant added/deleted
87
- * price added/changed/removed
88
- * image added
89
- * added/removed from category
90
- * state transition
91
- * slug & custom field updates
52
+ ### commercetools (Action Node)
92
53
 
93
- ### Customer Events
54
+ Select a **Resource** and **Operation** to interact with the commercetools API. All operations and their input fields are generated at build time from the official Postman collection.
94
55
 
95
- * created, deleted
96
- * email verified/changed
97
- * password updated
98
- * address updates
99
- * custom fields and types
56
+ #### Resources
100
57
 
101
- ### Category Events
58
+ | Resource | Available Operations |
59
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
60
+ | **Product** | Create, Get by ID, Get by Key, Query, Update, Delete, Upload Image, Search, Query Product Selections by ID, Query Product Selections by Key, HEAD checks |
61
+ | **Customer** | Create, Authenticate (global & in-store), Get by ID / Key / Email / Password Token, Query, Update, Delete, Password reset, Email verification, HEAD checks |
62
+ | **Cart** | Create (regular & in-store), Get by ID / Customer ID, Query, Update, Delete, Replicate, Merge, HEAD checks |
63
+ | **Order** | Create from Cart, Create from Quote, Import, Get by ID / Key / Order Number, Query, Search, Update, Delete, HEAD checks |
102
64
 
103
- * created
104
- * slug changed
65
+ #### How field generation works
105
66
 
106
- ### Order Events
67
+ Each operation type generates a different set of UI fields:
107
68
 
108
- * created, deleted, imported
109
- * state transitions
110
- * customer updates
111
- * shipping & billing updates
112
- * line item changes
113
- * payments and deliveries
114
- * discount code updates
115
- * custom fields
69
+ | Operation type | Generated fields |
70
+ | ------------------------ | ---------------------------------------------------------------------- |
71
+ | **Create** | Individual typed fields from the Postman request body |
72
+ | **Update** | Version + Actions (JSON) override + Actions (UI) builder |
73
+ | **Get / Query / HEAD** | Resource ID or Key + optional Filters collection |
74
+ | **Delete** | Resource ID + Version |
75
+ | **Search** | `query.and` (JSON), `sort` (JSON), `limit` (number), `offset` (number) |
76
+ | **Upload Product image** | Image URL + `filename`, `variant`, `sku`, `staged` query params |
77
+ | **Misc POST** | Individual typed fields from the Postman request body |
116
78
 
117
- ### Cart Events
79
+ #### Update actions
118
80
 
119
- * cart created (change notification)
81
+ The update action builder exposes every action type as a labelled group with its own typed fields. For example, adding a `setName` action shows a localised JSON field for `name`; adding `addVariant` shows typed fields for `sku`, `prices`, and so on.
120
82
 
121
- ---
83
+ Alternatively, paste a raw JSON array directly into **Actions (JSON)** to bypass the UI builder. When **Actions (JSON)** is non-empty it takes precedence.
122
84
 
123
- ## AWS SQS + Lambda Integration (optional)
85
+ #### Search operations (Products & Orders)
124
86
 
125
- Automatically provisions:
87
+ The commercetools Search API accepts a `SearchRequest` body. The node exposes these fields:
126
88
 
127
- * SQS queue
128
- * Lambda function
129
- * IAM role & policies
130
- * Event source mapping
131
- * CloudWatch logging
89
+ | Field | Type | Notes |
90
+ | ----------- | ---------- | -------------------------------------------------------- |
91
+ | Query And | JSON array | Filter predicates. Leave empty to return all results. |
92
+ | Sort | JSON array | Sort descriptors. |
93
+ | Limit | number | Max results per page. |
94
+ | Offset | number | Pagination offset. `0` is sent explicitly (not skipped). |
132
95
 
133
- Lambda forwards events to the n8n webhook.
96
+ > **Note:** Sending `query: { and: [] }` is rejected by commercetools with "exhausted input". Leaving Query › And empty omits the field entirely, which returns all results.
134
97
 
135
- Resources are automatically deleted when the trigger is removed or reconfigured.
98
+ #### Upload Product image
136
99
 
137
- ### Requirements
100
+ commercetools requires raw binary image bytes in the request body with `Content-Type: image/jpeg`, `image/png`, or `image/gif`. It does **not** accept a JSON body — sending one returns `"Unsupported Content-Type: application/json"`.
138
101
 
139
- * Publicly reachable n8n webhook
140
- * AWS credentials with permissions for:
102
+ The node handles this transparently:
141
103
 
142
- * SQS
143
- * Lambda
144
- * IAM
145
- * CloudWatch Logs
104
+ 1. Downloads the image from the URL you provide using `helpers.request()`
105
+ 2. Derives the `Content-Type` from the file extension (`.jpg`/`.jpeg` → `image/jpeg`, `.png` → `image/png`, `.gif` → `image/gif`, unknown → `image/jpeg`)
106
+ 3. POSTs the raw buffer to commercetools with the correct `Content-Type`
146
107
 
147
- AWS costs may apply.
108
+ | Field | Type | Notes |
109
+ | ---------- | ------- | --------------------------------------------------------- |
110
+ | Product ID | string | Required |
111
+ | Image URL | string | Required — direct link to a JPEG, PNG, or GIF (max 10 MB) |
112
+ | Filename | string | Optional filename stored with the image |
113
+ | Variant ID | number | `0` = Master Variant (default) |
114
+ | SKU | string | Alternative to Variant ID |
115
+ | Staged | boolean | `true` = staged data (default), `false` = current |
148
116
 
149
117
  ---
150
118
 
151
- ## GCP Pub/Sub + Cloud Functions Integration (optional)
119
+ ### commercetools Trigger
152
120
 
153
- Automatically provisions:
121
+ Listens for real-time commercetools events via webhook subscription. On activation, the node registers a commercetools subscription pointing to the n8n webhook URL. On deactivation, the subscription and any provisioned cloud infrastructure are automatically deleted.
154
122
 
155
- * Pub/Sub topic
156
- * Cloud Storage bucket
157
- * Cloud Function (Gen2)
158
- * Event trigger (Pub/Sub → Function)
123
+ #### Setup
159
124
 
160
- ### Flow
125
+ 1. Add the **commercetools Trigger** node to your workflow
126
+ 2. Select one or more event types from the **Events** dropdown
127
+ 3. Configure commercetools credentials (and optionally AWS or GCP sub-fields)
128
+ 4. Activate the workflow
161
129
 
162
- 1. Commercetools publishes event → Pub/Sub
163
- 2. Pub/Sub triggers Cloud Function
164
- 3. Cloud Function forwards event → n8n webhook
165
- 4. n8n workflow processes event
130
+ #### Supported event types
166
131
 
167
- ### Features
132
+ **Product** — created, published, unpublished, deleted, variant added/deleted, price added/changed/removed, image added, added/removed from category, state transition, slug and custom field updates
168
133
 
169
- * Dynamic Cloud Function deployment via code
170
- * Automatic API enablement
171
- * OAuth-based authentication
172
- * Automatic cleanup on trigger removal
173
- * Retry-enabled event delivery
134
+ **Customer** created, deleted, email verified/changed, password updated, address updates, custom fields and types
174
135
 
175
- ### Requirements
136
+ **Category** — created, slug changed
176
137
 
177
- * Billing-enabled GCP project
178
- * Publicly reachable n8n webhook
179
- * Service account with permissions:
138
+ **Order** created, deleted, imported, state transitions, customer updates, shipping and billing updates, line item changes, payments and deliveries, discount code updates, custom fields
180
139
 
181
- * Pub/Sub Admin
182
- * Cloud Functions Admin
183
- * Storage Admin
184
- * IAM Policy Editor
185
- * Service Usage Admin
140
+ **Cart** cart created (change notification)
186
141
 
187
- ### Recommended Credential Setup
142
+ #### Subscription routing
188
143
 
189
- Paste the **entire downloaded service account JSON** into a single credential field:
144
+ Events are routed to the correct commercetools subscription arrays automatically using the generated event registry (produced by `generateCtpRegistry.ts` from the `@commercetools/platform-sdk` type declarations):
190
145
 
191
- ```
192
- serviceAccountJson
193
- ```
146
+ - `message` events → `messages[]` grouped by `resourceTypeId` with `types[]`
147
+ - `change` events → `changes[]` grouped by `resourceTypeId`
194
148
 
195
- This avoids private key formatting issues caused by encrypted credential fields.
149
+ Empty arrays are never sent commercetools rejects subscriptions that contain them.
196
150
 
197
- GCP costs may apply.
151
+ #### Config change detection
198
152
 
199
- ---
200
-
201
- ## Supported Operations
153
+ A hash of `{ events, hasAWS, hasGCP }` is stored in workflow static data. When `checkExists` runs and detects a hash mismatch (events changed, credentials changed), it automatically tears down the old subscription and infrastructure before `create` rebuilds everything.
202
154
 
203
- ### Products
155
+ #### AWS SQS + Lambda (optional)
204
156
 
205
- * Create Product
206
- * Query/Search Products
207
- * Get Product (ID or Key)
208
- * Update Product
209
- * Delete Product
210
- * Upload Image
211
- * Product Selections
212
- * HEAD checks
157
+ When `awsAccessKeyId` and `awsSecretAccessKey` are present in the credential, the node automatically provisions:
213
158
 
214
- ### Categories
159
+ - SQS queue (14-day retention, long polling)
160
+ - Lambda function (Node.js) with `WEBHOOK_URL` env var
161
+ - IAM role with SQS receive/delete and CloudWatch Logs policies
162
+ - Event source mapping (SQS → Lambda, batch size 10)
215
163
 
216
- * Create / Query / Update / Delete
217
- * Get by ID or Key
218
- * HEAD checks
164
+ The Lambda forwards each SQS message to the n8n webhook URL as a POST request. All resources are deleted when the trigger is deactivated or its configuration changes.
219
165
 
220
- ### Customers
166
+ **Requirements:**
221
167
 
222
- * Authenticate (global & store)
223
- * Create / Update / Delete
224
- * Password reset & verification
225
- * Address management
226
- * Custom fields
168
+ - Publicly reachable n8n webhook URL
169
+ - AWS credentials with permissions for: SQS, Lambda, IAM, CloudWatch Logs
227
170
 
228
- ### Carts
171
+ > ⚠️ AWS costs may apply.
229
172
 
230
- * Create (regular & in-store)
231
- * Query / Get / Update / Delete
232
- * Replicate & Merge
233
- * Existence checks
234
- * JSON update actions
173
+ #### GCP Pub/Sub + Cloud Functions (optional)
235
174
 
236
- ### Orders
175
+ When `serviceAccountJson` is present in the credential, the node automatically provisions:
237
176
 
238
- * Create from Cart or Quote
239
- * Import Orders
240
- * Query Orders
241
- * Update/Delete Orders
242
- * Existence checks
177
+ - Pub/Sub topic with `roles/pubsub.publisher` granted to the commercetools service account
178
+ - Cloud Storage bucket for function source
179
+ - Cloud Function Gen2 (Node.js 20, Eventarc trigger, `RETRY_POLICY_RETRY`)
180
+ - All required GCP APIs are enabled automatically (`cloudfunctions`, `cloudbuild`, `artifactregistry`, `run`, `eventarc`)
243
181
 
244
- ---
182
+ **Event flow:**
245
183
 
246
- ## Examples
247
-
248
- ### Create Product
249
-
250
- ```json
251
- {
252
- "name": { "en": "Sample Product" },
253
- "slug": { "en": "sample-product" },
254
- "productType": { "id": "product-type-id" },
255
- "masterVariant": {
256
- "sku": "SKU123",
257
- "prices": [
258
- { "value": { "currencyCode": "USD", "centAmount": 1000 } }
259
- ]
260
- }
261
- }
262
184
  ```
263
-
264
- ### Create Cart
265
-
266
- ```json
267
- {
268
- "currency": "USD",
269
- "customerId": "customer-ID",
270
- "lineItems": [
271
- {
272
- "productId": "product-ID",
273
- "variant": { "id": 1 },
274
- "quantity": 2
275
- }
276
- ]
277
- }
185
+ commercetools → Pub/Sub topic → Cloud Function (Gen2) → n8n webhook
278
186
  ```
279
187
 
280
- ---
188
+ All resources are deleted when the trigger is deactivated or reconfigured.
281
189
 
282
- ## Credentials
190
+ **Requirements:**
283
191
 
284
- ### Commercetools OAuth2 (Required)
192
+ - Billing-enabled GCP project
193
+ - Publicly reachable n8n webhook URL
194
+ - Service account with: Pub/Sub Admin, Cloud Functions Admin, Storage Admin, IAM Policy Editor, Service Usage Admin
285
195
 
286
- | Field | Required |
287
- | ------------- | -------- |
288
- | Client ID | Yes |
289
- | Client Secret | Yes |
290
- | Project Key | Yes |
291
- | Region | Yes |
292
- | Scopes | Yes |
196
+ > ⚠️ GCP costs may apply.
293
197
 
294
198
  ---
295
199
 
296
- ### Event Provider (Optional)
200
+ ## Credentials
297
201
 
298
- | Field | Description |
299
- | -------------- | ----------- |
300
- | Event Provider | AWS or GCP |
202
+ ### commercetools OAuth2 (required for both nodes)
301
203
 
302
- ---
204
+ | Field | Notes |
205
+ | ------------------ | -------------------------------------------------------------------- |
206
+ | Project Key | From commercetools Merchant Center |
207
+ | Region | `australia-southeast1.gcp`, `europe-west1.gcp`, or `us-central1.gcp` |
208
+ | Client ID / Secret | OAuth2 client credentials from Merchant Center |
209
+ | Scopes | e.g. `manage_project:{projectKey}` |
210
+ | Event Provider | `None`, `AWS EventBridge`, or `Google Cloud Pub/Sub` |
303
211
 
304
- ### AWS (Optional)
212
+ The OAuth2 token URL is built automatically from the selected region — no manual URL entry needed.
305
213
 
306
- | Field | Description |
307
- | -------------- | ------------------ |
308
- | AWS Access Key | Enables SQS/Lambda |
309
- | AWS Secret Key | Enables SQS/Lambda |
310
- | AWS Region | Resource region |
214
+ Selecting an **Event Provider** reveals the relevant sub-fields:
311
215
 
312
- ---
216
+ ### AWS sub-fields
217
+
218
+ | Field | Notes |
219
+ | --------------------- | -------------------------- |
220
+ | AWS Client Access Key | IAM user access key ID |
221
+ | AWS Client Secret | IAM user secret access key |
222
+ | AWS Region | e.g. `us-east-1` |
223
+
224
+ ### GCP sub-fields
313
225
 
314
- ### GCP (Optional)
226
+ | Field | Notes |
227
+ | -------------------- | -------------------------------------------------------------------------------------- |
228
+ | Service Account JSON | Paste the **entire** downloaded `.json` key file as-is |
229
+ | GCP Region | Deployment region for Pub/Sub and Cloud Functions (full list of GCP regions available) |
315
230
 
316
- | Field | Description |
317
- | ------------------ | ------------------------------------- |
318
- | GCP Client Email | Email from service account JSON |
319
- | GCP Private Key | private Key from service account JSON |
320
- | GCP Region | Deployment region |
321
- | GCP Project ID | Target project |
231
+ > **Important:** Use the **Service Account JSON** field — paste the complete downloaded key file. Do not split it into separate `clientEmail` / `privateKey` fields. n8n's encrypted credential storage mangles PEM line breaks in individual fields; the JSON field is treated as opaque text and preserves the key exactly.
322
232
 
323
233
  ---
324
234
 
325
235
  ## Development & Scripts
326
236
 
327
237
  ```bash
238
+ # Install dependencies
239
+ npm install
240
+
241
+ # Start n8n in dev mode with this node loaded
328
242
  npm run dev
243
+
244
+ # Regenerate operations from the latest Postman collection + rebuild event registry
245
+ npm run generate
246
+
247
+ # Build
329
248
  npm run build
249
+
250
+ # Build and watch
330
251
  npm run build:watch
252
+
253
+ # Lint
331
254
  npm run lint
332
255
  npm run lint:fix
333
256
  ```
334
257
 
258
+ ### Code generation pipeline
259
+
260
+ ```
261
+ scripts/generate.ts (entry point: npm run generate)
262
+
263
+ ├── parseCollection.ts
264
+ │ Downloads Postman collection.json → ParsedOperation[]
265
+ │ Detects per operation:
266
+ │ isSearch POST .../search
267
+ │ isImageUpload POST .../images
268
+ │ requiresId URL contains {{...ID...}}
269
+ │ requiresKey URL contains key={{...}}
270
+ │ keyPlaceholder exact variable name from URL (e.g. product-key)
271
+ │ queryParams all query params including disabled ones
272
+ │ bodyFields extracted from Postman body.raw JSON
273
+ │ actionBodyFields fields from inside actions[0]
274
+
275
+ ├── generateProperties.ts
276
+ │ ParsedOperation[] → INodeProperties[]
277
+ │ Emits in order:
278
+ │ 1. Resource dropdown
279
+ │ 2. Operation dropdowns (one per resource folder)
280
+ │ 3. Resource ID / Key / custom path param fields
281
+ │ 4. Version field (Update + Delete ops)
282
+ │ 5. Actions (JSON) field
283
+ │ 6. Actions (UI) fixedCollection (one option group per action type)
284
+ │ 7. Create body fields
285
+ │ 8. Misc POST body fields (excludes isSearch + isImageUpload)
286
+ │ 9. Search body fields (query.and, sort, limit, offset)
287
+ │ 10. Image upload fields (imageUrl + variant/sku/staged/filename
288
+ │ sourced from op.queryParams)
289
+ │ 11. Query param Filters collection (GET / HEAD ops only)
290
+
291
+ ├── → nodes/Commercetools/generated/properties.ts
292
+ ├── → nodes/Commercetools/generated/operations.json
293
+
294
+ ├── generateCtpRegistry.ts
295
+ │ Parses @commercetools/platform-sdk .d.ts via TypeScript compiler API
296
+ │ Extracts: *MessagePayload type literals,
297
+ │ MessageSubscriptionResourceTypeId values,
298
+ │ ChangeSubscriptionResourceTypeId values
299
+ │ Filters to allowedResources: [product, customer, cart, order]
300
+ │ → nodes/Commercetools/generated/ctp-event-registry.json
301
+
302
+ └── generateSubscriptionProperties.ts
303
+ Reads ctp-event-registry.json
304
+ → nodes/Commercetools/generated/subscription.properties.ts
305
+ exports subscriptionEvents[] (name, value, resourceTypeId,
306
+ subscriptionType, description)
307
+ exports triggerProperties[] (the Events multiOptions field)
308
+ ```
309
+
310
+ Generated files are committed to the repository. The built node works without running `generate` unless the Postman collection or SDK has changed.
311
+
335
312
  ---
336
313
 
337
- ## Error Handling & Troubleshooting
314
+ ## Auto-Update Pipeline
315
+
316
+ `.github/workflows/auto-update.yml` runs on three triggers:
317
+
318
+ - **Daily at 06:00 UTC** — checks if the Postman collection has changed
319
+ - **Push to `main`** — always regenerates and rebuilds
320
+ - **Manual dispatch** — via GitHub Actions UI
338
321
 
339
- * Authentication errorsverify OAuth2 credentials and scopes
340
- * Webhook unreachable → ensure public endpoint
341
- * Version conflicts fetch latest version before update
342
- * Node not visible → run `npm install` then `npm run dev`
322
+ Steps: download latest collection diff against committed version → if changed (or push/manual): `npm run generate` → `npm run build` → commit updated `collection.json`, generated files, and `dist/`.
323
+
324
+ New API endpoints and fields appear in the node automatically without manual development.
343
325
 
344
326
  ---
345
327
 
346
- ## Contributing
328
+ ## Error Handling & Troubleshooting
347
329
 
348
- Contributions are welcome. Open an issue or pull request.
330
+ | Problem | Solution |
331
+ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
332
+ | Authentication errors | Verify Client ID, Secret, and Scopes in Merchant Center; check that the token URL region matches your project |
333
+ | `version conflict` on update | Fetch the resource first to get the current version number |
334
+ | Unknown operation error at runtime | Run `npm run generate && npm run build` to sync `operations.json` |
335
+ | Webhook not receiving events | Ensure n8n has a public URL; verify the subscription exists in Merchant Center → Subscriptions |
336
+ | Image upload: `Unsupported Content-Type: application/json` | Ensure Image URL is a direct link to a JPEG, PNG, or GIF file, not an HTML page |
337
+ | Search: `exhausted input` | Leave **Query › And** empty — sending `{ and: [] }` is rejected by commercetools |
338
+ | GCP: private key / PEM errors | Use the **Service Account JSON** field; paste the entire `.json` key file, not individual fields |
339
+ | GCP: deploy timeout on first activation | GCP API enablement takes time on cold projects — retry after a minute |
340
+ | Node not visible in n8n | Run `npm install` then `npm run dev` |
349
341
 
350
342
  ---
351
343
 
352
344
  ## Changelog
353
345
 
354
- Recent Highlights:
355
- * v0.1.33 Adding GCP event source
356
- * v0.1.32 Cart update actions & lint styling
357
- * v0.1.31 Standardized capitalization
358
- * v0.1.30 All Commercetools regions included
346
+ | Version | Changes |
347
+ | ------- | -------------------------------------------------------------------------- |
348
+ | v0.1.35 | Improve GCP authentication by using JWT client for access token management |
349
+ | v0.1.34 | Fix: GCP Credential service handling |
350
+ | v0.1.33 | GCP Pub/Sub + Cloud Functions event source |
351
+ | v0.1.32 | Cart update actions and lint fixes |
359
352
 
360
353
  ---
361
354
 
@@ -6,7 +6,7 @@ class CommerceToolsOAuth2Api {
6
6
  this.name = 'commerceToolsOAuth2Api';
7
7
  this.extends = ['oAuth2Api'];
8
8
  this.displayName = 'commercetools OAuth2 API';
9
- this.icon = 'file:../icons/Commercetools.svg';
9
+ this.icon = 'file:../nodes/Commercetools/Commercetools.svg';
10
10
  this.documentationUrl = 'https://docs.commercetools.com/api/authorization';
11
11
  this.properties = [
12
12
  {
@@ -15,7 +15,7 @@ class CommerceToolsOAuth2Api {
15
15
  type: 'string',
16
16
  default: '',
17
17
  placeholder: 'your-project-key',
18
- description: 'The project key from commercetools',
18
+ description: 'The project key from commercetools Merchant Center',
19
19
  required: true,
20
20
  },
21
21
  {
@@ -37,7 +37,7 @@ class CommerceToolsOAuth2Api {
37
37
  },
38
38
  ],
39
39
  default: 'australia-southeast1.gcp',
40
- description: 'Region-specific auth host; determines the OAuth token endpoint used for client credentials grants',
40
+ description: 'The commercetools region. Determines both the OAuth token endpoint and the API base URL.',
41
41
  },
42
42
  {
43
43
  displayName: 'Event Provider',
@@ -77,9 +77,7 @@ class CommerceToolsOAuth2Api {
77
77
  displayName: 'AWS Client Secret',
78
78
  name: 'awsSecretAccessKey',
79
79
  type: 'string',
80
- typeOptions: {
81
- password: true,
82
- },
80
+ typeOptions: { password: true },
83
81
  default: '',
84
82
  placeholder: 'your-aws-client-secret',
85
83
  description: 'AWS Secret Access Key for EventBridge authentication',
@@ -1 +1 @@
1
- {"version":3,"file":"CommerceToolsOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/CommerceToolsOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IAAnC;QACC,SAAI,GAAG,wBAAwB,CAAC;QAEhC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAGxB,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS,iCAAiC,CAAC;QAE/C,qBAAgB,GAAG,kDAAkD,CAAC;QAEtE,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,kBAAkB;gBAC/B,WAAW,EAAE,oCAAoC;gBACjD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,yBAAyB;wBAC/B,KAAK,EAAE,0BAA0B;qBACjC;oBACD;wBACC,IAAI,EAAE,eAAe;wBACrB,KAAK,EAAE,kBAAkB;qBACzB;oBACD;wBACC,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AE,KAAK,EAAE,UAAU,EAAE;iBACvC;gBACD,OAAO,EAAE,cAAc;gBACvB,WAAW,EAAE,sCAAsC;gBACnD,cAAc,EAAE;oBACf,IAAI,EAAE;wBACL,aAAa,EAAE,CAAC,KAAK,CAAC;qBACtB;iBACD;aACD;YACD;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC5B;YACD;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,4DAA4D;aACrE;YACD;gBACC,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wEAAwE;gBACjF,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,+BAA+B;aACxC;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;aACjB;SACD,CAAC;IACH,CAAC;CAAA;AA3MD,wDA2MC"}
1
+ {"version":3,"file":"CommerceToolsOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/CommerceToolsOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAYA,MAAa,sBAAsB;IAAnC;QACC,SAAI,GAAG,wBAAwB,CAAC;QAEhC,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAGxB,gBAAW,GAAG,0BAA0B,CAAC;QAEzC,SAAI,GAAS,+CAA+C,CAAC;QAE7D,qBAAgB,GAAG,kDAAkD,CAAC;QAEtE,eAAU,GAAsB;YAE/B;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,YAAY;gBACl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