Add In-Reply-To to Email Workflow Node (#18641)
Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
+1
@@ -89,6 +89,7 @@ export class DraftEmailTool implements Tool {
|
||||
body: data.plainTextBody,
|
||||
html: data.sanitizedHtmlBody,
|
||||
attachments: data.attachments,
|
||||
inReplyTo: data.inReplyTo,
|
||||
},
|
||||
data.connectedAccount,
|
||||
);
|
||||
|
||||
+2
-1
@@ -214,7 +214,7 @@ export class EmailComposerService {
|
||||
context: ToolExecutionContext,
|
||||
): Promise<EmailComposerResult> {
|
||||
const { workspaceId } = context;
|
||||
const { subject, body, files } = parameters;
|
||||
const { subject, body, files, inReplyTo } = parameters;
|
||||
let { connectedAccountId } = parameters;
|
||||
|
||||
let recipients: { to: string[]; cc: string[]; bcc: string[] };
|
||||
@@ -309,6 +309,7 @@ export class EmailComposerService {
|
||||
sanitizedHtmlBody,
|
||||
attachments,
|
||||
connectedAccount: connectedAccountWithFreshTokens,
|
||||
inReplyTo,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
+6
@@ -37,4 +37,10 @@ export const EmailToolInputZodSchema = z.object({
|
||||
.describe('Array of file objects to attach to the email')
|
||||
.optional()
|
||||
.default([]),
|
||||
inReplyTo: z
|
||||
.string()
|
||||
.describe(
|
||||
'The RFC 2822 Message-ID of an existing email to reply to. When provided, the email is sent as a reply in the same thread.',
|
||||
)
|
||||
.optional(),
|
||||
});
|
||||
|
||||
+1
@@ -88,6 +88,7 @@ export class SendEmailTool implements Tool {
|
||||
body: data.plainTextBody,
|
||||
html: data.sanitizedHtmlBody,
|
||||
attachments: data.attachments,
|
||||
inReplyTo: data.inReplyTo,
|
||||
},
|
||||
data.connectedAccount,
|
||||
);
|
||||
|
||||
+1
@@ -9,4 +9,5 @@ export type ComposedEmail = {
|
||||
sanitizedHtmlBody: string;
|
||||
attachments: MessageAttachment[];
|
||||
connectedAccount: ConnectedAccountWorkspaceEntity;
|
||||
inReplyTo?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user