Block · Notifications and email
Notifications
Adds a notification table, an Inbox page with unread counts, mark read and live updates, and a settings page where each person chooses email and text messages. Every new notification lands in the inbox and is emailed (unless the person turned email off); people who opt in to texts get an SMS through your connected Twilio. Staff can send a notification by hand, and any workflow can create one with ctx.db.create("notification", ...).
use_template { slug: "notifications" } adds
- Tables
- notification, notification_preference
- Components
- NotificationInbox, NotificationSettings
- Pages
- /inbox, /notification-settings, /notifications-admin
- Workflows
- notification-deliver, notification-sms
- Rules
- 1 on notification, 1 on notification_preference
What it adds to your app
Tables notification and notification_preference. Inbox and settings components with their pages. A staff page to send a notification by hand. Workflows that email and text each notification as the person prefers.
Tables
notificationrecipient_id, title, body, link, category, priority, read_at, emailed_at, …notification_preferenceperson_id, email, sms, phone
Pages
/inboxInbox (‹recipient_role›)/notification-settingsNotification settings (‹recipient_role›)/notifications-adminNotifications (@staff)
Workflows
notification-deliverEmail or text each new notification, as the person prefers. On notification creatednotification-smsSend queued text messages through Twilio. On notification updated
Components
NotificationInboxA person's notification inbox: unread first, mark read, mark all read, opens links, updates liveNotificationSettingsEmail and text message preferences for the signed-in person
Rules on every write
notificationYou can mark a notification read, not change it.notification_preferenceAdd a mobile number (with country code) to get text messages.
Where it attaches
Params point the template at your own tables and roles. Leave out the ones with defaults; a wrong one is refused with the options your app has.
| Param | What it is | Example |
|---|---|---|
recipient_role | The role whose people get notifications (their own table is the recipient). Optional. | member |
email_field | Optional: the email field on that role's table, for the email copy. Optional. | email |
sms_from | Optional: your Twilio phone number (E.164, like +15550100). Leave it out and texts stay off. Optional. | +15550100 |
Use with your coding agent
- Connect the Appbricx MCP server to Claude Code, Cursor or any MCP client (quickstart).
- Paste the prompt. The agent reads the template, previews the merge with dry_run and shows you the diff.
- It applies to dev. Check it, then deploy when you are happy.
Needs the twilio integration. Text messages need Twilio connected and sms_from set; email and the inbox work without them.
Add the Notifications template (slug "notifications") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (recipient_role: who receives them; email_field: their email field; sms_from: twilio number).{
"tool": "use_template",
"arguments": {
"slug": "notifications",
"project_id": "<your project id>",
"params": {
"recipient_role": "member",
"email_field": "email",
"sms_from": "+15550100"
},
"dry_run": true
}
}appbricx templates use notifications --param recipient_role=member --param email_field=email --param sms_from=+15550100 --dry-runGoes well with
Welcome email
Workflow. Emails every new person a short, friendly welcome the moment they sign up.
welcome-emailSlack message on signup
Workflow. Posts to a Slack channel whenever someone new signs up, with their name and email.
slack-on-signupOrganisations and teams
Block. Let people create organisations, form teams, invite colleagues by email and give them owner, admin or member roles.
organisationteammembershipinvitation‹attach_to›.organisation_id