Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/continue on fail #1737

Closed
wants to merge 167 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
7a0f1f3
Update Compression node
MedAliMarz Apr 22, 2021
b0b27d1
Update Crypto node
MedAliMarz Apr 22, 2021
6f0f26b
Update DateTime node
MedAliMarz Apr 22, 2021
330deb9
Update EditImage node
MedAliMarz Apr 22, 2021
45de117
Update EmailSend node
MedAliMarz Apr 22, 2021
4d61f67
Update ExecuteWorkflow node
MedAliMarz Apr 22, 2021
8429060
Update FTP node
MedAliMarz Apr 22, 2021
fb20473
Update Function node
MedAliMarz Apr 22, 2021
cfbf19d
Update FunctionItem node
MedAliMarz Apr 22, 2021
12883db
Update ExecuteCommand node
MedAliMarz Apr 22, 2021
c77934a
Update OpenWeatherMap node
MedAliMarz Apr 22, 2021
d878171
Update ReadBinaryFile node
MedAliMarz Apr 22, 2021
5383335
Update ReadPdf node
MedAliMarz Apr 22, 2021
9316802
Update RssFeedRead node & add URL validation
MedAliMarz Apr 22, 2021
6fc3ead
Update SpreadsheetFile node
MedAliMarz Apr 26, 2021
2165ab2
Update Switch node
MedAliMarz Apr 26, 2021
81380da
Update WriteBinaryFile node
MedAliMarz Apr 26, 2021
63e0444
Update Xml node
MedAliMarz Apr 26, 2021
c95fe60
Update ActiveCampaign node
MedAliMarz Apr 26, 2021
e205901
Update Airtable node
MedAliMarz Apr 26, 2021
b8b18cb
Update ApiTemplateIo node
MedAliMarz Apr 27, 2021
65da48c
Update Asana node
MedAliMarz Apr 27, 2021
2698d63
Update AwsLambda node
MedAliMarz Apr 27, 2021
239b060
Update AwsSns node
MedAliMarz Apr 27, 2021
907e110
Update AwsComprehend node
MedAliMarz Apr 27, 2021
95475ba
Update AwsRekognition node
MedAliMarz Apr 27, 2021
bdbad6e
Update AwsS3 node
MedAliMarz Apr 27, 2021
7985690
Fix Error item
MedAliMarz Apr 27, 2021
44e0964
Update AwsSes node
MedAliMarz Apr 27, 2021
311ce8a
Update AwsSqs node
MedAliMarz Apr 27, 2021
d26c9b0
Update Amqp node
MedAliMarz Apr 27, 2021
d5601fd
Update Bitly node
MedAliMarz Apr 27, 2021
99a8050
Update Box node
MedAliMarz Apr 27, 2021
c36ee40
Update Brandfetch node
MedAliMarz Apr 27, 2021
ed18200
Update CircleCi node
MedAliMarz Apr 27, 2021
a12bcb7
Update Clearbit node
MedAliMarz Apr 27, 2021
1f406c3
Update ClickUp node
MedAliMarz Apr 27, 2021
1528210
Update Cockpit node
MedAliMarz Apr 27, 2021
30db7e2
Update CoinGecko node
MedAliMarz Apr 27, 2021
b3edac3
Update Contentful node
MedAliMarz Apr 27, 2021
1409e57
Update ConvertKit node
MedAliMarz Apr 27, 2021
8cda9b0
Update Cortex node
MedAliMarz Apr 27, 2021
c79d29f
Update CustomerIo node
MedAliMarz Apr 27, 2021
d9da5d6
Update DeepL node
MedAliMarz Apr 27, 2021
d41949d
Update Demio node
MedAliMarz Apr 27, 2021
a938060
Update Disqus node
MedAliMarz Apr 27, 2021
6bc4d00
Update Drift node
MedAliMarz Apr 27, 2021
11ab09e
Update Dropbox node
MedAliMarz Apr 27, 2021
aa96718
Update GetResponse node
MedAliMarz Apr 28, 2021
d206623
Refactor & Update Ghost node
MedAliMarz Apr 28, 2021
7fae506
Update Github node
MedAliMarz Apr 28, 2021
284da8a
Update Gitlab node
MedAliMarz Apr 28, 2021
cd4d9ce
Update GoogleAnalytics node
MedAliMarz Apr 28, 2021
b78361d
Update GoogleBooks node
MedAliMarz Apr 28, 2021
a731a93
Update GoogleCalendar node
MedAliMarz Apr 28, 2021
f986b9d
Update GoogleDrive node
MedAliMarz Apr 28, 2021
da0633c
Update Gmail node
MedAliMarz Apr 28, 2021
6fea56d
Merge remote-tracking branch 'upstream/master' into fix/continue_on_e…
MedAliMarz Apr 28, 2021
ba63f19
Update GoogleSheets node
MedAliMarz Apr 28, 2021
6cd0d34
Update GoogleSlides node
MedAliMarz Apr 28, 2021
5a04aa4
Update GoogleTasks node
MedAliMarz Apr 28, 2021
703044f
Update Gotify node
MedAliMarz Apr 28, 2021
8496529
Update GraphQL node
MedAliMarz Apr 28, 2021
c634695
Update HackerNews node
MedAliMarz Apr 28, 2021
16e25ae
Update Harvest node
MedAliMarz Apr 28, 2021
ca97705
Update HtmlExtract node
MedAliMarz Apr 28, 2021
a829868
Update Hubspot node
MedAliMarz Apr 28, 2021
4824fb6
Update Hunter node
MedAliMarz Apr 28, 2021
b7034ba
Update Intercom node
MedAliMarz Apr 28, 2021
5195adc
Update Kafka node
MedAliMarz Apr 28, 2021
9e09a74
Refactor & update Line node
MedAliMarz Apr 28, 2021
d68cee2
Update LinkedIn node
MedAliMarz Apr 29, 2021
bdd3743
Update Mailchimp node
MedAliMarz Apr 29, 2021
b180d6b
Update Mandrill node
MedAliMarz Apr 29, 2021
23162f9
Update Matrix node
MedAliMarz Apr 29, 2021
bfdbc54
Update Mautic node
MedAliMarz Apr 29, 2021
6c69825
Update Medium node
MedAliMarz Apr 29, 2021
7b1d774
Update MessageBird node
MedAliMarz Apr 29, 2021
d2fcecd
Update Mindee node
MedAliMarz Apr 29, 2021
3e249bb
Update Mocean node
MedAliMarz Apr 29, 2021
419b7d8
Update MondayCom node
MedAliMarz Apr 29, 2021
88dd389
Update MicrosoftExcel node
MedAliMarz Apr 29, 2021
6209836
Update MicrosoftOneDrive node
MedAliMarz Apr 29, 2021
bff234a
Update MicrosoftOutlook node
MedAliMarz Apr 29, 2021
f471b72
Update Affinity node
MedAliMarz Apr 30, 2021
078a3af
Update Chargebee node
MedAliMarz Apr 30, 2021
be4c713
Update Discourse node
MedAliMarz Apr 30, 2021
284d5cc
Update Freshdesk node
MedAliMarz Apr 30, 2021
080a836
Update YouTube node
MedAliMarz Apr 30, 2021
4e584c7
Update InvoiceNinja node
MedAliMarz Apr 30, 2021
25a6044
Update MailerLite node
MedAliMarz Apr 30, 2021
99b0946
Update Mailgun node
MedAliMarz Apr 30, 2021
79fe29f
Update Mailjet node
MedAliMarz Apr 30, 2021
507da37
Update Mattermost node
MedAliMarz May 3, 2021
2e7e65b
Update Nasa node
MedAliMarz May 3, 2021
7eba005
Update NextCloud node
MedAliMarz May 3, 2021
c10a613
Update OpenThesaurus node
MedAliMarz May 3, 2021
6ed9022
Fix merge conflict in ExecuteWorkflow, Ftp, GoogleCalendarGoogleDrive…
MedAliMarz May 3, 2021
68f9978
Update Orbit node
MedAliMarz May 3, 2021
34309a7
Update PagerDuty node
MedAliMarz May 3, 2021
d4654a3
Update PayPal node
MedAliMarz May 3, 2021
b218624
Update Peekalink node
MedAliMarz May 3, 2021
fe4ccda
Update Phantombuster node
MedAliMarz May 3, 2021
f7dbc14
Update PostHog node
MedAliMarz May 3, 2021
d69422f
Update ProfitWell node
MedAliMarz May 3, 2021
cd074f7
Refactor & Update Pushbullet node
MedAliMarz May 3, 2021
edc93a2
Update QuickBooks node
MedAliMarz May 3, 2021
028e4ee
Update Raindrop node
MedAliMarz May 3, 2021
e0a3002
Update Reddit node
MedAliMarz May 3, 2021
bed7d2e
Update Rocketchat node
MedAliMarz May 3, 2021
742326c
Update S3 node
MedAliMarz May 3, 2021
16dc7d7
Update Salesforce node
MedAliMarz May 3, 2021
2598c92
Update SendGrid node
MedAliMarz May 3, 2021
4df60d1
Update SentryIo node
MedAliMarz May 3, 2021
b096a8a
Update Shopify node
MedAliMarz May 3, 2021
f23c7dc
Update Signl4 node
MedAliMarz May 3, 2021
c9b1ead
Update Slack node
MedAliMarz May 3, 2021
66f3d41
Update Spontit node
MedAliMarz May 3, 2021
e424d2f
Update Spotify node
MedAliMarz May 3, 2021
cd7f399
Update Storyblok node
MedAliMarz May 3, 2021
466309a
Refactor & Update Strapi node
MedAliMarz May 3, 2021
69ebef5
Refactor & Update Strava node
MedAliMarz May 3, 2021
0a45854
Update Taiga node
MedAliMarz May 4, 2021
f817844
Refactor & update Tapfiliate node
MedAliMarz May 4, 2021
fce8a52
Update Telegram node
MedAliMarz May 4, 2021
30acb40
Update TheHive node
MedAliMarz May 4, 2021
f0409c3
Update Todoist node
MedAliMarz May 4, 2021
38bc638
Update TravisCi node
MedAliMarz May 4, 2021
0e7ca2e
Update Trello node
MedAliMarz May 4, 2021
ccf0ff4
Update Twilio node
MedAliMarz May 4, 2021
00fd6b6
Update Twist node
MedAliMarz May 4, 2021
a905a1b
Update Twitter node
MedAliMarz May 4, 2021
850a3bc
Update Uplead node
MedAliMarz May 4, 2021
b6192d0
Update UProc node
MedAliMarz May 4, 2021
b1c3a0e
Update Vero node
MedAliMarz May 4, 2021
6c86f14
Update Webflow node
MedAliMarz May 4, 2021
5852aff
Update Wekan node
MedAliMarz May 4, 2021
5e5bb52
Update Wordpress node
MedAliMarz May 4, 2021
9ed4972
Update Xero node
MedAliMarz May 4, 2021
c0ec990
Update Yourls node
MedAliMarz May 4, 2021
fb007ce
Update Zendesk node
MedAliMarz May 4, 2021
ee64144
Update ZohoCrm node
MedAliMarz May 4, 2021
bc90eb5
Refactor & Update Zoom node
MedAliMarz May 4, 2021
1a6331d
Update Zulip node
MedAliMarz May 4, 2021
ddd88f5
Update Clockify node
MedAliMarz May 4, 2021
70475ef
Update MongoDb node
MedAliMarz May 4, 2021
c866723
Update MySql node
MedAliMarz May 4, 2021
f88b770
Update MicrosoftTeams node
MedAliMarz May 4, 2021
0b29a27
Update Stackby node
MedAliMarz May 4, 2021
6bd86bc
Refactor Discourse node
MedAliMarz May 5, 2021
7844e15
Support corner-case in Github node update
MedAliMarz May 5, 2021
0d07da4
Support corner-case in Gitlab node update
MedAliMarz May 5, 2021
78e383d
Refactor & Update GoogleContacts node
MedAliMarz May 5, 2021
5767233
Refactor Mindee node
MedAliMarz May 5, 2021
9f752a5
Update Coda node
MedAliMarz May 5, 2021
c37cba7
Lint fixes
MedAliMarz May 7, 2021
e0910b1
Fix merge conflict in SpreadsheetFile, Mailjet, GoogleAnalytics, AwsC…
MedAliMarz May 10, 2021
076d872
Fix merge conflict in Spotify node
MedAliMarz May 17, 2021
62e36a1
Update Beeminder node
MedAliMarz May 17, 2021
c1caca0
Update Google Firebase RealtimeDatabase node
MedAliMarz May 17, 2021
c5c5ce4
Update HelpScout node
MedAliMarz May 17, 2021
8d8d2cc
Update Mailcheck node
MedAliMarz May 17, 2021
69b870e
Update Paddle node
MedAliMarz May 17, 2021
3e77ec7
Update Pipedrive node
MedAliMarz May 17, 2021
af4ec7a
Update Pushover node
MedAliMarz May 17, 2021
a41198b
Update Segment node
MedAliMarz May 17, 2021
ecc3106
Refactor & Update Vonage node
MedAliMarz May 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,269 changes: 639 additions & 630 deletions packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts

Large diffs are not rendered by default.

346 changes: 177 additions & 169 deletions packages/nodes-base/nodes/Affinity/Affinity.node.ts

Large diffs are not rendered by default.

249 changes: 145 additions & 104 deletions packages/nodes-base/nodes/Airtable/Airtable.node.ts
Expand Up @@ -466,92 +466,114 @@ export class Airtable implements INodeType {
let options: IDataObject;

for (let i = 0; i < items.length; i++) {
addAllFields = this.getNodeParameter('addAllFields', i) as boolean;
options = this.getNodeParameter('options', i, {}) as IDataObject;
try {
addAllFields = this.getNodeParameter('addAllFields', i) as boolean;
options = this.getNodeParameter('options', i, {}) as IDataObject;

if (addAllFields === true) {
// Add all the fields the item has
body.fields = items[i].json;
} else {
// Add only the specified fields
body.fields = {} as IDataObject;

fields = this.getNodeParameter('fields', i, []) as string[];

for (const fieldName of fields) {
// @ts-ignore
body.fields[fieldName] = items[i].json[fieldName];
}
}

if (addAllFields === true) {
// Add all the fields the item has
body.fields = items[i].json;
} else {
// Add only the specified fields
body.fields = {} as IDataObject;
if (options.typecast === true) {
body['typecast'] = true;
}

fields = this.getNodeParameter('fields', i, []) as string[];
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

for (const fieldName of fields) {
// @ts-ignore
body.fields[fieldName] = items[i].json[fieldName];
returnData.push(responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
}

if (options.typecast === true) {
body['typecast'] = true;
}

responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

returnData.push(responseData);
}

} else if (operation === 'delete') {
requestMethod = 'DELETE';

let id: string;
for (let i = 0; i < items.length; i++) {
id = this.getNodeParameter('id', i) as string;

endpoint = `${application}/${table}`;

// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.
qs.records = [id];

responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

returnData.push(...responseData.records);
try {
id = this.getNodeParameter('id', i) as string;

endpoint = `${application}/${table}`;

// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.
qs.records = [id];

responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

returnData.push(...responseData.records);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
}
}

} else if (operation === 'list') {
// ----------------------------------
// list
// ----------------------------------
try {
requestMethod = 'GET';
endpoint = `${application}/${table}`;

requestMethod = 'GET';
endpoint = `${application}/${table}`;
returnAll = this.getNodeParameter('returnAll', 0) as boolean;

returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const downloadAttachments = this.getNodeParameter('downloadAttachments', 0) as boolean;

const downloadAttachments = this.getNodeParameter('downloadAttachments', 0) as boolean;
const additionalOptions = this.getNodeParameter('additionalOptions', 0, {}) as IDataObject;

const additionalOptions = this.getNodeParameter('additionalOptions', 0, {}) as IDataObject;
for (const key of Object.keys(additionalOptions)) {
if (key === 'sort' && (additionalOptions.sort as IDataObject).property !== undefined) {
qs[key] = (additionalOptions[key] as IDataObject).property;
} else {
qs[key] = additionalOptions[key];
}
}

for (const key of Object.keys(additionalOptions)) {
if (key === 'sort' && (additionalOptions.sort as IDataObject).property !== undefined) {
qs[key] = (additionalOptions[key] as IDataObject).property;
if (returnAll === true) {
responseData = await apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
} else {
qs[key] = additionalOptions[key];
qs.maxRecords = this.getNodeParameter('limit', 0) as number;
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);
}
}

if (returnAll === true) {
responseData = await apiRequestAllItems.call(this, requestMethod, endpoint, body, qs);
} else {
qs.maxRecords = this.getNodeParameter('limit', 0) as number;
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);
}
returnData.push.apply(returnData, responseData.records);

returnData.push.apply(returnData, responseData.records);

if (downloadAttachments === true) {
const downloadFieldNames = (this.getNodeParameter('downloadFieldNames', 0) as string).split(',');
const data = await downloadRecordAttachments.call(this, responseData.records, downloadFieldNames);
return [data];
if (downloadAttachments === true) {
const downloadFieldNames = (this.getNodeParameter('downloadFieldNames', 0) as string).split(',');
const data = await downloadRecordAttachments.call(this, responseData.records, downloadFieldNames);
return [data];
}
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
} else {
throw error;
}
}

} else if (operation === 'read') {
// ----------------------------------
// read
Expand All @@ -561,21 +583,28 @@ export class Airtable implements INodeType {

let id: string;
for (let i = 0; i < items.length; i++) {
try {
id = this.getNodeParameter('id', i) as string;

id = this.getNodeParameter('id', i) as string;
endpoint = `${application}/${table}/${id}`;

endpoint = `${application}/${table}/${id}`;
// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.

// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.
responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

responseData = await apiRequest.call(this, requestMethod, endpoint, body, qs);

returnData.push(responseData);
returnData.push(responseData);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
}
}

} else if (operation === 'update') {
Expand All @@ -590,54 +619,66 @@ export class Airtable implements INodeType {
let fields: string[];
let options: IDataObject;
for (let i = 0; i < items.length; i++) {
updateAllFields = this.getNodeParameter('updateAllFields', i) as boolean;
options = this.getNodeParameter('options', i, {}) as IDataObject;

if (updateAllFields === true) {
// Update all the fields the item has
body.fields = items[i].json;

if (options.ignoreFields && options.ignoreFields !== '') {
const ignoreFields = (options.ignoreFields as string).split(',').map(field => field.trim()).filter(field => !!field);
if (ignoreFields.length) {
// From: https://stackoverflow.com/questions/17781472/how-to-get-a-subset-of-a-javascript-objects-properties
body.fields = Object.entries(items[i].json)
.filter(([key]) => !ignoreFields.includes(key))
.reduce((obj, [key, val]) => Object.assign(obj, { [key]: val }), {});
try {
updateAllFields = this.getNodeParameter('updateAllFields', i) as boolean;
options = this.getNodeParameter('options', i, {}) as IDataObject;

if (updateAllFields === true) {
// Update all the fields the item has
body.fields = items[i].json;

if (options.ignoreFields && options.ignoreFields !== '') {
const ignoreFields = (options.ignoreFields as string).split(',').map(field => field.trim()).filter(field => !!field);
if (ignoreFields.length) {
// From: https://stackoverflow.com/questions/17781472/how-to-get-a-subset-of-a-javascript-objects-properties
body.fields = Object.entries(items[i].json)
.filter(([key]) => !ignoreFields.includes(key))
.reduce((obj, [key, val]) => Object.assign(obj, { [key]: val }), {});
}
}
}
} else {
// Update only the specified fields
body.fields = {} as IDataObject;
} else {
// Update only the specified fields
body.fields = {} as IDataObject;

fields = this.getNodeParameter('fields', i, []) as string[];
fields = this.getNodeParameter('fields', i, []) as string[];

for (const fieldName of fields) {
// @ts-ignore
body.fields[fieldName] = items[i].json[fieldName];
for (const fieldName of fields) {
// @ts-ignore
body.fields[fieldName] = items[i].json[fieldName];
}
}
}

id = this.getNodeParameter('id', i) as string;
id = this.getNodeParameter('id', i) as string;

endpoint = `${application}/${table}`;
endpoint = `${application}/${table}`;

// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.
// Make one request after another. This is slower but makes
// sure that we do not run into the rate limit they have in
// place and so block for 30 seconds. Later some global
// functionality in core should make it easy to make requests
// according to specific rules like not more than 5 requests
// per seconds.

const data = { records: [{ id, fields: body.fields }], typecast: (options.typecast) ? true : false };
const data = { records: [{ id, fields: body.fields }], typecast: (options.typecast) ? true : false };

responseData = await apiRequest.call(this, requestMethod, endpoint, data, qs);
responseData = await apiRequest.call(this, requestMethod, endpoint, data, qs);

returnData.push(...responseData.records);
returnData.push(...responseData.records);
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
}
}

} else {
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
if (this.continueOnFail()) {
returnData.push({ error: `The operation "${operation}" is not known!` });
} else {
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
}
}

return [this.helpers.returnJsonArray(returnData)];
Expand Down