n8n-nodes-coresignal-api 1.0.2 → 1.1.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.
- package/dist/nodes/Coresignal/Coresignal.node.js +113 -117
- package/package.json +6 -5
|
@@ -10,14 +10,14 @@ class Coresignal {
|
|
|
10
10
|
icon: 'file:logo.svg',
|
|
11
11
|
group: ['transform'],
|
|
12
12
|
version: 1,
|
|
13
|
-
subtitle: '={{$parameter["
|
|
13
|
+
subtitle: '={{$parameter["operation"] + " - " + $parameter["resource"]}}',
|
|
14
14
|
description: 'Interact with Coresignal API for company, employee, job, and post data',
|
|
15
15
|
documentationUrl: 'https://docs.coresignal.com/?utm_source=n8n&utm_medium=referral',
|
|
16
16
|
defaults: {
|
|
17
17
|
name: 'Coresignal',
|
|
18
18
|
},
|
|
19
|
-
inputs: [
|
|
20
|
-
outputs: [
|
|
19
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
20
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
21
|
credentials: [
|
|
22
22
|
{
|
|
23
23
|
name: 'coresignalApi',
|
|
@@ -25,162 +25,162 @@ class Coresignal {
|
|
|
25
25
|
},
|
|
26
26
|
],
|
|
27
27
|
properties: [
|
|
28
|
-
//
|
|
28
|
+
// Resource Selection
|
|
29
29
|
{
|
|
30
|
-
displayName: '
|
|
31
|
-
name: '
|
|
30
|
+
displayName: 'Resource',
|
|
31
|
+
name: 'resource',
|
|
32
32
|
type: 'options',
|
|
33
33
|
noDataExpression: true,
|
|
34
34
|
options: [
|
|
35
35
|
{
|
|
36
|
-
name: '
|
|
37
|
-
value: 'employee',
|
|
38
|
-
description: 'Access employee data and profiles',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: 'Company Data',
|
|
36
|
+
name: 'Company',
|
|
42
37
|
value: 'company',
|
|
43
38
|
description: 'Access company data and profiles',
|
|
44
39
|
},
|
|
45
40
|
{
|
|
46
|
-
name: '
|
|
47
|
-
value: '
|
|
48
|
-
description: 'Access
|
|
41
|
+
name: 'Employee',
|
|
42
|
+
value: 'employee',
|
|
43
|
+
description: 'Access employee data and profiles',
|
|
49
44
|
},
|
|
50
45
|
{
|
|
51
|
-
name: 'Employee
|
|
46
|
+
name: 'Employee Post',
|
|
52
47
|
value: 'post',
|
|
53
48
|
description: 'Access employee posts data',
|
|
54
49
|
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Job',
|
|
52
|
+
value: 'job',
|
|
53
|
+
description: 'Access jobs data',
|
|
54
|
+
},
|
|
55
55
|
],
|
|
56
56
|
default: 'employee',
|
|
57
57
|
},
|
|
58
|
-
// ============
|
|
59
|
-
//
|
|
58
|
+
// ============ OPERATION SELECTIONS ============
|
|
59
|
+
// Operation - Company
|
|
60
60
|
{
|
|
61
|
-
displayName: '
|
|
62
|
-
name: '
|
|
61
|
+
displayName: 'Operation',
|
|
62
|
+
name: 'operation',
|
|
63
63
|
type: 'options',
|
|
64
64
|
noDataExpression: true,
|
|
65
65
|
displayOptions: {
|
|
66
66
|
show: {
|
|
67
|
-
|
|
67
|
+
resource: ['company'],
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
options: [
|
|
71
71
|
{
|
|
72
|
-
name: '
|
|
73
|
-
value: '
|
|
74
|
-
description: '
|
|
75
|
-
action: '
|
|
72
|
+
name: 'Enrich by Website',
|
|
73
|
+
value: 'enrich',
|
|
74
|
+
description: 'Enrich company data using a website URL',
|
|
75
|
+
action: 'Enrich company by website URL',
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
name: '
|
|
79
|
-
value: '
|
|
80
|
-
description: 'Retrieve a full company profile using a
|
|
81
|
-
action: '
|
|
78
|
+
name: 'Get by ID',
|
|
79
|
+
value: 'get_by_id',
|
|
80
|
+
description: 'Retrieve a full company profile using a company ID',
|
|
81
|
+
action: 'Get company by ID',
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
name: '
|
|
85
|
-
value: '
|
|
86
|
-
description: '
|
|
87
|
-
action: '
|
|
84
|
+
name: 'Get by Slug',
|
|
85
|
+
value: 'get_by_slug',
|
|
86
|
+
description: 'Retrieve a full company profile using a URL slug',
|
|
87
|
+
action: 'Get company by URL slug',
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
name: 'Search with Elasticsearch DSL',
|
|
91
91
|
value: 'search_es_dsl',
|
|
92
92
|
description: 'Search companies using an Elasticsearch DSL query',
|
|
93
|
-
action: 'Search companies using
|
|
93
|
+
action: 'Search companies using elasticsearch DSL',
|
|
94
94
|
},
|
|
95
95
|
],
|
|
96
|
-
default: '
|
|
96
|
+
default: 'get_by_id',
|
|
97
97
|
},
|
|
98
|
-
//
|
|
98
|
+
// Operation - Employee
|
|
99
99
|
{
|
|
100
|
-
displayName: '
|
|
101
|
-
name: '
|
|
100
|
+
displayName: 'Operation',
|
|
101
|
+
name: 'operation',
|
|
102
102
|
type: 'options',
|
|
103
103
|
noDataExpression: true,
|
|
104
104
|
displayOptions: {
|
|
105
105
|
show: {
|
|
106
|
-
|
|
106
|
+
resource: ['employee'],
|
|
107
107
|
},
|
|
108
108
|
},
|
|
109
109
|
options: [
|
|
110
110
|
{
|
|
111
|
-
name: '
|
|
112
|
-
value: '
|
|
111
|
+
name: 'Get by ID',
|
|
112
|
+
value: 'get_by_id',
|
|
113
113
|
description: 'Retrieve a full employee profile using an employee ID',
|
|
114
|
-
action: '
|
|
114
|
+
action: 'Get employee by ID',
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
|
-
name: '
|
|
118
|
-
value: '
|
|
117
|
+
name: 'Get by Slug',
|
|
118
|
+
value: 'get_by_slug',
|
|
119
119
|
description: 'Retrieve a full employee profile using a URL slug',
|
|
120
|
-
action: '
|
|
120
|
+
action: 'Get employee by URL slug',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
name: 'Search with Elasticsearch DSL',
|
|
124
124
|
value: 'search_es_dsl',
|
|
125
125
|
description: 'Search employees using an Elasticsearch DSL query',
|
|
126
|
-
action: 'Search employees using
|
|
126
|
+
action: 'Search employees using elasticsearch DSL',
|
|
127
127
|
},
|
|
128
128
|
],
|
|
129
|
-
default: '
|
|
129
|
+
default: 'get_by_id',
|
|
130
130
|
},
|
|
131
|
-
//
|
|
131
|
+
// Operation - Jobs
|
|
132
132
|
{
|
|
133
|
-
displayName: '
|
|
134
|
-
name: '
|
|
133
|
+
displayName: 'Operation',
|
|
134
|
+
name: 'operation',
|
|
135
135
|
type: 'options',
|
|
136
136
|
noDataExpression: true,
|
|
137
137
|
displayOptions: {
|
|
138
138
|
show: {
|
|
139
|
-
|
|
139
|
+
resource: ['job'],
|
|
140
140
|
},
|
|
141
141
|
},
|
|
142
142
|
options: [
|
|
143
143
|
{
|
|
144
|
-
name: '
|
|
145
|
-
value: '
|
|
144
|
+
name: 'Get by ID',
|
|
145
|
+
value: 'get_by_id',
|
|
146
146
|
description: 'Retrieve a full job posting using a job ID',
|
|
147
|
-
action: '
|
|
147
|
+
action: 'Get job by ID',
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
name: 'Search with Elasticsearch DSL',
|
|
151
151
|
value: 'search_es_dsl',
|
|
152
152
|
description: 'Search jobs using an Elasticsearch DSL query',
|
|
153
|
-
action: 'Search jobs using
|
|
153
|
+
action: 'Search jobs using elasticsearch DSL',
|
|
154
154
|
},
|
|
155
155
|
],
|
|
156
|
-
default: '
|
|
156
|
+
default: 'get_by_id',
|
|
157
157
|
},
|
|
158
|
-
//
|
|
158
|
+
// Operation - Posts
|
|
159
159
|
{
|
|
160
|
-
displayName: '
|
|
161
|
-
name: '
|
|
160
|
+
displayName: 'Operation',
|
|
161
|
+
name: 'operation',
|
|
162
162
|
type: 'options',
|
|
163
163
|
noDataExpression: true,
|
|
164
164
|
displayOptions: {
|
|
165
165
|
show: {
|
|
166
|
-
|
|
166
|
+
resource: ['post'],
|
|
167
167
|
},
|
|
168
168
|
},
|
|
169
169
|
options: [
|
|
170
170
|
{
|
|
171
|
-
name: '
|
|
172
|
-
value: '
|
|
171
|
+
name: 'Get by ID',
|
|
172
|
+
value: 'get_by_id',
|
|
173
173
|
description: 'Retrieve a full employee post using a post ID',
|
|
174
|
-
action: '
|
|
174
|
+
action: 'Get employee post by ID',
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
name: 'Search with Elasticsearch DSL',
|
|
178
178
|
value: 'search_es_dsl',
|
|
179
179
|
description: 'Search employee posts using an Elasticsearch DSL query',
|
|
180
|
-
action: 'Search employee posts using
|
|
180
|
+
action: 'Search employee posts using elasticsearch DSL',
|
|
181
181
|
},
|
|
182
182
|
],
|
|
183
|
-
default: '
|
|
183
|
+
default: 'get_by_id',
|
|
184
184
|
},
|
|
185
185
|
// ============ INPUT DATA ============
|
|
186
186
|
// ID Parameter - Company
|
|
@@ -191,8 +191,8 @@ class Coresignal {
|
|
|
191
191
|
required: true,
|
|
192
192
|
displayOptions: {
|
|
193
193
|
show: {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
resource: ['company'],
|
|
195
|
+
operation: ['get_by_id'],
|
|
196
196
|
},
|
|
197
197
|
},
|
|
198
198
|
default: '',
|
|
@@ -206,8 +206,8 @@ class Coresignal {
|
|
|
206
206
|
required: true,
|
|
207
207
|
displayOptions: {
|
|
208
208
|
show: {
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
resource: ['employee'],
|
|
210
|
+
operation: ['get_by_id'],
|
|
211
211
|
},
|
|
212
212
|
},
|
|
213
213
|
default: '',
|
|
@@ -221,8 +221,8 @@ class Coresignal {
|
|
|
221
221
|
required: true,
|
|
222
222
|
displayOptions: {
|
|
223
223
|
show: {
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
resource: ['job'],
|
|
225
|
+
operation: ['get_by_id'],
|
|
226
226
|
},
|
|
227
227
|
},
|
|
228
228
|
default: '',
|
|
@@ -236,8 +236,8 @@ class Coresignal {
|
|
|
236
236
|
required: true,
|
|
237
237
|
displayOptions: {
|
|
238
238
|
show: {
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
resource: ['post'],
|
|
240
|
+
operation: ['get_by_id'],
|
|
241
241
|
},
|
|
242
242
|
},
|
|
243
243
|
default: '',
|
|
@@ -251,12 +251,12 @@ class Coresignal {
|
|
|
251
251
|
required: true,
|
|
252
252
|
displayOptions: {
|
|
253
253
|
show: {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
resource: ['employee'],
|
|
255
|
+
operation: ['get_by_slug'],
|
|
256
256
|
},
|
|
257
257
|
},
|
|
258
258
|
default: '',
|
|
259
|
-
placeholder: 'e.g
|
|
259
|
+
placeholder: 'e.g. john-smith',
|
|
260
260
|
description: 'The slug to retrieve data for',
|
|
261
261
|
},
|
|
262
262
|
// Shorthand Name Parameter - Company
|
|
@@ -267,12 +267,12 @@ class Coresignal {
|
|
|
267
267
|
required: true,
|
|
268
268
|
displayOptions: {
|
|
269
269
|
show: {
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
resource: ['company'],
|
|
271
|
+
operation: ['get_by_slug'],
|
|
272
272
|
},
|
|
273
273
|
},
|
|
274
274
|
default: '',
|
|
275
|
-
placeholder: 'e.g
|
|
275
|
+
placeholder: 'e.g. microsoft',
|
|
276
276
|
description: 'The slug to retrieve data for',
|
|
277
277
|
},
|
|
278
278
|
// Website Parameter - Enrich
|
|
@@ -283,12 +283,12 @@ class Coresignal {
|
|
|
283
283
|
required: true,
|
|
284
284
|
displayOptions: {
|
|
285
285
|
show: {
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
resource: ['company'],
|
|
287
|
+
operation: ['enrich'],
|
|
288
288
|
},
|
|
289
289
|
},
|
|
290
290
|
default: '',
|
|
291
|
-
placeholder: 'e.g
|
|
291
|
+
placeholder: 'e.g. https://example.com',
|
|
292
292
|
description: 'The company website URL to enrich data for',
|
|
293
293
|
},
|
|
294
294
|
// Fields Parameter - Employee
|
|
@@ -298,13 +298,12 @@ class Coresignal {
|
|
|
298
298
|
type: 'string',
|
|
299
299
|
displayOptions: {
|
|
300
300
|
show: {
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
resource: ['employee'],
|
|
302
|
+
operation: ['get_by_id', 'get_by_slug'],
|
|
303
303
|
},
|
|
304
304
|
},
|
|
305
305
|
default: '',
|
|
306
|
-
|
|
307
|
-
placeholder: 'e.g., id,full_name,headline',
|
|
306
|
+
placeholder: 'e.g. full_name,headline',
|
|
308
307
|
description: 'Comma-separated list of fields to return (leave empty for all fields)',
|
|
309
308
|
},
|
|
310
309
|
// Fields Parameter - Company
|
|
@@ -314,13 +313,12 @@ class Coresignal {
|
|
|
314
313
|
type: 'string',
|
|
315
314
|
displayOptions: {
|
|
316
315
|
show: {
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
resource: ['company'],
|
|
317
|
+
operation: ['get_by_id', 'get_by_slug', 'enrich'],
|
|
319
318
|
},
|
|
320
319
|
},
|
|
321
320
|
default: '',
|
|
322
|
-
|
|
323
|
-
placeholder: 'e.g., id,company_name,website',
|
|
321
|
+
placeholder: 'e.g. company_name,website',
|
|
324
322
|
description: 'Comma-separated list of fields to return (leave empty for all fields)',
|
|
325
323
|
},
|
|
326
324
|
// Fields Parameter - Jobs
|
|
@@ -330,13 +328,12 @@ class Coresignal {
|
|
|
330
328
|
type: 'string',
|
|
331
329
|
displayOptions: {
|
|
332
330
|
show: {
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
resource: ['job'],
|
|
332
|
+
operation: ['get_by_id'],
|
|
335
333
|
},
|
|
336
334
|
},
|
|
337
335
|
default: '',
|
|
338
|
-
|
|
339
|
-
placeholder: 'e.g., id,title,company_name',
|
|
336
|
+
placeholder: 'e.g. title,company_name',
|
|
340
337
|
description: 'Comma-separated list of fields to return (leave empty for all fields)',
|
|
341
338
|
},
|
|
342
339
|
// Fields Parameter - Posts
|
|
@@ -346,13 +343,12 @@ class Coresignal {
|
|
|
346
343
|
type: 'string',
|
|
347
344
|
displayOptions: {
|
|
348
345
|
show: {
|
|
349
|
-
|
|
350
|
-
|
|
346
|
+
resource: ['post'],
|
|
347
|
+
operation: ['get_by_id'],
|
|
351
348
|
},
|
|
352
349
|
},
|
|
353
350
|
default: '',
|
|
354
|
-
|
|
355
|
-
placeholder: 'e.g., id,url,author_name',
|
|
351
|
+
placeholder: 'e.g. url,author_name',
|
|
356
352
|
description: 'Comma-separated list of fields to return (leave empty for all fields)',
|
|
357
353
|
},
|
|
358
354
|
// Elasticsearch DSL Query - Employee
|
|
@@ -363,8 +359,8 @@ class Coresignal {
|
|
|
363
359
|
required: true,
|
|
364
360
|
displayOptions: {
|
|
365
361
|
show: {
|
|
366
|
-
|
|
367
|
-
|
|
362
|
+
resource: ['employee'],
|
|
363
|
+
operation: ['search_es_dsl'],
|
|
368
364
|
},
|
|
369
365
|
},
|
|
370
366
|
default: '{"query": {"match_all": {}}}',
|
|
@@ -379,8 +375,8 @@ class Coresignal {
|
|
|
379
375
|
required: true,
|
|
380
376
|
displayOptions: {
|
|
381
377
|
show: {
|
|
382
|
-
|
|
383
|
-
|
|
378
|
+
resource: ['company'],
|
|
379
|
+
operation: ['search_es_dsl'],
|
|
384
380
|
},
|
|
385
381
|
},
|
|
386
382
|
default: '{"query": {"match_all": {}}}',
|
|
@@ -395,8 +391,8 @@ class Coresignal {
|
|
|
395
391
|
required: true,
|
|
396
392
|
displayOptions: {
|
|
397
393
|
show: {
|
|
398
|
-
|
|
399
|
-
|
|
394
|
+
resource: ['job'],
|
|
395
|
+
operation: ['search_es_dsl'],
|
|
400
396
|
},
|
|
401
397
|
},
|
|
402
398
|
default: '{"query": {"match_all": {}}}',
|
|
@@ -411,8 +407,8 @@ class Coresignal {
|
|
|
411
407
|
required: true,
|
|
412
408
|
displayOptions: {
|
|
413
409
|
show: {
|
|
414
|
-
|
|
415
|
-
|
|
410
|
+
resource: ['post'],
|
|
411
|
+
operation: ['search_es_dsl'],
|
|
416
412
|
},
|
|
417
413
|
},
|
|
418
414
|
default: '{"query": {"match_all": {}}}',
|
|
@@ -426,8 +422,8 @@ class Coresignal {
|
|
|
426
422
|
default: false,
|
|
427
423
|
displayOptions: {
|
|
428
424
|
show: {
|
|
429
|
-
|
|
430
|
-
|
|
425
|
+
resource: ['employee', 'company', 'job'],
|
|
426
|
+
operation: ['search_es_dsl'],
|
|
431
427
|
},
|
|
432
428
|
},
|
|
433
429
|
description: 'Whether to use preview endpoint (returns up to 20 results with essential data)',
|
|
@@ -442,27 +438,27 @@ class Coresignal {
|
|
|
442
438
|
const returnData = [];
|
|
443
439
|
for (let i = 0; i < items.length; i++) {
|
|
444
440
|
try {
|
|
445
|
-
const
|
|
441
|
+
const resource = this.getNodeParameter('resource', i);
|
|
446
442
|
const dataset = 'multi_source'; // Always use multi_source
|
|
447
|
-
const
|
|
443
|
+
const operation = this.getNodeParameter('operation', i);
|
|
448
444
|
let url = '';
|
|
449
445
|
let httpMethod = 'GET';
|
|
450
446
|
let body;
|
|
451
447
|
const qs = {};
|
|
452
448
|
// Build the data source string (e.g., "company_multi_source", "employee_multi_source")
|
|
453
449
|
// Posts use a different endpoint structure
|
|
454
|
-
const dataSource =
|
|
450
|
+
const dataSource = resource === 'post' ? 'employee_post' : `${resource}_${dataset}`;
|
|
455
451
|
const baseEndpoint = `/cdapi/v2/${dataSource}`;
|
|
456
|
-
switch (
|
|
457
|
-
case '
|
|
452
|
+
switch (operation) {
|
|
453
|
+
case 'get_by_id': {
|
|
458
454
|
let id;
|
|
459
|
-
if (
|
|
455
|
+
if (resource === 'company') {
|
|
460
456
|
id = this.getNodeParameter('companyId', i);
|
|
461
457
|
}
|
|
462
|
-
else if (
|
|
458
|
+
else if (resource === 'employee') {
|
|
463
459
|
id = this.getNodeParameter('employeeId', i);
|
|
464
460
|
}
|
|
465
|
-
else if (
|
|
461
|
+
else if (resource === 'job') {
|
|
466
462
|
id = this.getNodeParameter('jobId', i);
|
|
467
463
|
}
|
|
468
464
|
else {
|
|
@@ -476,7 +472,7 @@ class Coresignal {
|
|
|
476
472
|
}
|
|
477
473
|
break;
|
|
478
474
|
}
|
|
479
|
-
case '
|
|
475
|
+
case 'get_by_slug': {
|
|
480
476
|
const slug = this.getNodeParameter('slug', i);
|
|
481
477
|
url = `${baseEndpoint}/collect/${encodeURIComponent(slug)}`;
|
|
482
478
|
httpMethod = 'GET';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-coresignal-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "n8n community node for Coresignal API - access company, employee, job, and post data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"dev": "n8n-node dev",
|
|
23
23
|
"lint": "n8n-node lint",
|
|
24
24
|
"lintfix": "n8n-node lint --fix",
|
|
25
|
-
"
|
|
25
|
+
"release": "n8n-node release",
|
|
26
|
+
"prepublishOnly": "n8n-node prerelease"
|
|
26
27
|
},
|
|
27
28
|
"files": [
|
|
28
29
|
"dist"
|
|
@@ -38,10 +39,10 @@
|
|
|
38
39
|
]
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"@n8n/node-cli": "
|
|
42
|
+
"@n8n/node-cli": "0.23.0",
|
|
42
43
|
"eslint": "9.32.0",
|
|
43
|
-
"prettier": "3.
|
|
44
|
-
"typescript": "5.9.
|
|
44
|
+
"prettier": "3.8.1",
|
|
45
|
+
"typescript": "5.9.3"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
48
|
"n8n-workflow": "*"
|