n8n-nodes-innotes 2.0.5 → 2.0.6

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.
@@ -120,6 +120,59 @@ exports.contactFields = [
120
120
  default: '',
121
121
  description: 'The current company of the contact',
122
122
  },
123
+ {
124
+ displayName: 'Phone & Email',
125
+ name: 'contact_details',
126
+ type: 'fixedCollection',
127
+ typeOptions: {
128
+ multipleValues: true,
129
+ sortable: true,
130
+ },
131
+ placeholder: 'Add Phone or Email',
132
+ displayOptions: {
133
+ show: {
134
+ resource: ['contact'],
135
+ operation: ['create'],
136
+ },
137
+ },
138
+ default: {},
139
+ description: 'Phone numbers and email addresses to store for this contact',
140
+ options: [
141
+ {
142
+ displayName: 'Entry',
143
+ name: 'entry',
144
+ values: [
145
+ {
146
+ displayName: 'Type',
147
+ name: 'type',
148
+ type: 'options',
149
+ options: [
150
+ { name: 'Email', value: 'email' },
151
+ { name: 'Phone', value: 'phone' },
152
+ ],
153
+ default: 'email',
154
+ description: 'Whether this entry is an email address or a phone number',
155
+ },
156
+ {
157
+ displayName: 'Value',
158
+ name: 'value',
159
+ type: 'string',
160
+ default: '',
161
+ placeholder: '+41 79 123 45 67',
162
+ description: 'The address or number itself',
163
+ },
164
+ {
165
+ displayName: 'Label',
166
+ name: 'label',
167
+ type: 'string',
168
+ default: '',
169
+ placeholder: 'work',
170
+ description: 'Optional label such as work, mobile or private',
171
+ },
172
+ ],
173
+ },
174
+ ],
175
+ },
123
176
  {
124
177
  displayName: 'Picture URL',
125
178
  name: 'picture_url',
@@ -288,6 +341,58 @@ exports.contactFields = [
288
341
  type: 'string',
289
342
  default: '',
290
343
  },
344
+ {
345
+ displayName: 'Phone & Email',
346
+ name: 'contact_details',
347
+ type: 'fixedCollection',
348
+ typeOptions: {
349
+ multipleValues: true,
350
+ sortable: true,
351
+ },
352
+ placeholder: 'Add Phone or Email',
353
+ default: {},
354
+ // Replaces the stored list rather than adding to it, which is what
355
+ // the API does with this field — a workflow that sends one number
356
+ // deletes the others, and an operator reading this list is the only
357
+ // person who can know that before it happens. Leaving it empty is
358
+ // the one thing it does NOT do: see contactDetailsFromCollection.
359
+ description: 'Phone numbers and email addresses. This REPLACES the ones already stored, so add every entry the contact should keep. Leaving it empty changes nothing — deleting all of a contact\'s recapiti is not possible from this node.',
360
+ options: [
361
+ {
362
+ displayName: 'Entry',
363
+ name: 'entry',
364
+ values: [
365
+ {
366
+ displayName: 'Type',
367
+ name: 'type',
368
+ type: 'options',
369
+ options: [
370
+ { name: 'Email', value: 'email' },
371
+ { name: 'Phone', value: 'phone' },
372
+ ],
373
+ default: 'email',
374
+ description: 'Whether this entry is an email address or a phone number',
375
+ },
376
+ {
377
+ displayName: 'Value',
378
+ name: 'value',
379
+ type: 'string',
380
+ default: '',
381
+ placeholder: '+41 79 123 45 67',
382
+ description: 'The address or number itself',
383
+ },
384
+ {
385
+ displayName: 'Label',
386
+ name: 'label',
387
+ type: 'string',
388
+ default: '',
389
+ placeholder: 'work',
390
+ description: 'Optional label such as work, mobile or private',
391
+ },
392
+ ],
393
+ },
394
+ ],
395
+ },
291
396
  ],
292
397
  },
293
398
  ];
@@ -1 +1 @@
1
- {"version":3,"sources":["../descriptions/ContactDescription.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,qBA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Aa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;SACD;KACD;CACD,CAAC","file":"ContactDescription.js","sourcesContent":["/**\n * @author Marco Visin\n * @date 2025-05-30\n */\n\nimport { INodeProperties } from 'n8n-workflow';\n\nexport const contactOperations: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Create',\n\t\t\t\tvalue: 'create',\n\t\t\t\tdescription: 'Create a new contact',\n\t\t\t\taction: 'Create a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get',\n\t\t\t\tvalue: 'get',\n\t\t\t\tdescription: 'Get a contact by ID',\n\t\t\t\taction: 'Get a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get Many',\n\t\t\t\tvalue: 'getAll',\n\t\t\t\tdescription: 'Get multiple contacts',\n\t\t\t\taction: 'Get many contacts',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Update',\n\t\t\t\tvalue: 'update',\n\t\t\t\tdescription: 'Update a contact',\n\t\t\t\taction: 'Update a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Delete',\n\t\t\t\tvalue: 'delete',\n\t\t\t\tdescription: 'Delete a contact',\n\t\t\t\taction: 'Delete a contact',\n\t\t\t},\n\t\t],\n\t\tdefault: 'getAll',\n\t},\n];\n\nexport const contactFields: INodeProperties[] = [\n\t// Create fields\n\t{\n\t\tdisplayName: 'Name',\n\t\tname: 'name',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The name of the contact',\n\t},\n\t{\n\t\tdisplayName: 'LinkedIn Key',\n\t\tname: 'linkedin_key',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The LinkedIn profile key/username',\n\t},\n\t{\n\t\tdisplayName: 'LinkedIn User',\n\t\tname: 'linkedin_user',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The LinkedIn username',\n\t},\n\t{\n\t\tdisplayName: 'Location',\n\t\tname: 'location',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The location of the contact',\n\t},\n\t{\n\t\tdisplayName: 'Current Company',\n\t\tname: 'current_company',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The current company of the contact',\n\t},\n\t{\n\t\tdisplayName: 'Picture URL',\n\t\tname: 'picture_url',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'URL of the contact profile picture',\n\t},\n\t{\n\t\tdisplayName: 'Tags',\n\t\tname: 'tags',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Tag',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: [],\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Tag',\n\t\t\t\tname: 'tag',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t],\n\t\tdescription: 'Tags to assign to the contact',\n\t},\n\t{\n\t\tdisplayName: 'Status ID',\n\t\tname: 'status_id',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The status ID for the contact',\n\t},\n\n\t// Get fields\n\t{\n\t\tdisplayName: 'Contact ID',\n\t\tname: 'contactId',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['get', 'update', 'delete'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The ID of the contact',\n\t},\n\n\t// Get All fields\n\t{\n\t\tdisplayName: 'Return All',\n\t\tname: 'returnAll',\n\t\ttype: 'boolean',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: false,\n\t\tdescription: 'Whether to return all results or only up to a given limit',\n\t},\n\t{\n\t\tdisplayName: 'Limit',\n\t\tname: 'limit',\n\t\ttype: 'number',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t\treturnAll: [false],\n\t\t\t},\n\t\t},\n\t\ttypeOptions: {\n\t\t\tminValue: 1,\n\t\t\t// GET /api/contacts clamps pageSize at 200. Without the same ceiling\n\t\t\t// here a workflow asking for 500 gets 200 back with a 200 status and\n\t\t\t// nothing to say it was cut.\n\t\t\tmaxValue: 200,\n\t\t},\n\t\tdefault: 24,\n\t\tdescription: 'Max number of results to return (200 at most)',\n\t},\n\t{\n\t\tdisplayName: 'Search Term',\n\t\tname: 'search',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'Search term to filter contacts',\n\t},\n\t{\n\t\tdisplayName: 'Filter by Tags',\n\t\tname: 'tags',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'Comma-separated list of tags to filter by',\n\t},\n\n\t// Update fields\n\t{\n\t\tdisplayName: 'Update Fields',\n\t\tname: 'updateFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['update'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Name',\n\t\t\t\tname: 'name',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Location',\n\t\t\t\tname: 'location',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Current Company',\n\t\t\t\tname: 'current_company',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Picture URL',\n\t\t\t\tname: 'picture_url',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Status ID',\n\t\t\t\tname: 'status_id',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t],\n\t},\n];\n"]}
1
+ {"version":3,"sources":["../descriptions/ContactDescription.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIU,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,sBAAsB;gBACnC,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,qBAAqB;gBAClC,MAAM,EAAE,eAAe;aACvB;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,uBAAuB;gBACpC,MAAM,EAAE,mBAAmB;aAC3B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,kBAAkB;aAC1B;YACD;gBACC,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,kBAAkB;gBAC/B,MAAM,EAAE,kBAAkB;aAC1B;SACD;QACD,OAAO,EAAE,QAAQ;KACjB;CACD,CAAC;AAEW,QAAA,aAAa,GAAsB;IAC/C,gBAAgB;IAChB;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,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EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;iCACjC;gCACD,OAAO,EAAE,OAAO;gCAChB,WAAW,EAAE,0DAA0D;6BACvE;4BACD;gCACC,WAAW,EAAE,OAAO;gCACpB,IAAI,EAAE,OAAO;gCACb,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,EAAE;gCACX,WAAW,EAAE,kBAAkB;gCAC/B,WAAW,EAAE,8BAA8B;6BAC3C;4BACD;gCACC,WAAW,EAAE,OAAO;gCACpB,IAAI,EAAE,OAAO;gCACb,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,EAAE;gCACX,WAAW,EAAE,MAAM;gCACnB,WAAW,EAAE,gDAAgD;6BAC7D;yBACD;qBACD;iBACD;aACD;SACD;KACD;CACD,CAAC","file":"ContactDescription.js","sourcesContent":["/**\n * @author Marco Visin\n * @date 2025-05-30\n */\n\nimport { INodeProperties } from 'n8n-workflow';\n\nexport const contactOperations: INodeProperties[] = [\n\t{\n\t\tdisplayName: 'Operation',\n\t\tname: 'operation',\n\t\ttype: 'options',\n\t\tnoDataExpression: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tname: 'Create',\n\t\t\t\tvalue: 'create',\n\t\t\t\tdescription: 'Create a new contact',\n\t\t\t\taction: 'Create a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get',\n\t\t\t\tvalue: 'get',\n\t\t\t\tdescription: 'Get a contact by ID',\n\t\t\t\taction: 'Get a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Get Many',\n\t\t\t\tvalue: 'getAll',\n\t\t\t\tdescription: 'Get multiple contacts',\n\t\t\t\taction: 'Get many contacts',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Update',\n\t\t\t\tvalue: 'update',\n\t\t\t\tdescription: 'Update a contact',\n\t\t\t\taction: 'Update a contact',\n\t\t\t},\n\t\t\t{\n\t\t\t\tname: 'Delete',\n\t\t\t\tvalue: 'delete',\n\t\t\t\tdescription: 'Delete a contact',\n\t\t\t\taction: 'Delete a contact',\n\t\t\t},\n\t\t],\n\t\tdefault: 'getAll',\n\t},\n];\n\nexport const contactFields: INodeProperties[] = [\n\t// Create fields\n\t{\n\t\tdisplayName: 'Name',\n\t\tname: 'name',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The name of the contact',\n\t},\n\t{\n\t\tdisplayName: 'LinkedIn Key',\n\t\tname: 'linkedin_key',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The LinkedIn profile key/username',\n\t},\n\t{\n\t\tdisplayName: 'LinkedIn User',\n\t\tname: 'linkedin_user',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The LinkedIn username',\n\t},\n\t{\n\t\tdisplayName: 'Location',\n\t\tname: 'location',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The location of the contact',\n\t},\n\t{\n\t\tdisplayName: 'Current Company',\n\t\tname: 'current_company',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The current company of the contact',\n\t},\n\t{\n\t\tdisplayName: 'Phone & Email',\n\t\tname: 'contact_details',\n\t\ttype: 'fixedCollection',\n\t\ttypeOptions: {\n\t\t\tmultipleValues: true,\n\t\t\tsortable: true,\n\t\t},\n\t\tplaceholder: 'Add Phone or Email',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create'],\n\t\t\t},\n\t\t},\n\t\tdefault: {},\n\t\tdescription: 'Phone numbers and email addresses to store for this contact',\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Entry',\n\t\t\t\tname: 'entry',\n\t\t\t\tvalues: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{ name: 'Email', value: 'email' },\n\t\t\t\t\t\t\t{ name: 'Phone', value: 'phone' },\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdefault: 'email',\n\t\t\t\t\t\tdescription: 'Whether this entry is an email address or a phone number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: '+41 79 123 45 67',\n\t\t\t\t\t\tdescription: 'The address or number itself',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Label',\n\t\t\t\t\t\tname: 'label',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tplaceholder: 'work',\n\t\t\t\t\t\tdescription: 'Optional label such as work, mobile or private',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tdisplayName: 'Picture URL',\n\t\tname: 'picture_url',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'URL of the contact profile picture',\n\t},\n\t{\n\t\tdisplayName: 'Tags',\n\t\tname: 'tags',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Tag',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: [],\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Tag',\n\t\t\t\tname: 'tag',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t],\n\t\tdescription: 'Tags to assign to the contact',\n\t},\n\t{\n\t\tdisplayName: 'Status ID',\n\t\tname: 'status_id',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['create', 'update'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The status ID for the contact',\n\t},\n\n\t// Get fields\n\t{\n\t\tdisplayName: 'Contact ID',\n\t\tname: 'contactId',\n\t\ttype: 'string',\n\t\trequired: true,\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['get', 'update', 'delete'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'The ID of the contact',\n\t},\n\n\t// Get All fields\n\t{\n\t\tdisplayName: 'Return All',\n\t\tname: 'returnAll',\n\t\ttype: 'boolean',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: false,\n\t\tdescription: 'Whether to return all results or only up to a given limit',\n\t},\n\t{\n\t\tdisplayName: 'Limit',\n\t\tname: 'limit',\n\t\ttype: 'number',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t\treturnAll: [false],\n\t\t\t},\n\t\t},\n\t\ttypeOptions: {\n\t\t\tminValue: 1,\n\t\t\t// GET /api/contacts clamps pageSize at 200. Without the same ceiling\n\t\t\t// here a workflow asking for 500 gets 200 back with a 200 status and\n\t\t\t// nothing to say it was cut.\n\t\t\tmaxValue: 200,\n\t\t},\n\t\tdefault: 24,\n\t\tdescription: 'Max number of results to return (200 at most)',\n\t},\n\t{\n\t\tdisplayName: 'Search Term',\n\t\tname: 'search',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'Search term to filter contacts',\n\t},\n\t{\n\t\tdisplayName: 'Filter by Tags',\n\t\tname: 'tags',\n\t\ttype: 'string',\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['getAll'],\n\t\t\t},\n\t\t},\n\t\tdefault: '',\n\t\tdescription: 'Comma-separated list of tags to filter by',\n\t},\n\n\t// Update fields\n\t{\n\t\tdisplayName: 'Update Fields',\n\t\tname: 'updateFields',\n\t\ttype: 'collection',\n\t\tplaceholder: 'Add Field',\n\t\tdefault: {},\n\t\tdisplayOptions: {\n\t\t\tshow: {\n\t\t\t\tresource: ['contact'],\n\t\t\t\toperation: ['update'],\n\t\t\t},\n\t\t},\n\t\toptions: [\n\t\t\t{\n\t\t\t\tdisplayName: 'Name',\n\t\t\t\tname: 'name',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Location',\n\t\t\t\tname: 'location',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Current Company',\n\t\t\t\tname: 'current_company',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Picture URL',\n\t\t\t\tname: 'picture_url',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Status ID',\n\t\t\t\tname: 'status_id',\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Phone & Email',\n\t\t\t\tname: 'contact_details',\n\t\t\t\ttype: 'fixedCollection',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tmultipleValues: true,\n\t\t\t\t\tsortable: true,\n\t\t\t\t},\n\t\t\t\tplaceholder: 'Add Phone or Email',\n\t\t\t\tdefault: {},\n\t\t\t\t// Replaces the stored list rather than adding to it, which is what\n\t\t\t\t// the API does with this field — a workflow that sends one number\n\t\t\t\t// deletes the others, and an operator reading this list is the only\n\t\t\t\t// person who can know that before it happens. Leaving it empty is\n\t\t\t\t// the one thing it does NOT do: see contactDetailsFromCollection.\n\t\t\t\tdescription:\n\t\t\t\t\t'Phone numbers and email addresses. This REPLACES the ones already stored, so add every entry the contact should keep. Leaving it empty changes nothing — deleting all of a contact\\'s recapiti is not possible from this node.',\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Entry',\n\t\t\t\t\t\tname: 'entry',\n\t\t\t\t\t\tvalues: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Type',\n\t\t\t\t\t\t\t\tname: 'type',\n\t\t\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t\t\t{ name: 'Email', value: 'email' },\n\t\t\t\t\t\t\t\t\t{ name: 'Phone', value: 'phone' },\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\tdefault: 'email',\n\t\t\t\t\t\t\t\tdescription: 'Whether this entry is an email address or a phone number',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Value',\n\t\t\t\t\t\t\t\tname: 'value',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: '+41 79 123 45 67',\n\t\t\t\t\t\t\t\tdescription: 'The address or number itself',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdisplayName: 'Label',\n\t\t\t\t\t\t\t\tname: 'label',\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\t\t\tplaceholder: 'work',\n\t\t\t\t\t\t\t\tdescription: 'Optional label such as work, mobile or private',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n];\n"]}
@@ -5,6 +5,7 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.InNotes = void 0;
8
+ exports.contactDetailsFromCollection = contactDetailsFromCollection;
8
9
  const n8n_workflow_1 = require("n8n-workflow");
9
10
  const ContactDescription_1 = require("../../descriptions/ContactDescription");
10
11
  const NoteDescription_1 = require("../../descriptions/NoteDescription");
@@ -13,6 +14,63 @@ const StatusDescription_1 = require("../../descriptions/StatusDescription");
13
14
  const TagDescription_1 = require("../../descriptions/TagDescription");
14
15
  const UserDescription_1 = require("../../descriptions/UserDescription");
15
16
  const AutomationDescription_1 = require("../../descriptions/AutomationDescription");
17
+ /**
18
+ * Turn the "Phone & Email" fixedCollection into the array the API takes.
19
+ *
20
+ * n8n hands a fixedCollection over as `{ entry: [{...}, ...] }`, and the update
21
+ * operation posts its collection of fields straight through as the request body
22
+ * — so without this the API would receive an object where it requires an array
23
+ * and answer 400, for a field the user filled in correctly.
24
+ *
25
+ * Returns undefined when the field was never used, which leaves the stored
26
+ * recapiti alone. Rows that were configured but are all unusable raise, on
27
+ * update only — see `raiseWhenUnusable`.
28
+ *
29
+ * Undefined and NOT an empty array, deliberately. An empty array is a request to
30
+ * DELETE every number and address the contact has, and a workflow run before its
31
+ * upstream data arrived would quietly empty the field on a live contact and
32
+ * answer 200. Clearing is not expressible through this node; the REST route and
33
+ * the MCP tool both take an explicit `[]` for anyone who means it.
34
+ * Author: Marco, August 10, 2026
35
+ */
36
+ function contactDetailsFromCollection(raw, raiseWhenUnusable = false) {
37
+ if (raw === undefined || raw === null)
38
+ return undefined;
39
+ // A fixedCollection can be set to an expression, and `{{ $json.contact_details }}`
40
+ // carrying the API's own shape arrives as a bare array rather than {entry: [...]}.
41
+ // Reading only `.entry` there returns undefined and writes nothing, under a 200.
42
+ const entries = Array.isArray(raw) ? raw : raw.entry;
43
+ if (!Array.isArray(entries) || entries.length === 0)
44
+ return undefined;
45
+ const details = entries
46
+ .map((entry) => {
47
+ const row = entry;
48
+ const label = typeof row.label === 'string' ? row.label.trim() : '';
49
+ // Coerced, not discarded: an expression is the normal way to fill this
50
+ // in, and `{{ $json.phone }}` resolving to a NUMBER is a filled-in row.
51
+ const value = row.value === undefined || row.value === null ? '' : String(row.value).trim();
52
+ return { type: row.type, value, ...(label ? { label } : {}) };
53
+ })
54
+ // `type` is a dropdown but expression-settable, so a workflow can resolve
55
+ // it to 'mobile'. Dropping beats defaulting to email, which would send a
56
+ // phone number as an address and earn a 400 about the value, not the type.
57
+ .filter((detail) => detail.value !== '' && (detail.type === 'email' || detail.type === 'phone'));
58
+ // Rows were configured and none survived. On UPDATE that has to raise: the
59
+ // field would be deleted from the body, nothing would be written, and the
60
+ // node would report 200 to an operator who filled in three rows.
61
+ //
62
+ // On CREATE it must NOT raise. There the contact itself is the point and the
63
+ // recapiti are optional, so a row whose expression resolved to "" for this
64
+ // item would abort the whole create — importing 100 contacts would silently
65
+ // skip the 30 with no phone number. Author: Marco, 2026-08-10
66
+ if (details.length === 0) {
67
+ if (raiseWhenUnusable) {
68
+ throw new Error('Phone & Email: no usable entry. Each row needs a Value, and a Type of exactly "email" or "phone".');
69
+ }
70
+ return undefined;
71
+ }
72
+ return details;
73
+ }
16
74
  class InNotes {
17
75
  constructor() {
18
76
  this.description = {
@@ -352,6 +410,7 @@ class InNotes {
352
410
  const picture_url = executeFunctions.getNodeParameter('picture_url', itemIndex, '');
353
411
  const tags = executeFunctions.getNodeParameter('tags', itemIndex, '');
354
412
  const status_id = executeFunctions.getNodeParameter('status_id', itemIndex, '');
413
+ const contact_details = contactDetailsFromCollection(executeFunctions.getNodeParameter('contact_details', itemIndex, {}));
355
414
  const body = {
356
415
  name,
357
416
  linkedin_key,
@@ -361,6 +420,7 @@ class InNotes {
361
420
  ...(picture_url && { picture_url }),
362
421
  ...(tags && { tags: tags.split(',').map((tag) => tag.trim()) }),
363
422
  ...(status_id && { status_id }),
423
+ ...(contact_details && { contact_details }),
364
424
  };
365
425
  try {
366
426
  const response = await executeFunctions.helpers.httpRequestWithAuthentication.call(executeFunctions, 'inNotesApi', {
@@ -384,6 +444,11 @@ class InNotes {
384
444
  ...(picture_url && { picture_url }),
385
445
  ...(tags && { tags: tags.split(',').map((tag) => tag.trim()) }),
386
446
  ...(status_id && { status_id }),
447
+ // The COUNT, never the values: this object is interpolated into a
448
+ // NodeApiError message and n8n persists execution data, so the
449
+ // numbers and addresses would sit in a third party's workflow
450
+ // history. Author: Marco, 2026-08-10
451
+ ...(contact_details && { contact_details: `${contact_details.length} entr(y|ies)` }),
387
452
  };
388
453
  throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), {
389
454
  message: `Failed to create contact: ${error.message}. Request parameters: ${JSON.stringify(requestParams, null, 2)}`,
@@ -428,10 +493,22 @@ class InNotes {
428
493
  if (operation === 'update') {
429
494
  const contactId = executeFunctions.getNodeParameter('contactId', itemIndex);
430
495
  const updateFields = executeFunctions.getNodeParameter('updateFields', itemIndex);
496
+ // The collection goes through as the request body verbatim, so the one
497
+ // field whose n8n shape differs from the API's is rewritten here rather
498
+ // than shipped as an object the route refuses.
499
+ // Raises when rows were configured and none are usable: on update the
500
+ // alternative is dropping the field and reporting success.
501
+ const contact_details = contactDetailsFromCollection(updateFields.contact_details, true);
502
+ const body = {
503
+ ...updateFields,
504
+ ...(contact_details ? { contact_details } : {}),
505
+ };
506
+ if (contact_details === undefined)
507
+ delete body.contact_details;
431
508
  const response = await executeFunctions.helpers.httpRequestWithAuthentication.call(executeFunctions, 'inNotesApi', {
432
509
  method: 'PUT',
433
510
  url: `${baseUrl}/api/contacts/${contactId}`,
434
- body: updateFields,
511
+ body,
435
512
  headers: {
436
513
  Accept: 'application/json',
437
514
  'Content-Type': 'application/json',