mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
fix(Node Gmail): fixed bug related to paired items
This commit is contained in:
@@ -508,7 +508,7 @@ export class Gmail implements INodeType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
responseData = nodeExecutionData;
|
responseData = [nodeExecutionData];
|
||||||
}
|
}
|
||||||
if (operation === 'getAll') {
|
if (operation === 'getAll') {
|
||||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||||
@@ -734,7 +734,7 @@ export class Gmail implements INodeType {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
responseData = nodeExecutionData;
|
responseData = [nodeExecutionData];
|
||||||
}
|
}
|
||||||
if (operation === 'delete') {
|
if (operation === 'delete') {
|
||||||
// https://developers.google.com/gmail/api/v1/reference/users/drafts/delete
|
// https://developers.google.com/gmail/api/v1/reference/users/drafts/delete
|
||||||
@@ -819,17 +819,22 @@ export class Gmail implements INodeType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let executionData = responseData as INodeExecutionData[];
|
let executionData = responseData as INodeExecutionData[];
|
||||||
if (!['draft', 'message'].includes(resource) && !['get', 'getAll'].includes(operation)) {
|
|
||||||
|
if (!['get', 'getAll'].includes(operation) || resource === 'label') {
|
||||||
executionData = this.helpers.constructExecutionMetaData(
|
executionData = this.helpers.constructExecutionMetaData(
|
||||||
this.helpers.returnJsonArray(responseData),
|
this.helpers.returnJsonArray(responseData),
|
||||||
{ itemData: { item: i } },
|
{ itemData: { item: i } },
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
executionData = this.helpers.constructExecutionMetaData(executionData, {
|
||||||
|
itemData: { item: i },
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
returnData.push(...executionData);
|
returnData.push(...executionData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (this.continueOnFail()) {
|
if (this.continueOnFail()) {
|
||||||
returnData.push({json:{ error: error.message }});
|
returnData.push({ json: { error: error.message } });
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
Reference in New Issue
Block a user