Notifications

Send in-app notifications to your users using Novu.

  • Alexandro MartΓ­nez
    Author
    by Alexandro MartΓ­nez
    2 years 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.

    TLDR: We use cookies for language selection, theme, and analytics. Learn more.