fix: Add paired item to the most used nodes (#5220)

* PairedItem for N8n training

* Add paired item to ftp node

* Add paired item to rocketChat

* Add pairedItem to pushOver

* Add paired item to Matrix

* Add pairedItem to theHive

* Add paired item to Snowflake

* Add paired item to PhilipsHue

* Add pairedItem to supabase

* Add paired item to Odoo

* fix odoo & add paired item to grist

* add pairedItem to Linkedin

* add pairedItem Zulip

* add pairedItem PhatomBuster

* add pairedItem to TodoistV2

* Add pairedItem HomeAssistant

* Add pairedItem to DropContact

* Add pairedItem to Aws SES

* Add pairedItem to microsoftOutlook

* Add pairedItem to AwsS3

* Add pairedItem to Aws DynamoDB

* 🐛 fix Dropcontact enrich operation paired item support

* 🐛 fix Dropcontact insert/update operation paired items

* 🐛 fix Supabase paired item support

* 🐛 fix Supabase paired item support

* 🐛 fix N8nTrainingCustomerDatastore paired item support

* 🎨 remove unused imports

* 🐛 fix MicrosoftOutlook paired item support

* 🐛 fix AwsS3 paired item support

---------

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
agobrech
2023-01-31 20:39:20 +01:00
committed by GitHub
parent d87ff130a4
commit 409a9ea357
24 changed files with 661 additions and 253 deletions

View File

@@ -180,7 +180,7 @@ export class HomeAssistant implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
const returnData: IDataObject[] = [];
const returnData: INodeExecutionData[] = [];
const length = items.length;
const resource = this.getNodeParameter('resource', 0);
const operation = this.getNodeParameter('operation', 0);
@@ -442,22 +442,27 @@ export class HomeAssistant implements INodeType {
if (resource === 'cameraProxy' && operation === 'get') {
items[i].json = { error: error.message };
} else {
returnData.push({ error: error.message });
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray({ error: error.message }),
{ itemData: { item: i } },
);
returnData.push(...executionData);
}
continue;
}
throw error;
}
Array.isArray(responseData)
? returnData.push(...responseData)
: returnData.push(responseData);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData),
{ itemData: { item: i } },
);
returnData.push(...executionData);
}
if (resource === 'cameraProxy' && operation === 'getScreenshot') {
return this.prepareOutputData(items);
} else {
return [this.helpers.returnJsonArray(returnData)];
return this.prepareOutputData(returnData);
}
}
}