mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat(Gmail Node): Add thread option for draft emails (#8729)
Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
This commit is contained in:
@@ -528,6 +528,7 @@ export class GmailV2 implements INodeType {
|
||||
let cc = '';
|
||||
let bcc = '';
|
||||
let replyTo = '';
|
||||
let threadId = null;
|
||||
|
||||
if (options.sendTo) {
|
||||
to += prepareEmailsInput.call(this, options.sendTo as string, 'To', i);
|
||||
@@ -545,6 +546,10 @@ export class GmailV2 implements INodeType {
|
||||
replyTo = prepareEmailsInput.call(this, options.replyTo as string, 'ReplyTo', i);
|
||||
}
|
||||
|
||||
if (options.threadId && typeof options.threadId === 'string') {
|
||||
threadId = options.threadId;
|
||||
}
|
||||
|
||||
let attachments: IDataObject[] = [];
|
||||
if (options.attachmentsUi) {
|
||||
attachments = await prepareEmailAttachments.call(
|
||||
@@ -574,6 +579,7 @@ export class GmailV2 implements INodeType {
|
||||
const body = {
|
||||
message: {
|
||||
raw: await encodeEmail(email),
|
||||
threadId: threadId || undefined,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user