@trg-admin/n8n-nodes-zoho-desk 0.1.9 → 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.
@@ -161,6 +161,13 @@ class ZohoDesk {
161
161
  default: '',
162
162
  description: 'ID of existing contact (alternative to email)',
163
163
  },
164
+ {
165
+ displayName: 'Task ID',
166
+ name: 'cfTaskId',
167
+ type: 'string',
168
+ default: '',
169
+ description: 'Custom field Task ID (maps to customFields.cf_task_id)',
170
+ },
164
171
  {
165
172
  displayName: 'Due Date',
166
173
  name: 'dueDate',
@@ -423,12 +430,18 @@ class ZohoDesk {
423
430
  const departmentId = this.getNodeParameter('departmentId', i);
424
431
  const description = this.getNodeParameter('description', i, '');
425
432
  const additionalFields = this.getNodeParameter('additionalFields', i, {});
433
+ const { cfTaskId, ...otherAdditionalFields } = additionalFields;
426
434
  const body = {
427
435
  subject,
428
436
  email,
429
437
  departmentId,
430
- ...additionalFields,
438
+ ...otherAdditionalFields,
431
439
  };
440
+ if (cfTaskId) {
441
+ body.customFields = {
442
+ cf_task_id: cfTaskId,
443
+ };
444
+ }
432
445
  if (description) {
433
446
  body.description = description;
434
447
  }
@@ -439,9 +452,15 @@ class ZohoDesk {
439
452
  const ticketId = this.getNodeParameter('ticketId', i);
440
453
  const description = this.getNodeParameter('description', i, '');
441
454
  const additionalFields = this.getNodeParameter('additionalFields', i, {});
455
+ const { cfTaskId, ...otherAdditionalFields } = additionalFields;
442
456
  const body = {
443
- ...additionalFields,
457
+ ...otherAdditionalFields,
444
458
  };
459
+ if (cfTaskId) {
460
+ body.customFields = {
461
+ cf_task_id: cfTaskId,
462
+ };
463
+ }
445
464
  if (description) {
446
465
  body.description = description;
447
466
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trg-admin/n8n-nodes-zoho-desk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Community n8n node starter for Zoho Desk using built-in Zoho OAuth2 auth behavior",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",