MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / sendWorkspaceAdd

Function sendWorkspaceAdd

packages/server/src/enterprise/utils/sendEmail.ts:48–64  ·  view source on GitHub ↗
(email: string, workspaceName: string, dashboardLink: string)

Source from the content-addressed store, hash-verified

46}
47
48const sendWorkspaceAdd = async (email: string, workspaceName: string, dashboardLink: string) => {
49 let htmlToSend
50 let textContent
51
52 const template = getEmailTemplate('workspace_add_cloud.hbs', process.env.WORKSPACE_INVITE_TEMPLATE_PATH)
53 const compiledWorkspaceInviteTemplateSource = handlebars.compile(template)
54 htmlToSend = compiledWorkspaceInviteTemplateSource({ workspaceName, dashboardLink })
55 textContent = `You have been added to ${workspaceName}. Click here to visit your dashboard: ${dashboardLink}` // plain text body
56
57 await transporter.sendMail({
58 from: SENDER_EMAIL || '"FlowiseAI Team" <team@mail.flowiseai.com>', // sender address
59 to: email,
60 subject: `You have been added to ${workspaceName}`, // Subject line
61 text: textContent, // plain text body
62 html: htmlToSend // html body
63 })
64}
65
66const sendWorkspaceInvite = async (
67 email: string,

Callers 1

saveInviteAccountMethod · 0.90

Calls 1

getEmailTemplateFunction · 0.85

Tested by

no test coverage detected