Email Templates

Customize the system emails your league sends with the built-in template editor.

The Template Editor

Every organization gets a set of system email templates. You can customize each one from the Email Templates page in your org dashboard. The editor lets you change the subject line and body while preserving the dynamic variables that personalize each email.

Navigate to your org dashboard and find "Email Templates" in the sidebar. Each template is listed with its current subject line and a preview of the body.

System Templates

tplgolf includes 10 system templates that cover the full league lifecycle:

Match & Season

match-reminder
Sent before a scheduled match. Includes date, time, course, opponent, and tee assignment details.
match-recap
Sent after a match is finalized. Includes the result, score summary, and updated standings position.

Broadcasts

league-broadcast
A manager-initiated email sent to all players in a specific league. Use for announcements, schedule changes, or anything league-specific.
platform-broadcast
An org-wide email sent to all members across all leagues. Use for org-level announcements, policy changes, or cross-league communications.

Substitutes

sub-request
Sent to available subs when a regular player can't make it. Includes the date, course, and team details so the sub knows what they're signing up for.
sub-confirmed
Sent to the sub and the team when a sub request is accepted. Confirms the assignment and provides match details.

Invites

player-invite
Sent when a player is invited to join a league. Includes full league details — format, course, schedule, rules — and a one-click accept link.
league-invite
A general league invitation for prospective members who aren't yet in the org. Includes org and league information with a sign-up link.
manager-invite
Sent when someone is invited to be a league manager. Explains the role and provides an accept link.

Admin

commissioner-nudge
A reminder sent to the commissioner (org owner) for outstanding tasks — finalizing results, updating standings, or completing season setup.

Using Variables

Templates use double-curly-brace placeholders that get replaced with real data when the email is sent. For example:

  • {{playerName}} — the recipient's display name
  • {{leagueName}} — the league's name
  • {{matchDate}} — the formatted match date
  • {{courseName}} — the course being played
  • {{opponentTeam}} — the opposing team's name
  • {{acceptUrl}} — the invite acceptance link

Each template shows its available variables in the editor sidebar. Only use variables that are listed for that specific template — other placeholders will render as empty text.

Warning
Don't remove or rename variables in the template body. The system needs the exact {{variableName}} syntax to replace them. Adding extra curly braces or spaces inside the braces will break the replacement.

The Rich-Text Editor

The template body uses a Tiptap-powered rich-text editor. You can:

  • Format text with bold, italic, and underline
  • Add headings, lists, and links
  • Insert variable placeholders from the toolbar
  • Rearrange content by dragging blocks

The editor preserves your formatting when the email is sent. What you see in the editor is close to what the recipient gets in their inbox.

Previewing Templates

Before saving changes, use the preview pane to see how the email will look with sample data filled in. The preview replaces all variables with realistic placeholder values so you can check formatting and readability.

Tip
Always preview after editing. It's easy to accidentally delete a variable or break the layout. The preview catches these issues before real emails go out.

Reverting to Defaults

Every template has a "Revert to Default" option that restores the original system template. This is useful if your customizations get messy or you want to start fresh. Reverting replaces the subject and body entirely — your customizations are not recoverable after reverting.