55export interface WorkflowAppReviewEmailTemplate {
66 subject : string ;
77 body : {
8- mainMessage : string ;
8+ greeting : string ;
9+ thanksMessage : string ;
10+ reviewMessage : string ;
911 templateLinkLabel : string ;
1012 discordMessage : string ;
1113 discordLink : string ;
14+ closingThanks : string ;
15+ closingMessage : string ;
1216 } ;
1317}
1418
1519/**
1620 * Email template for workflow app review submission
1721 */
1822export const WORKFLOW_APP_REVIEW_EMAIL_TEMPLATE : WorkflowAppReviewEmailTemplate = {
19- subject : 'Template Submitted for Review ' ,
23+ subject : 'Your template "{{template_name}}" is under review ' ,
2024 body : {
21- mainMessage :
22- 'Your template "{{template_name}}" has been submitted for review. We will complete the review within 24 hours.' ,
23- templateLinkLabel : 'Template:' ,
24- discordMessage : 'Join our Discord to track your review status and connect with other creators.' ,
25- discordLink : 'Discord:https://discord.com/invite/bWjffrb89h' ,
25+ greeting : 'Hi Creator,' ,
26+ thanksMessage : 'Thanks for submitting your template "{{template_name}}" to Refly.ai! 🎉' ,
27+ reviewMessage :
28+ "Our team has received your submission and the review process has officially begun. We typically complete the review. You'll receive another email once the review is done." ,
29+ templateLinkLabel : 'Template link:' ,
30+ discordMessage :
31+ "If you'd like to track your review status or get feedback from other creators, feel free to join our Discord community — it's the fastest place to stay updated." ,
32+ discordLink : 'Join Discord: https://discord.com/invite/bWjffrb89h' ,
33+ closingThanks : 'Thanks again for contributing to the Refly community.' ,
34+ closingMessage : "We can't wait to see what you've built!" ,
2635 } ,
2736} ;
2837
2938/**
3039 * Generate HTML email content for workflow app review notification
3140 * @param templateName - Name of the template
3241 * @param templateLink - Link to the template
42+ * @param note - Optional note/remark to include in the email
3343 * @returns HTML string for email
3444 */
3545export function generateWorkflowAppReviewEmailHTML (
3646 templateName : string ,
3747 templateLink : string ,
48+ note ?: string ,
3849) : string {
3950 const template = WORKFLOW_APP_REVIEW_EMAIL_TEMPLATE ;
40- const mainMessage = template . body . mainMessage . replace ( '{{template_name}}' , templateName ) ;
51+ const subject = template . subject . replace ( '{{template_name}}' , templateName ) ;
52+ const greeting = template . body . greeting ;
53+ const thanksMessage = template . body . thanksMessage . replace ( '{{template_name}}' , templateName ) ;
54+ const reviewMessage = template . body . reviewMessage ;
55+ const templateLinkLabel = template . body . templateLinkLabel ;
56+ const discordMessage = template . body . discordMessage ;
57+ const discordLink = template . body . discordLink ;
58+ const closingThanks = template . body . closingThanks ;
59+ const closingMessage = template . body . closingMessage ;
4160
4261 return `
4362 <!DOCTYPE html>
@@ -46,7 +65,7 @@ export function generateWorkflowAppReviewEmailHTML(
4665 <meta charset="utf-8">
4766 <meta name="viewport" content="width=device-width, initial-scale=1.0">
4867 <meta http-equiv="X-UA-Compatible" content="IE=edge">
49- <title>${ template . subject } </title>
68+ <title>${ subject } </title>
5069 </head>
5170 <body style="margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background-color: #f5f5f5; line-height: 1.6; color: #1c1f23;">
5271 <table role="presentation" style="width: 100%; border-collapse: collapse; background-color: #f5f5f5; padding: 20px 0;">
@@ -55,15 +74,18 @@ export function generateWorkflowAppReviewEmailHTML(
5574 <table role="presentation" style="width: 100%; max-width: 600px; background-color: #ffffff; border-radius: 8px; border-collapse: collapse; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
5675 <tr>
5776 <td style="padding: 32px 32px 24px 32px;">
58- <p style="margin: 0 0 24px 0; font-size: 16px; color: #1c1f23;">${ mainMessage } </p>
77+ <p style="margin: 0 0 16px 0; font-size: 16px; color: #1c1f23;">${ greeting } </p>
78+ <p style="margin: 0 0 16px 0; font-size: 16px; color: #1c1f23;">${ thanksMessage } </p>
79+ <p style="margin: 0 0 16px 0; font-size: 16px; color: #1c1f23;">${ reviewMessage } </p>
5980 <p style="margin: 0 0 16px 0; font-size: 14px; color: #1c1f23;">
60- ${ template . body . templateLinkLabel }
81+ ${ templateLinkLabel }
6182 <a href="${ templateLink } " style="color: #155EEF; text-decoration: none; word-break: break-all;">${ templateLink } </a>
6283 </p>
63- <p style="margin: 0 0 8px 0; font-size: 14px; color: #1c1f23;">${ template . body . discordMessage } </p>
64- <p style="margin: 0; font-size: 14px; color: #1c1f23;">
65- ${ template . body . discordLink }
66- </p>
84+ ${ note ? `<p style="margin: 0 0 16px 0; font-size: 14px; color: #1c1f23;">${ note } </p>` : '' }
85+ <p style="margin: 0 0 16px 0; font-size: 14px; color: #1c1f23;">${ discordMessage } </p>
86+ <p style="margin: 0 0 16px 0; font-size: 14px; color: #1c1f23;">${ discordLink } </p>
87+ <p style="margin: 0 0 16px 0; font-size: 14px; color: #1c1f23;">${ closingThanks } </p>
88+ <p style="margin: 0; font-size: 14px; color: #1c1f23;">${ closingMessage } </p>
6789 </td>
6890 </tr>
6991 </table>
0 commit comments