mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(Node Gmail): fixed bug related to paired items
This commit is contained in:
parent
71cae90679
commit
2746905570
|
@ -508,7 +508,7 @@ export class Gmail implements INodeType {
|
|||
};
|
||||
}
|
||||
|
||||
responseData = nodeExecutionData;
|
||||
responseData = [nodeExecutionData];
|
||||
}
|
||||
if (operation === 'getAll') {
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
@ -734,7 +734,7 @@ export class Gmail implements INodeType {
|
|||
};
|
||||
}
|
||||
|
||||
responseData = nodeExecutionData;
|
||||
responseData = [nodeExecutionData];
|
||||
}
|
||||
if (operation === 'delete') {
|
||||
// https://developers.google.com/gmail/api/v1/reference/users/drafts/delete
|
||||
|
@ -819,11 +819,16 @@ export class Gmail implements INodeType {
|
|||
}
|
||||
|
||||
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(
|
||||
this.helpers.returnJsonArray(responseData),
|
||||
{ itemData: { item: i } },
|
||||
);
|
||||
} else {
|
||||
executionData = this.helpers.constructExecutionMetaData(executionData, {
|
||||
itemData: { item: i },
|
||||
});
|
||||
}
|
||||
|
||||
returnData.push(...executionData);
|
||||
|
|
Loading…
Reference in a new issue