Skip to content

team-invitation

Source of truth: packages/notifications/src/translations.ts

DomainChannelsRecipients
teamsin-app + emailInvited user
SourceContext
packages/api/src/services/teams.ts:549inviteToTeam
interface TeamInvitationData {
inviterName: string;
teamName: string;
acceptUrl: string;
}

The caller invokes triggerWorkflow('team-invitation', recipientIds, data) where data is the TeamInvitationData shape above. The server pre-translates the payload via getTranslatedPayload('team-invitation', recipientLocale, data) from @repo/notifications before sending, producing { inAppBody, emailSubject, emailBody } for the dashboard templates to render.

Knock dashboard template body: {{ inAppBody }}.

LocalePreview source
es👥 ${p.inviterName} te invitó a unirte a ${p.teamName}
en👥 ${p.inviterName} invited you to join ${p.teamName}

Subject: {{ emailSubject }}. Body: {{ emailBody }} (HTML mode, dashboard escaping OFF — every user-supplied string is escaped server-side via escapeHtml from @repo/notifications).

LocaleSubject preview
esTe invitaron a unirte a ${p.teamName}
enYou're invited to join ${p.teamName}

Email body is composed by emailBody.es in packages/notifications/src/translations.ts via the layout components in packages/notifications/src/email-layout.ts (wrapEmailLayout, ctaButton, calloutBox, quoteBlock, propertyCard, detailTable / detailRow). Body source is not inlined here because it spans tens of lines per locale — open the source file for the full template.