n8n-nodes-skodecrm 0.1.5 → 0.1.10

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,6 +1,6 @@
1
1
  # n8n-nodes-skodecrm
2
2
 
3
- An [n8n](https://n8n.io) community node for **[Skode CRM](https://skode.ai)**. Create, update
3
+ An [n8n](https://n8n.io) community node for **[SkedX CRM](https://skedx.io)**. Create, update
4
4
  and search leads, and trigger workflows on lead events.
5
5
 
6
6
  [Installation](#installation) · [Credentials](#credentials) · [Operations](#operations) ·
@@ -13,7 +13,7 @@ guide. In n8n: **Settings → Community Nodes → Install**, enter `n8n-nodes-sk
13
13
 
14
14
  ## Credentials
15
15
 
16
- This node authenticates with **OAuth2** against your Skode CRM — the same OAuth server the Skode
16
+ This node authenticates with **OAuth2** against your SkedX CRM — the same OAuth server the SkedX
17
17
  Zapier integration uses.
18
18
 
19
19
  **CRM admin, one-time:** register an OAuth application for n8n in the CRM and note the **client ID**
@@ -22,7 +22,7 @@ and **client secret**. Add n8n's redirect URL to the app's allowed redirect URIs
22
22
  - n8n Cloud: `https://oauth.n8n.cloud/oauth2/callback`
23
23
  - self-hosted: `https://<your-n8n-host>/rest/oauth2-credential/callback`
24
24
 
25
- **In n8n**, create a *Skode CRM OAuth2 API* credential:
25
+ **In n8n**, create a *SkedX CRM OAuth2 API* credential:
26
26
 
27
27
  | Field | Value |
28
28
  | --- | --- |
@@ -52,7 +52,7 @@ Field keys match your org's schema. Use the CRM's *fields* endpoint
52
52
 
53
53
  ## Trigger
54
54
 
55
- **Skode CRM Trigger** fires on a lead event (created / updated / status changed). It registers
55
+ **SkedX CRM Trigger** fires on a lead event (created / updated / status changed). It registers
56
56
  n8n's webhook URL with the CRM (`POST /api/partner/v1/hooks/`) when the workflow activates and
57
57
  removes it on deactivate — no polling.
58
58
 
@@ -1,7 +1,7 @@
1
1
  import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2
2
  /**
3
- * OAuth2 (authorization-code) against Skode CRM — the SAME OAuth server the
4
- * Skode Zapier integration uses (django-oauth-toolkit):
3
+ * OAuth2 (authorization-code) against SkedX CRM — the SAME OAuth server the
4
+ * SkedX Zapier integration uses (django-oauth-toolkit):
5
5
  * authorize: <baseUrl>/oauth/authorize/
6
6
  * token: <baseUrl>/oauth/token/
7
7
  *
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SkodeCrmOAuth2Api = void 0;
4
4
  /**
5
- * OAuth2 (authorization-code) against Skode CRM — the SAME OAuth server the
6
- * Skode Zapier integration uses (django-oauth-toolkit):
5
+ * OAuth2 (authorization-code) against SkedX CRM — the SAME OAuth server the
6
+ * SkedX Zapier integration uses (django-oauth-toolkit):
7
7
  * authorize: <baseUrl>/oauth/authorize/
8
8
  * token: <baseUrl>/oauth/token/
9
9
  *
@@ -19,8 +19,8 @@ class SkodeCrmOAuth2Api {
19
19
  this.extends = ['oAuth2Api'];
20
20
  // Themed variants so the mark reads correctly on light and dark canvases.
21
21
  this.icon = { light: 'file:../nodes/SkodeCrm/skodecrm.light.svg', dark: 'file:../nodes/SkodeCrm/skodecrm.dark.svg' };
22
- this.displayName = 'Skode CRM OAuth2 API';
23
- this.documentationUrl = 'https://skode.ai';
22
+ this.displayName = 'SkedX CRM OAuth2 API';
23
+ this.documentationUrl = 'https://skedx.io';
24
24
  this.properties = [
25
25
  {
26
26
  displayName: 'CRM Base URL',
@@ -28,7 +28,7 @@ class SkodeCrmOAuth2Api {
28
28
  type: 'string',
29
29
  default: 'https://crmserver.skode.ai',
30
30
  required: true,
31
- description: 'Your Skode CRM origin, no trailing slash. Both the API (/api) and OAuth (/oauth) live here.',
31
+ description: 'Your SkedX CRM origin, no trailing slash. Both the API (/api) and OAuth (/oauth) live here.',
32
32
  },
33
33
  {
34
34
  displayName: 'Grant Type',
@@ -1,20 +1,9 @@
1
- import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- /**
3
- * Skode CRM — declarative node.
4
- *
5
- * Talks to the CRM's PARTNER integration surface — deliberately NOT the Zapier
6
- * one, which is owner-locked, shares Zapier's throttle bucket, and stamps every
7
- * webhook it creates as 'zapier':
8
- * POST /api/partner/v1/leads/
9
- * PATCH /api/partner/v1/leads/<id>/
10
- * GET /api/partner/v1/leads/
11
- * GET /api/partner/v1/leads/search/
12
- * GET /api/partner/v1/leads/fields/
13
- * Connection test hits GET /api/partner/v1/me/.
14
- *
15
- * Declarative style = no runtime dependencies (a verification requirement):
16
- * all HTTP is expressed through `routing` and n8n's built-in request helper.
17
- */
1
+ import type { INodeType, INodeTypeDescription, ILoadOptionsFunctions, ResourceMapperFields } from 'n8n-workflow';
18
2
  export declare class SkodeCrm implements INodeType {
19
3
  description: INodeTypeDescription;
4
+ methods: {
5
+ resourceMapping: {
6
+ getLeadFields(this: ILoadOptionsFunctions): Promise<ResourceMapperFields>;
7
+ };
8
+ };
20
9
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SkodeCrm = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
5
  /**
6
- * Skode CRM — declarative node.
6
+ * SkedX CRM — declarative node.
7
7
  *
8
8
  * Talks to the CRM's PARTNER integration surface — deliberately NOT the Zapier
9
9
  * one, which is owner-locked, shares Zapier's throttle bucket, and stamps every
@@ -15,13 +15,44 @@ const n8n_workflow_1 = require("n8n-workflow");
15
15
  * GET /api/partner/v1/leads/fields/
16
16
  * Connection test hits GET /api/partner/v1/me/.
17
17
  *
18
- * Declarative style = no runtime dependencies (a verification requirement):
19
- * all HTTP is expressed through `routing` and n8n's built-in request helper.
18
+ * Fields are NOT hardcoded. Create/Update use an n8n resource mapper that loads
19
+ * the connected organization's real lead schema from /leads/fields/ — so each
20
+ * org sees its own Field Editor fields (labels, required flags, select options,
21
+ * custom fields), exactly as configured in the CRM. See getLeadFields() below.
20
22
  */
23
+ // The partner /leads/fields/ endpoint returns the same wire types the CRM's
24
+ // Zapier surface uses. Map them to n8n resource-mapper column types. Anything
25
+ // not listed falls through to 'string', which the CRM accepts for text values.
26
+ // A field that carries `choices` becomes an 'options' column regardless of type.
27
+ const CRM_TYPE_TO_N8N = {
28
+ string: 'string',
29
+ text: 'string',
30
+ number: 'number',
31
+ boolean: 'boolean',
32
+ datetime: 'dateTime',
33
+ date: 'dateTime',
34
+ // document_url etc. arrive as strings; a file URL is still just a string.
35
+ file: 'string',
36
+ };
37
+ /** The CRM stores select options as a JSON list of either bare strings or
38
+ * {value,label}/{value,name} objects. Normalise both to n8n's option shape. */
39
+ function normaliseOptions(options) {
40
+ if (!Array.isArray(options))
41
+ return [];
42
+ return options.map((o) => {
43
+ if (o && typeof o === 'object') {
44
+ const rec = o;
45
+ const value = String(rec.value ?? rec.name ?? rec.label ?? '');
46
+ const name = String(rec.label ?? rec.name ?? rec.value ?? value);
47
+ return { name, value };
48
+ }
49
+ return { name: String(o), value: String(o) };
50
+ });
51
+ }
21
52
  class SkodeCrm {
22
53
  constructor() {
23
54
  this.description = {
24
- displayName: 'Skode CRM',
55
+ displayName: 'SkedX CRM',
25
56
  name: 'skodeCrm',
26
57
  icon: { light: 'file:skodecrm.light.svg', dark: 'file:skodecrm.dark.svg' },
27
58
  group: ['transform'],
@@ -30,9 +61,9 @@ class SkodeCrm {
30
61
  // described CRM action against one org, gated by the credential.
31
62
  usableAsTool: true,
32
63
  subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
33
- description: 'Create, update and search leads in Skode CRM',
64
+ description: 'Create, update and search leads in SkedX CRM',
34
65
  defaults: {
35
- name: 'Skode CRM',
66
+ name: 'SkedX CRM',
36
67
  },
37
68
  inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
38
69
  outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
@@ -54,23 +85,10 @@ class SkodeCrm {
54
85
  },
55
86
  },
56
87
  properties: [
57
- {
58
- displayName: 'Organization ID',
59
- name: 'organizationId',
60
- type: 'string',
61
- default: '',
62
- description: 'Which Skode CRM workspace to act in. Required only if your account belongs to more than one organization — leave blank for single-org accounts. Find it in the CRM under Settings, or in the address bar as ?org=. Sent as the X-Skode-Org-ID header.',
63
- routing: {
64
- // Sent as a header, and only when filled ($value || undefined
65
- // makes n8n omit it entirely for single-org accounts). Never
66
- // touches the request body.
67
- request: {
68
- headers: {
69
- 'X-Skode-Org-Id': '={{ $value || undefined }}',
70
- },
71
- },
72
- },
73
- },
88
+ // NOTE: there is deliberately NO "Organization ID" field. The CRM
89
+ // binds the target workspace to the OAuth token at the consent
90
+ // screen (you pick the org when you click Connect), and the partner
91
+ // API resolves it from that binding server-side.
74
92
  {
75
93
  displayName: 'Resource',
76
94
  name: 'resource',
@@ -126,7 +144,7 @@ class SkodeCrm {
126
144
  ],
127
145
  default: 'create',
128
146
  },
129
- // ── Create / Update fields ─────────────────────────────────────
147
+ // ── Update: which lead ─────────────────────────────────────────
130
148
  {
131
149
  displayName: 'Lead ID',
132
150
  name: 'leadId',
@@ -136,92 +154,39 @@ class SkodeCrm {
136
154
  displayOptions: { show: { resource: ['lead'], operation: ['update'] } },
137
155
  description: 'Numeric ID of the lead to update',
138
156
  },
157
+ // ── Create / Update fields — loaded from THIS org's Field Editor ──
139
158
  {
140
- displayName: 'Email',
141
- name: 'email',
142
- type: 'string',
143
- placeholder: 'name@example.com',
144
- default: '',
145
- displayOptions: { show: { resource: ['lead'], operation: ['create'] } },
146
- routing: { send: { type: 'body', property: 'email' } },
147
- },
148
- {
149
- displayName: 'Additional Fields',
150
- name: 'additionalFields',
151
- type: 'collection',
152
- placeholder: 'Add Field',
153
- default: {},
159
+ displayName: 'Fields',
160
+ name: 'leadFields',
161
+ type: 'resourceMapper',
162
+ noDataExpression: true,
163
+ default: { mappingMode: 'defineBelow', value: null },
164
+ required: true,
154
165
  displayOptions: {
155
166
  show: { resource: ['lead'], operation: ['create', 'update'] },
156
167
  },
157
- description: 'Any CRM lead field. Use "Get fields" in the CRM (or the fields endpoint) to see the exact keys your org accepts, including custom fields.',
158
- options: [
159
- {
160
- displayName: 'Company',
161
- name: 'company',
162
- type: 'string',
163
- default: '',
164
- routing: { send: { type: 'body', property: 'company' } },
168
+ description: "The lead's fields, loaded live from your organization's Field Editor — including custom fields",
169
+ typeOptions: {
170
+ loadOptionsDependsOn: ['resource', 'operation'],
171
+ resourceMapper: {
172
+ resourceMapperMethod: 'getLeadFields',
173
+ mode: 'add',
174
+ fieldWords: { singular: 'field', plural: 'fields' },
175
+ // Show ONLY required fields by default; every optional field
176
+ // is added on demand via the "Add field to send" picker.
177
+ addAllFields: false,
178
+ multiKeyMatch: false,
179
+ supportAutoMap: true,
165
180
  },
166
- {
167
- displayName: 'Contact Name',
168
- name: 'contact_name',
169
- type: 'string',
170
- default: '',
171
- routing: { send: { type: 'body', property: 'contact_name' } },
172
- },
173
- {
174
- displayName: 'Custom Fields (JSON)',
175
- name: 'customFieldsJson',
176
- type: 'json',
177
- default: '{}',
178
- description: 'Any additional field keys as a JSON object, merged into the request body',
179
- routing: { send: { type: 'body', value: '={{ JSON.parse($value || "{}") }}' } },
180
- },
181
- {
182
- displayName: 'First Name',
183
- name: 'first_name',
184
- type: 'string',
185
- default: '',
186
- routing: { send: { type: 'body', property: 'first_name' } },
187
- },
188
- {
189
- displayName: 'Last Name',
190
- name: 'last_name',
191
- type: 'string',
192
- default: '',
193
- routing: { send: { type: 'body', property: 'last_name' } },
194
- },
195
- {
196
- displayName: 'Phone',
197
- name: 'phone',
198
- type: 'string',
199
- default: '',
200
- routing: { send: { type: 'body', property: 'phone' } },
201
- },
202
- {
203
- displayName: 'Project',
204
- name: 'projects',
205
- type: 'string',
206
- default: '',
207
- description: 'Project name (created if it does not exist)',
208
- routing: { send: { type: 'body', property: 'projects' } },
209
- },
210
- {
211
- displayName: 'Source',
212
- name: 'lead_source',
213
- type: 'string',
214
- default: '',
215
- routing: { send: { type: 'body', property: 'lead_source' } },
216
- },
217
- {
218
- displayName: 'Status',
219
- name: 'status',
220
- type: 'string',
221
- default: '',
222
- routing: { send: { type: 'body', property: 'status' } },
181
+ },
182
+ // The mapped {key: value} object IS the request body for both the
183
+ // POST (create) and PATCH (update). Empty values are omitted by
184
+ // the mapper, so PATCH stays a partial update.
185
+ routing: {
186
+ request: {
187
+ body: '={{ $value.value || {} }}',
223
188
  },
224
- ],
189
+ },
225
190
  },
226
191
  // ── Search / Get Many params ───────────────────────────────────
227
192
  {
@@ -255,6 +220,60 @@ class SkodeCrm {
255
220
  },
256
221
  ],
257
222
  };
223
+ this.methods = {
224
+ resourceMapping: {
225
+ // Loads the connected org's lead schema so the mapper shows that
226
+ // org's actual fields. On Update every field is optional (PATCH is
227
+ // partial); on Create the CRM's required flags are honoured.
228
+ async getLeadFields() {
229
+ const credentials = await this.getCredentials('skodeCrmOAuth2Api');
230
+ const baseUrl = String(credentials.baseUrl).replace(/\/$/, '');
231
+ const operation = this.getNodeParameter('operation', 0);
232
+ let response;
233
+ try {
234
+ response = await this.helpers.httpRequestWithAuthentication.call(this, 'skodeCrmOAuth2Api', {
235
+ method: 'GET',
236
+ url: `${baseUrl}/api/partner/v1/leads/fields/`,
237
+ headers: { 'X-Skode-Partner': 'n8n' },
238
+ json: true,
239
+ });
240
+ }
241
+ catch {
242
+ // A schema lookup failure must not brick the node — fall back
243
+ // to a free-form mapper so the user can still send raw keys.
244
+ return { fields: [] };
245
+ }
246
+ const raw = Array.isArray(response?.fields) ? response.fields : [];
247
+ const fields = [];
248
+ for (const f of raw) {
249
+ const key = String(f.key ?? '');
250
+ if (!key)
251
+ continue;
252
+ // A field with `choices` (status, priority, team member,
253
+ // country, select) is a dropdown; everything else maps by type.
254
+ const hasChoices = Array.isArray(f.choices) && f.choices.length > 0;
255
+ const type = hasChoices
256
+ ? 'options'
257
+ : CRM_TYPE_TO_N8N[String(f.type ?? 'string')] ?? 'string';
258
+ const column = {
259
+ id: key,
260
+ displayName: String(f.label ?? key),
261
+ required: operation === 'create' ? f.required === true : false,
262
+ defaultMatch: false,
263
+ canBeUsedToMatch: false,
264
+ display: true,
265
+ type,
266
+ readOnly: false,
267
+ };
268
+ if (type === 'options') {
269
+ column.options = normaliseOptions(f.choices);
270
+ }
271
+ fields.push(column);
272
+ }
273
+ return { fields };
274
+ },
275
+ },
276
+ };
258
277
  }
259
278
  }
260
279
  exports.SkodeCrm = SkodeCrm;
@@ -1 +1 @@
1
- {"version":3,"file":"SkodeCrm.node.js","sourceRoot":"","sources":["../../../nodes/SkodeCrm/SkodeCrm.node.ts"],"names":[],"mappings":";;;AACA,+CAAmD;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,MAAa,QAAQ;IAArB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,WAAW;YACxB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,wBAAwB,EAAE;YAC1E,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,gEAAgE;YAChE,iEAAiE;YACjE,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE;gBACT,IAAI,EAAE,WAAW;aACjB;YACD,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,mEAAmE;gBACnE,OAAO,EAAE,0CAA0C;gBACnD,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;oBAClC,6DAA6D;oBAC7D,6DAA6D;oBAC7D,iBAAiB,EAAE,KAAK;iBACxB;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,iBAAiB;oBAC9B,IAAI,EAAE,gBA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AAC;wBAChC,IAAI,CAAC,GAAG;4BAAE,SAAS;wBAEnB,yDAAyD;wBACzD,gEAAgE;wBAChE,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;wBACpE,MAAM,IAAI,GAAgC,UAAU;4BACnD,CAAC,CAAC,SAAS;4BACX,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC;wBAE3D,MAAM,MAAM,GAAwB;4BACnC,EAAE,EAAE,GAAG;4BACP,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC;4BACnC,QAAQ,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK;4BAC9D,YAAY,EAAE,KAAK;4BACnB,gBAAgB,EAAE,KAAK;4BACvB,OAAO,EAAE,IAAI;4BACb,IAAI;4BACJ,QAAQ,EAAE,KAAK;yBACf,CAAC;wBACF,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;4BACxB,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;wBAC9C,CAAC;wBACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACrB,CAAC;oBAED,OAAO,EAAE,MAAM,EAAE,CAAC;gBACnB,CAAC;aACD;SACD,CAAC;IACH,CAAC;CAAA;AA9OD,4BA8OC"}
@@ -1,6 +1,6 @@
1
1
  import type { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
2
2
  /**
3
- * Skode CRM Trigger — fires a workflow when a lead event happens.
3
+ * SkedX CRM Trigger — fires a workflow when a lead event happens.
4
4
  *
5
5
  * Uses the CRM's REST-hook endpoints (the same ones the Zapier app uses):
6
6
  * POST /api/partner/v1/hooks/ { target_url, event } -> subscription
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SkodeCrmTrigger = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
5
  /**
6
- * Skode CRM Trigger — fires a workflow when a lead event happens.
6
+ * SkedX CRM Trigger — fires a workflow when a lead event happens.
7
7
  *
8
8
  * Uses the CRM's REST-hook endpoints (the same ones the Zapier app uses):
9
9
  * POST /api/partner/v1/hooks/ { target_url, event } -> subscription
@@ -15,15 +15,15 @@ const n8n_workflow_1 = require("n8n-workflow");
15
15
  class SkodeCrmTrigger {
16
16
  constructor() {
17
17
  this.description = {
18
- displayName: 'Skode CRM Trigger',
18
+ displayName: 'SkedX CRM Trigger',
19
19
  name: 'skodeCrmTrigger',
20
20
  icon: { light: 'file:skodecrm.light.svg', dark: 'file:skodecrm.dark.svg' },
21
21
  group: ['trigger'],
22
22
  version: 1,
23
23
  subtitle: '={{$parameter["event"]}}',
24
- description: 'Starts a workflow on a Skode CRM lead event',
24
+ description: 'Starts a workflow on a SkedX CRM lead event',
25
25
  defaults: {
26
- name: 'Skode CRM Trigger',
26
+ name: 'SkedX CRM Trigger',
27
27
  },
28
28
  inputs: [],
29
29
  outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
@@ -42,13 +42,8 @@ class SkodeCrmTrigger {
42
42
  },
43
43
  ],
44
44
  properties: [
45
- {
46
- displayName: 'Organization ID',
47
- name: 'organizationId',
48
- type: 'string',
49
- default: '',
50
- description: 'Which Skode CRM workspace this trigger belongs to. Required only if your account belongs to more than one organization. Sent as X-Skode-Org-ID when registering the webhook.',
51
- },
45
+ // No "Organization ID" field — the workspace is bound to the OAuth
46
+ // token at consent and resolved server-side. See SkodeCrm.node.ts.
52
47
  {
53
48
  displayName: 'Event',
54
49
  name: 'event',
@@ -74,12 +69,9 @@ class SkodeCrmTrigger {
74
69
  async create() {
75
70
  const webhookUrl = this.getNodeWebhookUrl('default');
76
71
  const event = this.getNodeParameter('event');
77
- const orgId = this.getNodeParameter('organizationId', '') || '';
78
72
  const credentials = await this.getCredentials('skodeCrmOAuth2Api');
79
73
  const baseUrl = credentials.baseUrl.replace(/\/$/, '');
80
74
  const headers = { 'X-Skode-Partner': 'n8n' };
81
- if (orgId)
82
- headers['X-Skode-Org-Id'] = orgId;
83
75
  const response = await this.helpers.httpRequestWithAuthentication.call(this, 'skodeCrmOAuth2Api', {
84
76
  method: 'POST',
85
77
  url: `${baseUrl}/api/partner/v1/hooks/`,
@@ -106,13 +98,7 @@ class SkodeCrmTrigger {
106
98
  await this.helpers.httpRequestWithAuthentication.call(this, 'skodeCrmOAuth2Api', {
107
99
  method: 'DELETE',
108
100
  url: `${baseUrl}/api/partner/v1/hooks/${webhookData.subscriptionId}/`,
109
- headers: (() => {
110
- const h = { 'X-Skode-Partner': 'n8n' };
111
- const orgId = this.getNodeParameter('organizationId', '') || '';
112
- if (orgId)
113
- h['X-Skode-Org-Id'] = orgId;
114
- return h;
115
- })(),
101
+ headers: { 'X-Skode-Partner': 'n8n' },
116
102
  json: true,
117
103
  });
118
104
  }
@@ -121,7 +107,7 @@ class SkodeCrmTrigger {
121
107
  // is fine, but we must not pretend nothing happened: log it so
122
108
  // a genuine failure (auth expired, CRM down) is visible rather
123
109
  // than silently leaving a live subscription behind.
124
- this.logger.warn(`Skode CRM Trigger: could not remove webhook subscription ${webhookData.subscriptionId}: ${error?.message ?? error}`);
110
+ this.logger.warn(`SkedX CRM Trigger: could not remove webhook subscription ${webhookData.subscriptionId}: ${error?.message ?? error}`);
125
111
  }
126
112
  delete webhookData.subscriptionId;
127
113
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"SkodeCrmTrigger.node.js","sourceRoot":"","sources":["../../../nodes/SkodeCrm/SkodeCrmTrigger.node.ts"],"names":[],"mappings":";;;AAOA,+CAAmD;AAEnD;;;;;;;;;GASG;AACH,MAAa,eAAe;IAA5B;QAC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Ac,CAAC;oBAClC,OAAO,IAAI,CAAC;gBACb,CAAC;aACD;SACD,CAAC;IAQH,CAAC;IANA,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAa,CAAC,CAAC;SAC3D,CAAC;IACH,CAAC;CACD;AA1ID,0CA0IC"}
1
+ {"version":3,"file":"SkodeCrmTrigger.node.js","sourceRoot":"","sources":["../../../nodes/SkodeCrm/SkodeCrmTrigger.node.ts"],"names":[],"mappings":";;;AAOA,+CAAmD;AAEnD;;;;;;;;;GASG;AACH,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE,EAAE,KAAK,EAAE,yBAAyB,EAAE,IAAI,EAAE,wBAAwB,EAAE;YAC1E,KAAK,EAAE,CAAC,SAAS,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,0BAA0B;YACpC,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,mBAAmB;oBACzB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,QAAQ,EAAE;gBACT;oBACC,IAAI,EAAE,SAAS;oBACf,UAAU,EAAE,MAAM;oBAClB,YAAY,EAAE,YAAY;oBAC1B,IAAI,EAAE,SAAS;iBACf;aACD;YACD,UAAU,EAAE;gBACX,mEAAmE;gBACnE,mEAAmE;gBACnE;oBACC,WAAW,EAAE,OAAO;oBACpB,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,IAAI;oBACd,OAAO,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;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,OAAO;YACN,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAa,CAAC,CAAC;SAC3D,CAAC;IACH,CAAC;CACD;AA9HD,0CA8HC"}
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="60" height="60" role="img" aria-label="Skode">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="60" height="60" role="img" aria-label="SkedX">
2
2
  <rect width="1024" height="1024" fill="#5B9BF8"/>
3
3
  <circle cx="512" cy="410" r="100" fill="#FFFFFF"/>
4
4
  <path d="M339 575 Q512 700 684 575" fill="none" stroke="#FFFFFF" stroke-width="40" stroke-linecap="round"/>
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="60" height="60" role="img" aria-label="Skode">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="60" height="60" role="img" aria-label="SkedX">
2
2
  <rect width="1024" height="1024" fill="#4285F4"/>
3
3
  <circle cx="512" cy="410" r="100" fill="#FFFFFF"/>
4
4
  <path d="M339 575 Q512 700 684 575" fill="none" stroke="#FFFFFF" stroke-width="40" stroke-linecap="round"/>
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "n8n-nodes-skodecrm",
3
- "version": "0.1.5",
4
- "description": "n8n community node for Skode CRM — manage leads and trigger on lead events.",
3
+ "version": "0.1.10",
4
+ "description": "n8n community node for SkedX CRM — manage leads and trigger on lead events.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
7
7
  "skode",
8
+ "skedx",
8
9
  "crm",
9
10
  "leads"
10
11
  ],
11
12
  "license": "MIT",
12
- "homepage": "https://skode.ai",
13
+ "homepage": "https://skedx.io",
13
14
  "author": {
14
- "name": "Skode Technologies Pvt Ltd",
15
- "email": "info@skode.ai"
15
+ "name": "SkedX",
16
+ "email": "info@skedx.io"
16
17
  },
17
18
  "repository": {
18
19
  "type": "git",