Govforms email actions
Use a Govforms email action to send a configured template-based email from a service. It is suited to confirmations, updates and operational notifications where the email content is managed as a reusable template and the service supplies recipient-specific values.
Configure the email template and its permitted placeholders before linking it to the service. Then add the action from Page actions and choose a trigger that sends only after the relevant answers are complete and valid.
Plan a dependable message
Before configuring the action, confirm the recipient, the template, every variable the template expects, whether attachments are required, and what the service should do if sending fails.
flowchart LR
A[Validated answers] --> B[Email action]
B --> C[Resolve recipient and template values]
C --> D[Send configured template]
D --> E[Continue to confirmation]Do not use an email as the only evidence that a service was completed. The completion route should remain clear even if delivery is delayed or a recipient cannot receive messages.
Configure the action
- Open Page actions and add a Govforms email action.
- Give it a stable ID, for example
send_submission_confirmation, and a name that describes when it sends. - Select the email template using its template ID.
- Set the recipient email address. You can use a Liquid expression to take it from a field.
- Add each template variable key and its matching value.
- Add attachments only where the template and the recipient genuinely need them.
- Choose a trigger after validation, or on service completion when the message is a final confirmation.
- Test with a safe address and representative non-sensitive data in QA.
For more than one recipient, provide one address per line where the service design requires it. Keep the recipient logic narrow and auditable; an unexpected template value should never turn into an unexpected recipient.
Map template variables carefully
Each Template variable key must match a placeholder defined in the selected template. The paired Template variable value can be fixed text or a Liquid expression using information from the service.
Build the mapping as a small table before entering it in Builder:
| Template placeholder | Service value | Example purpose |
|---|---|---|
reference |
assigned case reference | helps the recipient identify the request |
name |
person’s preferred name | personalises the message |
next_step |
calculated route instruction | explains what happens next |
Use clear variable names in the template and keep values in the format the email needs. Test omitted optional answers so the recipient never receives an unexplained blank or raw template expression.
Add attachments with care
Use Attachment variable key and Attachment file together to provide a file to a template variable. Select the uploaded file field or a successfully generated document result as the attachment source.
Attach only files that the recipient needs and is allowed to receive. Confirm the file exists before the email action runs, check that its contents are relevant to the chosen journey, and give the person a clear expectation that an attachment will be sent.
If an email depends on a document-generation action, put document generation first and the email action second under the same trigger. Test the order through the complete route.
Choose timing and conditions
For a message that confirms an answer on the current page, run the action only after page validation. For a final confirmation, use the completion trigger. Apply action execution conditions when only some journeys should send the message, such as an opt-in update or a route requiring an attachment.
Avoid sending on page load unless the page is explicitly designed for that event and repeated visits are safe. A person returning to a page must not unknowingly generate duplicate emails.
Test delivery and content
In QA, test a valid route, a route where the condition skips the action, a missing recipient address, an optional value left blank and an attachment route. Check the rendered email, not only the Builder configuration: subject, recipient, body, substituted values, links and attachment all need review.
Do not put sensitive information in an email just because the service collected it. Use the minimum necessary content and make the person’s expectations about email clear in the journey.
