feat: Human in the loop (#10675)

Co-authored-by: Giulio Andreini <g.andreini@gmail.com>
This commit is contained in:
Michael Kret
2024-10-07 16:45:22 +03:00
committed by GitHub
parent d2713ae50a
commit 41228b472d
24 changed files with 1298 additions and 196 deletions

View File

@@ -18,20 +18,6 @@ import { DateTime } from 'luxon';
import isEmpty from 'lodash/isEmpty';
export interface IEmail {
from?: string;
to?: string;
cc?: string;
bcc?: string;
replyTo?: string;
inReplyTo?: string;
reference?: string;
subject: string;
body: string;
htmlBody?: string;
attachments?: IDataObject[];
}
export interface IAttachments {
type: string;
name: string;
@@ -40,6 +26,8 @@ export interface IAttachments {
import MailComposer from 'nodemailer/lib/mail-composer';
import { getGoogleAccessToken } from '../GenericFunctions';
import { escapeHtml } from '../../../utils/utilities';
import type { IEmail } from '../../../utils/sendAndWait/interfaces';
export async function googleApiRequest(
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
@@ -516,22 +504,7 @@ export function unescapeSnippets(items: INodeExecutionData[]) {
const result = items.map((item) => {
const snippet = item.json.snippet as string;
if (snippet) {
item.json.snippet = snippet.replace(/&amp;|&lt;|&gt;|&#39;|&quot;/g, (match) => {
switch (match) {
case '&amp;':
return '&';
case '&lt;':
return '<';
case '&gt;':
return '>';
case '&#39;':
return "'";
case '&quot;':
return '"';
default:
return match;
}
});
item.json.snippet = escapeHtml(snippet);
}
return item;
});