Template types
Notify supports three template types:- Email
- SMS
- Letter
Send HTML email messages with:
Subject line limit: 255 characters
- Subject line personalization
- Formatted content (headings, lists, links)
- File attachments (via API)
- Custom reply-to addresses
- Email branding (logos, colors)
Subject line limit: 255 characters
Creating templates
Choose template type
Click “Add template” and select:
- Email template
- Text message template
- Letter template
Only template types enabled for your service will be available.
Name your template
Choose a descriptive name that helps you identify the template.Template names:
- Are visible only to your team (not recipients)
- Can be changed at any time
- Are used in template statistics and reports
Add content
Write your message using:
- Plain text for SMS
- Markdown formatting for emails and letters
- Personalization placeholders in double parentheses:
((name))
- Subject line (can include placeholders)
Preview template
Review how your template will appear to recipients.
- Letters show PDF preview
- Emails show HTML rendering with branding
- SMS shows character count and fragment cost
app/main/views/templates.py:103
Personalization
Add dynamic content using double parentheses:Placeholder rules
- Case-insensitive:
((Name)),((name)), and((NAME))are equivalent - Alphanumeric and spaces: Can include letters, numbers, and spaces
- No special characters: Avoid punctuation in placeholder names
- Reserved placeholders: For letters,
address line 1throughaddress line 7are reserved
Optional content
Show content only if a placeholder has a value:notes is empty, the entire section is hidden.
Email templates
Markdown formatting
Emails and letters support Markdown:Email sender name
Emails are sent from:- Service name (default)
- Custom email sender name (if configured)
app/models/service.py:660
Reply-to addresses
Configure where replies go:- Navigate to service settings
- Add email reply-to addresses
- Mark one as default
- Optionally select different reply-to per template
app/models/service.py:316
SMS templates
Character counting
SMS messages are counted in fragments:- GSM-7 encoding: 160 characters per fragment
- Unicode: 70 characters per fragment (for emoji, accents)
app/formatters.py:character_count
SMS senders
Text messages can be sent from:- 11-character ID: e.g., “GOVUK” or “YourService”
- Mobile number: For receiving replies
- Shared numbers: Provided by Notify
- Non-central government must not use “GOVUK”
- Alphanumeric IDs cannot receive replies
- Mobile numbers require inbound SMS permission
app/models/service.py:346
Inbound SMS
If your service hasinbound_sms permission:
- You’re assigned a dedicated mobile number
- Recipients can reply to your messages
- View replies at
/services/{service_id}/inbox - Download inbox as CSV
- Configure callback URL for real-time delivery
app/main/views/dashboard.py:432
Letter templates
Creating letter content
Letters require: Subject line: Appears as the letter heading Address placeholders: First 7 placeholders are used for postal address:Letter branding
Letters can include:- Organization logo
- Custom header colors
- Department branding
/templates/letter-preview-imageConfiguration:
app/models/service.py:494
Contact details
Appear in top right of letter:- Postal address
- Phone number
- Email address
- Website URL
app/models/service.py:390
Postage options
- First class
- Second class
- International
Faster delivery, higher cost.
Typical delivery: 1-2 business days
Typical delivery: 1-2 business days
Welsh language letters
Services can create bilingual Welsh/English letters:- Create English version first
- Create Welsh version at
/services/{service_id}/templates/{template_id}/welsh - Both versions linked together
- When sending, specify language preference
WelshLetterTemplateForm at app/main/forms.py
Uploading letter PDFs
For pre-designed letters:- Upload PDF at template creation
- PDF must meet Notify requirements:
- A4 size
- Minimum margins
- No password protection
- Address still provided as data when sending
app/s3_client/s3_letter_upload_client.py:upload_letter_to_s3
Template folders
Organize templates into folders:
Folders can be nested for complex organization:
app/models/service.py:539
Template versioning
Every template edit creates a new version:- Previous versions are saved permanently
- View version history at
/services/{service_id}/templates/{template_id}/history - Revert to previous version if needed
- API sends always use latest version (unless version specified)
Viewing version history
app/models/service.py:240
Copying templates
Templates can be copied:Within same service
- View template
- Click “Copy template”
- Edit name and content
- Save as new template
Between services
If you’re a member of multiple services:- Use “Copy from another service” option
- Select source service
- Choose template to copy
- Adapt content for new service
CopyTemplateForm at app/main/forms.py
Searching templates
For services with 7+ templates:- Search box appears on templates page
- Search by template name
- Search by template content
- Filter by template type (email/SMS/letter)
SearchTemplatesForm at app/main/forms.py:52
Template statistics
View usage statistics:Last 7 days
Dashboard shows most-used templates with:- Number of sends
- Template type icons
- Quick link to template
app/main/views/dashboard.py:511
Monthly usage
At/services/{service_id}/template-usage:
- Usage by month in current financial year
- Can view previous years
- Breakdown by template
- Total sends per template
app/main/views/dashboard.py:234
Archiving templates
Templates can be archived when no longer needed:- Archived templates don’t appear in main templates list
- Cannot be used to send new notifications
- Still appear in statistics for historical sends
- Can be restored if needed
template._template["archived"]
Template limits
Per service:- No hard limit on number of templates
- No limit on template size (but keep content reasonable)
- Folder depth: Unlimited nesting
- SMS: 918 characters (
SMS_CHAR_COUNT_LIMIT) - Email subject: 255 characters
- Letter pages: Auto-calculated based on content
Best practices
Naming conventions
- Use clear, descriptive names
- Include template type in name if helpful
- Consider prefixing with category (e.g., “Billing - Invoice”)
SMS efficiency
- Avoid emoji and accents if possible (uses Unicode encoding)
- Keep messages under 160 characters for single fragment
- Use short URLs for links
Email accessibility
- Use headings for structure
- Keep line length reasonable
- Use descriptive link text (not “click here”)
- Test with screen readers