feat(bot): ⚡️ Add attachment in emails
This commit is contained in:
@ -61,7 +61,7 @@ export const FileUploadForm = ({
|
||||
files: [
|
||||
{
|
||||
file,
|
||||
path: `public/results/${resultId}/${id}`,
|
||||
path: `public/results/${resultId}/${id}/${file.name}`,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
@ -306,6 +306,7 @@ const sendEmail = async (
|
||||
cc: (options.cc ?? []).map(parseVariables(variables)),
|
||||
bcc: (options.bcc ?? []).map(parseVariables(variables)),
|
||||
replyTo: replyTo !== '' ? replyTo : undefined,
|
||||
fileUrls: variables.find(byId(options.attachmentsVariableId))?.value,
|
||||
isCustomBody: options.isCustomBody,
|
||||
isBodyCode: options.isBodyCode,
|
||||
resultValues,
|
||||
|
@ -11,6 +11,7 @@ export const sendEmailOptionsSchema = z.object({
|
||||
replyTo: z.string().optional(),
|
||||
cc: z.array(z.string()).optional(),
|
||||
bcc: z.array(z.string()).optional(),
|
||||
attachmentsVariableId: z.string().optional(),
|
||||
})
|
||||
|
||||
export const sendEmailBlockSchema = blockBaseSchema.and(
|
||||
|
Reference in New Issue
Block a user