> For the complete documentation index, see [llms.txt](https://docs.novel.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novel.dev/novel-server/notifications.md).

# Notifications

### Web Push

Setting up web push requires FCM

Go to <https://console.firebase.google.com/u/0/project/\\[yourprojectid]/messaging/onboarding>

<figure><img src="https://1230772123-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgjPdizpdFKu8XPFFoBRj%2Fuploads%2FlE8beEmG4Bfs8s59fezK%2FScreenshot%202024-11-27%20at%204.48.23%E2%80%AFPM.png?alt=media&amp;token=d57b6e4c-136e-44e8-b6bb-d588af58fee4" alt=""><figcaption></figcaption></figure>

### Web Push

You are required to set up the following environment variables

```
VAPID_FCM_KEY=***
VAPID_PUBLIC_KEY=***
VAPID_PRIVATE_KEY=***
```

You can use the novel cli to get these via

```
novel add vapid
```

and it will walk you through the steps to get these variables

You can then use the api from your controllers via

```
import * as push from 'novel/push';

await push.web({ to: ["account_ID"] } }, { body: "Your Message" });
```

### Mail

Similarly, you can use the same api to send an email notification

```
import * as push from 'novel/push';

await push.mail({ to: ["account_ID"] } }, { body: "Your Message" });
```

You can modify the mail template under `app/templates/mail/notification/message.tsx`
