Notifications

Send in-app notifications to your users using Novu.

  • Alexandro Martínez
    Author
    by Alexandro Martínez
    8 months ago
  • Send in-app notifications to your users using Novu.

    app-notifications.png

    Demo Videos

    Novu

    SaasRock uses Novu as its open-source notification infrastructure. Besides in-app notifications, Novu lets you integrate with several providers, including Twilio, Slack, Mailgun, Postmark, and more.

    After creating an account, set the following environment variables in your .env file:

    NOTIFICATIONS_NOVU_API_KEY
    NOTIFICATIONS_NOVU_APP_ID
    

    Bell Button

    Once you have set up your .env variables, you can access your notifications via the bell button.

    Channels / Notification Templates

    admin-notifications-channels.png

    SaasRock has a few channels that listen to some events by default (🚀 = Enterprise-only):

    • admin-accounts: accounts.created

    • admin-users: users.profile.updated

    • admin-subscriptions: subscriptions.created, subscriptions.cancelled

    • admin-api-keys: 🚀 apiKeys.created, apiKeys.updated, apiKeys.deleted

    • admin-emails: 🚀 emails.received

    • admin-groups: 🚀 groups.created, groups.updated, groups.deleted

    • admin-linked-accounts: 🚀 inkedAccounts.created, linkedAccounts.accepted, linkedAccounts.rejected, linkedAccounts.deleted

    • admin-account-members: 🚀 accountMembers.created, accountMembers.accepted, accountMembers.updated, accountMembers.deleted

    • admin-onboarding: 🚀 onboarding.started, onboarding.dismissed, onboarding.completed

    • admin-rows: 🚀 row.created, row.updated, row.deleted, row.workflow.transition

    • roles: roles.assigned

    • my-rows: Send activity notifications to row creators: comment, workflow, update

    In order to receive notifications for specific events, you'll need to create a notification channel or template in Novu.

    For example, if you want to receive a notification whenever an account is created, you could create a channel for the accounts event and include a message like "Account created: [account name]" and an action URL to redirect the user to the relevant page.

    Once you have created a notification template, you can test it by sending a test message. If the template is set up correctly, you should receive a notification.

    Customizing Notifications

    You can customize which events trigger notifications and which users receive them. For example, you can set up notifications to be sent to the super admin whenever an admin accounts event occurs, or you can create custom channels for different departments or users.

    Alternatively, you can choose not to receive notifications for certain events by deleting the corresponding channels.

    Additional Notes

    In some cases, you may receive multiple notifications for the same event if you have reset the database. This is because the user ID is used to set the subscriber in Novu, and resetting the database can cause the same user ID to be associated with multiple subscribers.


    This documentation page was generated with ChatGPT.

    We respect your privacy.

    This website uses cookies to help personalize your online experience. Learn more.