Skip to content

Commit e57a9a1

Browse files
bchapuisclaude
andcommitted
Improve welcome email with Discord and GitHub links
Add DISCORD_URL and GITHUB_URL env variables. Restructure welcome email body: move docs to quick tips, add onboarding/Discord/GitHub call-to-action lines with consistent question-then-link pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d849e29 commit e57a9a1

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

apps/api/src/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ async function completeOAuthLogin(
523523
appUrl: c.env.WEB_HOST,
524524
websiteUrl: c.env.WEBSITE_URL,
525525
onboardingUrl: c.env.ONBOARDING_URL,
526+
discordUrl: c.env.DISCORD_URL,
527+
githubUrl: c.env.GITHUB_URL,
526528
});
527529
const result = await emailService.send({
528530
from: c.env.ONBOARDING_EMAIL,

apps/api/src/context.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ export interface Bindings {
7171
STRIPE_METER_ID?: string;
7272
ONBOARDING_URL?: string;
7373
ONBOARDING_EMAIL?: string;
74+
DISCORD_URL?: string;
75+
GITHUB_URL?: string;
7476
}
7577

7678
export interface Variables {

apps/api/src/services/email-templates.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export interface WelcomeEmailParams {
77
appUrl: string;
88
websiteUrl: string;
99
onboardingUrl?: string;
10+
discordUrl?: string;
11+
githubUrl?: string;
1012
}
1113

1214
/**
@@ -17,7 +19,8 @@ export function getWelcomeEmail(params: WelcomeEmailParams): {
1719
text: string;
1820
html: string;
1921
} {
20-
const { userName, appUrl, websiteUrl, onboardingUrl } = params;
22+
const { userName, appUrl, websiteUrl, onboardingUrl, discordUrl, githubUrl } =
23+
params;
2124
const docsUrl = `${appUrl}/docs/concepts`;
2225

2326
const subject = "Welcome to Dafthunk";
@@ -33,9 +36,9 @@ Here are some quick tips:
3336
• Connect integrations like GitHub, Discord, Telegram or Gmail
3437
• Browse the Nodes Reference to see all 400+ available nodes
3538
• Bonus: it's open source (MIT). Self-host it and contribute
39+
• Learn more: ${docsUrl}
3640
37-
${onboardingUrl ? `Want a walkthrough? Book an onboarding session: ${onboardingUrl}\n\n` : ""}Docs: ${docsUrl}
38-
Questions? GitHub issues or Discord.
41+
${onboardingUrl ? `Want a walkthrough? Book an onboarding session: ${onboardingUrl}\n\n` : ""}${discordUrl ? `Prefer a quick chat? Join us on Discord: ${discordUrl}\n\n` : ""}${githubUrl ? `Want to help? Contribute on GitHub: ${githubUrl}\n\n` : ""}Questions? GitHub issues or Discord.
3942
4043
Happy automating,
4144
Bertil Chapuis
@@ -54,9 +57,9 @@ ${websiteUrl}`;
5457
<li>Connect integrations like GitHub, Discord, Telegram or Gmail</li>
5558
<li>Browse the Nodes Reference to see all 400+ available nodes</li>
5659
<li>Bonus: it's open source (MIT). Self-host it and contribute</li>
60+
<li><a href="${docsUrl}">Learn more</a></li>
5761
</ul>
58-
${onboardingUrl ? `<p>Want a walkthrough? <a href="${onboardingUrl}">Book an onboarding session</a></p>\n` : ""}<p><a href="${docsUrl}">Docs</a></p>
59-
<p>Questions? GitHub issues or Discord.</p>
62+
${onboardingUrl ? `<p>Want a walkthrough? <a href="${onboardingUrl}">Book an onboarding session</a></p>\n` : ""}${discordUrl ? `<p>Prefer a quick chat? <a href="${discordUrl}">Join us on Discord</a></p>\n` : ""}${githubUrl ? `<p>Want to help? <a href="${githubUrl}">Contribute on GitHub</a></p>\n` : ""}<p>Questions? GitHub issues or Discord.</p>
6063
<p>Happy automating,<br>Bertil Chapuis</p>
6164
<p>—<br>Dafthunk · Visual workflow automation<br><a href="${websiteUrl}">${websiteUrl}</a></p>`;
6265

0 commit comments

Comments
 (0)