mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Allow Gmail node to send messages formatted as HTML (#1285)
* Allowing Gmail node to send messages formatted as HTML * Improving message field description * Fixing lint issues * Adding missing trailing comma * ⚡ Small improvements to GMail-Node Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -52,6 +52,7 @@ export interface IEmail {
|
||||
reference?: string;
|
||||
subject: string;
|
||||
body: string;
|
||||
htmlBody?: string;
|
||||
attachments?: IDataObject[];
|
||||
}
|
||||
|
||||
@@ -325,6 +326,10 @@ export class Gmail implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
endpoint = '/gmail/v1/users/me/messages/send';
|
||||
method = 'POST';
|
||||
|
||||
@@ -420,6 +425,10 @@ export class Gmail implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
endpoint = '/gmail/v1/users/me/messages/send';
|
||||
method = 'POST';
|
||||
|
||||
@@ -620,6 +629,10 @@ export class Gmail implements INodeType {
|
||||
attachments: attachmentsList,
|
||||
};
|
||||
|
||||
if (this.getNodeParameter('includeHtml', i, false) as boolean === true) {
|
||||
email.htmlBody = this.getNodeParameter('htmlMessage', i) as string;
|
||||
}
|
||||
|
||||
endpoint = '/gmail/v1/users/me/drafts';
|
||||
method = 'POST';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user