kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
docs: add steps for creating Novu notification template
rodzic
43b5d865ff
commit
dbcdffa3a5
37
docs/novu.md
37
docs/novu.md
|
@ -29,3 +29,40 @@ Otherwise, you can pass it in as an argument to the `Novu` constructor.
|
|||

|
||||
|
||||
[novu]: https://novu.co/
|
||||
|
||||
### Create a Notification Template
|
||||
|
||||
For each notification type you want to send, you need to create a template in Novu. This is a one-time setup step that you can do on the Novu web interface.
|
||||
|
||||
It is possible to customize the notification content at each invocation via handlebars-style placeholders. For example, you can create a template for an email notification that looks like this:
|
||||
|
||||
```
|
||||
Hello {{name}},
|
||||
{{content}}
|
||||
```
|
||||
|
||||
The placeholders will be replaced with the actual values of the `payload` object you pass to the `send` method.
|
||||
|
||||
To create a template, follow these steps:
|
||||
|
||||
1. Open https://web.novu.co and sign in with your Novu account credentials
|
||||
|
||||
2. Click "Notifications"
|
||||
|
||||

|
||||
|
||||
3. Click "Create Workflow" on the top-right
|
||||
|
||||

|
||||
|
||||
4. Double-click the "notification name" field and enter the name of the template. This is the event name with which the respective notification may be triggered from the API.
|
||||
|
||||

|
||||
|
||||
5. To create, for example, a SMS notification template, click and hold "SMS" and drag it to the left underneath the trigger.
|
||||
|
||||

|
||||
|
||||
6. Click inside the "SMS message content" text field on the right and enter the content of your SMS, e.g. a handlebars placeholder such as `{{content}}`.
|
||||
|
||||

|
||||
|
|
Ładowanie…
Reference in New Issue