N
Novu9mo ago
SuPP

Modificate message object

We would like to be able to receive variables that are created in Novu when forming a message...
5 Replies
SuPP
SuPP9mo ago
An example of what we want to implement: we use the digest engine and want to get full information about step.events on the frontend.... for example, show the user a message:
Several people liked your post
and add the ability to open additional information about the message where there would be a list of users who have put reactions to the post and for this implementation we need an array of these users who have put a reaction We see the solution to this issue as follows: - there is still a content field in the message object, where the message is formed as before - but also in addition, a field with additional variables of the message object will appear in the message object, where there will be a field with an array of users, which is usually available at the stage of message formation We know that we can just describe JSON inside content, but perhaps there is a better solution
Pawan Jain
Pawan Jain9mo ago
Hi @SuPP How you have configured your workflow?
SuPP
SuPP9mo ago
{{#if step.digest}}
{{#equals lang 'ru'}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
и другие поставили вам лайк
<br />
{{step.total_count}} оценили ваше
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} видео {{else}} фото {{/equals}}
</a>
{{else}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
and others liked you
<br />
{{step.total_count}} rated your
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} video {{else}} photo {{/equals}}
</a>
{{/equals}}
{{else}}
{{#equals lang 'ru'}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
оценил ваше
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} видео {{else}} фото {{/equals}}
</a>
{{else}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
rated your
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} video {{else}} photo {{/equals}}
</a>
{{/equals}}
{{/if}}
{{#if step.digest}}
{{#equals lang 'ru'}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
и другие поставили вам лайк
<br />
{{step.total_count}} оценили ваше
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} видео {{else}} фото {{/equals}}
</a>
{{else}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
and others liked you
<br />
{{step.total_count}} rated your
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} video {{else}} photo {{/equals}}
</a>
{{/equals}}
{{else}}
{{#equals lang 'ru'}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
оценил ваше
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} видео {{else}} фото {{/equals}}
</a>
{{else}}
<a href="https://friendsonly.me/{{user_id}}" target="_blank">{{user_name}}</a>
rated your
<a href="https://friendsonly.me/shared_video/{{content_uuid}}" target="_blank">
{{#equals content_type 'video'}} video {{else}} photo {{/equals}}
</a>
{{/equals}}
{{/if}}
No description
SuPP
SuPP9mo ago
or what you mean?
SuPP
SuPP9mo ago
No description
Want results from more Discord servers?
Add your server
More Posts