Add Email Notifications
Add email notifications to a record when its status changes to a final or completed state. This template shows how to wire the send_email capability into the app, add a mailer template, and trigger the message from the update action.
Trusted by frontline teams 15 years of frontline software
Built for: Facilities Management · Operations · Warehousing · Property Management · Security
Overview
This template adds email notifications to an AI-built custom app when a record changes into a final or completed status. It is a focused edit-example for workflows where the person who created the record should get a clear confirmation that the work is done, closed, or approved.
Use it when your app already tracks a status field and you want to automate the last step of the process without building a full notification center. The template shows the key pieces: adding the send_email capability in plugin.rb, creating a mailer template, and updating the controller’s update action so the email fires only after the status transition you care about.
It is a good fit for maintenance logs, incident records, equipment returns, visitor workflows, and small approval flows. It is not the right choice for broad messaging needs, multi-recipient routing, digest emails, or complex escalation rules. If you need reminders, SLA timers, or branching notifications based on multiple fields, start with a more advanced workflow template instead.
The main value is predictability. The record stays the source of truth, the status change remains visible in the app, and the email acts as a simple downstream alert. That makes the template easy to customize while avoiding the common spreadsheet-era problem of someone noticing completion too late or not at all.
Standards & compliance context
- If the record is part of a regulated workflow, keep the status change and notification event in the audit trail so the app remains the system of record.
- For incident, maintenance, or visitor records, make sure email content does not expose more personal data than the recipient needs to see.
- If your process has retention or notification rules, align the completed-status trigger with your internal policy and any applicable recordkeeping requirements.
General regulatory context for orientation only — verify current requirements with counsel or the relevant agency before relying on this template for compliance.
How to use this template
- 1. Add the send_email capability in plugin.rb so the app is allowed to send outbound email from the record workflow.
- 2. Create or edit the mailer template to include the record name, the completed status, and a link back to the detail screen.
- 3. Update the controller’s update action so it checks the previous status and only sends when the record enters the final or completed state.
- 4. Map the recipient to the record creator and confirm the app handles cases where the creator email field is missing or blank.
- 5. Test the flow with a sample record, then review the email content, delivery timing, and duplicate-send behavior before rollout.
Best practices
- Trigger the email only on the status transition into the final state, not on every save.
- Include a direct link to the record detail screen so the recipient can verify the completed item quickly.
- Keep the subject line specific to the record type and status, such as a maintenance request marked complete.
- Handle missing creator email addresses gracefully so the update still saves even if no notification can be sent.
- Use a single final status value in the workflow to avoid ambiguity between closed, completed, resolved, and done.
- Log or surface the notification event in the record history so users can confirm the email was sent.
- Test repeated edits to a completed record to make sure the email does not resend unless the status changes again.
What this template typically catches
Issues teams running this template most often surface in practice:
Common use cases
Frequently asked questions
What does this template actually add?
It adds email notification support for a specific status transition: when a record moves into the final or completed state, the app sends an email to the record creator. The template includes the capability addition in plugin.rb, a mailer template, and the controller update hook that triggers delivery. It is meant for a single, clear workflow rather than a general notification system.
Which record types does this work for?
It works for any record type that has a status field and a creator relationship, such as incident logs, maintenance requests, equipment returns, visitor records, or inventory adjustments. The key requirement is that the record has a defined final or completed state. If your app uses a different lifecycle, you can customize the trigger condition to match that status value.
How often does the email send?
The email sends once when the record changes into the target completed state. It should not fire on every edit, only on the transition that matches the configured status. If the record is edited again later while already completed, the template should not resend unless you intentionally change the trigger logic.
Who receives the notification?
By default, the notification goes to the record creator. That makes it useful for workflows where the person who opened the record needs confirmation that the item is done. If your process needs a different recipient, such as a manager, assignee, or shared mailbox, you can adjust the mailer target in the template.
Is this appropriate for regulated records?
Yes, if the email is used as an operational alert and not as the system of record. For regulated workflows, the app should still keep the status change inside the record history, with the email acting as a notification layer. If the record is part of a compliance process, make sure the status values, audit trail, and retention rules are defined separately.
What are the common mistakes when adding this kind of notification?
A common mistake is triggering the email on any update instead of only on the status transition. Another is sending before the record is successfully saved, which can create false alerts. Teams also forget to handle missing email addresses, duplicate sends, or the case where a record is already in the completed state when the update runs.
Can I customize the email content?
Yes. The mailer template is the right place to change the subject line, body copy, and the fields included in the message. You can add record name, status, completion time, or a link back to the detail screen. Keep the message short and action-oriented so it is easy to scan in an inbox.
How does this compare with doing it manually in spreadsheets?
In spreadsheets, someone has to notice the status change and remember to send the email, which is easy to miss when the list gets busy. This template automates the handoff at the moment the record reaches its final state. That gives you a repeatable notification path without relying on manual follow-up.
What should I check before rolling this out?
Confirm the exact final status value, the creator field, and the email delivery settings in your app. Test the update flow with a sample record so you can verify the message only sends once and reaches the right person. It is also worth checking how the app behaves when the creator has no email address or when the status is changed back and forth.
Related templates
Go deeper on the topic
-
A daily huddle is a brief (10–15 minute) standing meeting held at the start of a shift or workday to align the team on priorities, surface issues, and...
-
A deskless worker is any employee whose job happens without a desk, a company laptop, or a fixed workstation. They're roughly 80% of the global workforce —...
-
A frontline employee app is a phone-first application that gives hourly, field, and deskless workers access to their schedule, pay, announcements, training,...
-
A frontline worker is any employee whose job happens away from a desk — on a production floor, in a patient room, behind a store counter, in a customer's...
-
Fix recruiting pipeline handoffs with a unified candidate portal, branded career pages, and faster offers that keep top talent engaged.
-
MangoApps AI agents now take action across 21 apps—approving leave, advancing candidates, managing schedules—not just surfacing recommendations.
-
MangoApps is now Workday Design Approved, surfacing benefits, pay, learning, and time-off data directly inside the MangoApps platform for frontline workers.
-
Artificial Intelligence helps Human Resources improve hiring, reduce bias, and boost workforce efficiency with smarter, data-driven decisions.
Ready to use this template?
Get started with MangoApps and use Add Email Notifications with your team — pricing built for small business.