dmgarland
dmgarland
NNovu
Created by dmgarland on 1/10/2024 in #💬│support
Failed Digest step leads to '0 people did your thing' notifications
Self-hosted in AWS. I see sometimes that digests fail (unknown cause) but then the subsequent steps will have 0 for the step count. This leads us to have to repeat in every step
{{#if step.total_count}}
{{step.total_count }} {{pluralize step.total_count "person" "people" }}
{{ else }}
One
{{/if}} person did the thing
{{#if step.total_count}}
{{step.total_count }} {{pluralize step.total_count "person" "people" }}
{{ else }}
One
{{/if}} person did the thing
Seems repetitive. Is this what everyone else does?
3 replies
NNovu
Created by dmgarland on 1/10/2024 in #💬│support
Magic links on topic-based e-mail notifications
Self-hosted user here. I've hit on a problem that I don't know how to solve. We have setup topics and have workflows attached to them with an e-mail step. We'd like to have links from the e-mail to contain magic links so that users receiving the email notifications can click through to the site. With individual notifications, we achieved this by passing a magic link the payload at the point of triggering the workflow, so the links could be embedded in the e-mail. But with topics, it's creating new messages for each subscriber. So we can't use the same approach. Has anyone else encountered this problem? Is there an approach with Novu? Or will I need to implement it outside? I imagine it's a similar situation with push although I've not tested this yet.
7 replies
NNovu
Created by dmgarland on 1/10/2024 in #💬│support
How does seen / read work with e-mail ?
I can see that the Novu database stores seen and read fields for its messages. I would have expected a mechanism to set this, perhaps injecting a pixel into the messages and having some kind of endpoint to capture opens / clicks. Is this possible in Novu? Or at the provider level?
5 replies
NNovu
Created by dmgarland on 11/9/2023 in #💬│support
What do the job statuses mean in practice?
Could someone please explain what the various job status mean in practice? E.g. pending, queued, delayed? What is delayed digest job? What is a pending digest job? What is a pending in-app job? Sent but unread? What is a pending trigger? Is there any documentation I could read about this?
11 replies
NNovu
Created by dmgarland on 11/3/2023 in #💬│support
Unable to fully release the lock on resource
Also seeing this sometimes in our logs:
{
"level": 50,
"time": 1699023328554,
"pid": 17,
"serviceName": "@novu/worker",
"serviceVersion": "0.17.1",
"platform": "Docker",
"tenant": "OS",
"transactionId": "648eaf74-fefa-4eb8-acf2-a053e6392560",
"environmentId": "64c7dbbd0b825551a56889d7",
"organizationId": "64c7dbbc0b825551a56889ab",
"jobId": "654509cf77ab5a22275b5645",
"context": "DistributedLock",
"msg": "Releasing lock {environmentId:64c7dbbd0b825551a56889d7}environment:64c7dbbd0b825551a56889d7:template:653b87ea54ba09c9a5bc5f17:subscriber:64ee0f95437eb851912b7b64 threw an error: Unable to fully release the lock on resource \"{environmentId:64c7dbbd0b825551a56889d7}environment:64c7dbbd0b825551a56889d7:template:653b87ea54ba09c9a5bc5f17:subscriber:64ee0f95437eb851912b7b64\"."
}
{
"level": 50,
"time": 1699023328554,
"pid": 17,
"serviceName": "@novu/worker",
"serviceVersion": "0.17.1",
"platform": "Docker",
"tenant": "OS",
"transactionId": "648eaf74-fefa-4eb8-acf2-a053e6392560",
"environmentId": "64c7dbbd0b825551a56889d7",
"organizationId": "64c7dbbc0b825551a56889ab",
"jobId": "654509cf77ab5a22275b5645",
"context": "DistributedLock",
"msg": "Releasing lock {environmentId:64c7dbbd0b825551a56889d7}environment:64c7dbbd0b825551a56889d7:template:653b87ea54ba09c9a5bc5f17:subscriber:64ee0f95437eb851912b7b64 threw an error: Unable to fully release the lock on resource \"{environmentId:64c7dbbd0b825551a56889d7}environment:64c7dbbd0b825551a56889d7:template:653b87ea54ba09c9a5bc5f17:subscriber:64ee0f95437eb851912b7b64\"."
}
Any ideas on what this means, if/what I should do anything about it? Thanks all
2 replies
NNovu
Created by dmgarland on 11/3/2023 in #💬│support
Digest Amount does not exist on a digest job
I'm seeing this quite a bit in our logs { "level": 40, "time": 1699023328422, "pid": 17, "serviceName": "@novu/worker", "serviceVersion": "0.17.1", "platform": "Docker", "tenant": "OS", "transactionId": "017425c5-2225-413b-8fdc-a0ef35a9b073", "environmentId": "64c7dbbd0b825551a56889d7", "organizationId": "64c7dbbc0b825551a56889ab", "jobId": "654509cff7875593d0377b9f", "msg": "Digest Amount does not exist on a digest job" } What does it mean? Is there an action on us for these?
26 replies
NNovu
Created by dmgarland on 11/3/2023 in #💬│support
TypeError: Cannot read properties of undefined (reading 'child')
Seeing lots of these errors in our workers processing digests, and I see this in the stack trace for the job. Worker log { "level": 50, "time": 1699008800882, "pid": 17, "serviceName": "@novu/worker", "serviceVersion": "0.17.1", "platform": "Docker", "tenant": "OS", "context": "WorkflowQueueService", "msg": "Failed to run the job 65437fa0b9c1e45d5c68e928 during worker processing" } In the job in the Mongo database, I see this stack trace
error: {
stack: "TypeError: Cannot read properties of undefined (reading 'child')\n" +
' at PinoLogger.assign (/usr/src/app/node_modules/.pnpm/nestjs-pino@3.1.2_g2cqd4mgcg63o5mvxc7l66lzja/node_modules/nestjs-pino/PinoLogger.js:106:37)\n' +
' at RunJob.<anonymous> (/usr/src/app/apps/worker/dist/webpack:/@novu/worker/src/app/workflow/usecases/run-job/run-job.usecase.ts:33:18)\n' +
' at Generator.next (<anonymous>)\n' +
' at fulfilled (/usr/src/app/apps/worker/dist/main.js:1856:58)\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)',
message: "Cannot read properties of undefined (reading 'child')"
}
error: {
stack: "TypeError: Cannot read properties of undefined (reading 'child')\n" +
' at PinoLogger.assign (/usr/src/app/node_modules/.pnpm/nestjs-pino@3.1.2_g2cqd4mgcg63o5mvxc7l66lzja/node_modules/nestjs-pino/PinoLogger.js:106:37)\n' +
' at RunJob.<anonymous> (/usr/src/app/apps/worker/dist/webpack:/@novu/worker/src/app/workflow/usecases/run-job/run-job.usecase.ts:33:18)\n' +
' at Generator.next (<anonymous>)\n' +
' at fulfilled (/usr/src/app/apps/worker/dist/main.js:1856:58)\n' +
' at runMicrotasks (<anonymous>)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)',
message: "Cannot read properties of undefined (reading 'child')"
}
Any ideas on what might be the problem?
4 replies
NNovu
Created by dmgarland on 11/3/2023 in #💬│support
Digest storage costs
Hey Novu We're using the topics feature to send a digested in-app notification to our users. We're still at fairly modest numbers, ~2-3m a day in the activity graph, but with a 1 day digest, this is requiring a rather large storage requirement IMO. I naively assumed that digesting an activity would roll it up into its parent; but looking in the database it seems like the payload and all the other data is repeated. For some of our more active topics, this might make thousands of such records a day. Given there is a 1 month expiry, it does seem somewhat wasteful to keep digested notifications in the database, rather than merging the records together somehow or just having a counter on the parent record. Is there anything that I can do to expedite the process of reaping expired notifications? Or are there better ways to keep storage costs down? I'm weighing up whether to ditch digests and have the clients collate events and send them in one batch; or whether we can run some kind of daily task that finds all the sent notifications and compresses/archives/deletes them somehow. Any advice? Many thanks in advance
9 replies
NNovu
Created by dmgarland on 9/18/2023 in #💬│support
Implementing unsubscribe links with SendGrid as email provider
It appears from the code in sendgrid.provider.ts that there isn't an option to send the ASM group id which would enable SendGrid managed unsubscribe links. Is there a way to implement unsubscribe links via SendGrid? If not, what is the approach with Novu? We would have to build a bespoke subscriber preferences page?
2 replies
NNovu
Created by dmgarland on 9/6/2023 in #💬│support
Adding a 'link' option to web push via FCM
I'm using Firebase (FCM) provider to send push notifications to web browsers via Novu. I'm trying to set the link option so that clicking the notification takes the user back to the website. I can get push notifications, title, body and images are working: but I can't seem to set the link property as per the interface here: https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.webpushconfig Looking at the docs / code, I expect that I should be able to send a payload like
curl --location --request POST 'https://url.to.our.selfhosted.novu' \
--header 'Authorization: ApiKey KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "workflow-name",
"to": {
...
},
"overrides": {
"fcm": {
"webPush": {
"fcmOptions": {
"link": "https://www.novu.co"
}
}
}
}
}'
curl --location --request POST 'https://url.to.our.selfhosted.novu' \
--header 'Authorization: ApiKey KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "workflow-name",
"to": {
...
},
"overrides": {
"fcm": {
"webPush": {
"fcmOptions": {
"link": "https://www.novu.co"
}
}
}
}
}'
I can see that other webPush settings I'm setting such as imageUrl work - but I can't seem to get the link value to come through. I've tried fcmOptions and fcm_options but neither seems to work. Does anyone have any experience getting this value across to the service worker?
5 replies
NNovu
Created by dmgarland on 9/4/2023 in #💬│support
Writing dynamic workflow template based on digest count
In the Novu docs (https://docs.novu.co/platform/digest#writing-digest-templates), the digest engine page describes how it is a common use case to show the number of notifcations in the digest, the example given is "John and 5 others liked your photo." However it's not clear how this can be achieved in Novu and avoid the edge case where if the digest has one notification in it. In the example above, suppose there was one like on a photo, how can we author a template that says "John liked your photo". Similarly how would you avoid the pluralisation problem: "1 person liked your photo" instead of "3 people liked your photo". It seems like handlebars doesn't have support for this kind of logic. How would you implement the example in your documentation above?
11 replies
NNovu
Created by dmgarland on 9/1/2023 in #💬│support
Is it possible to upsert subscriber information e.g. e-mail, first name and last name?
We're using the identify method to create Novu subscriptions, but we won't have captured details such as first and last name by that point. Inlining this into the triggers doesn't seem to upsert these details, which would be useful for templates. Is it possible to upsert these details, or is there another approach to syncing these details?
3 replies
NNovu
Created by dmgarland on 8/31/2023 in #💬│support
Activity feed totals incorrect
No description
5 replies
NNovu
Created by dmgarland on 8/29/2023 in #💬│support
Online filter keeps a step stuck in 'Step queued'
Hey Novu! We're running self-hosted in AWS, been in production for a week things seem to be going great! We had initially setup our workflows to be Digest -> In-app -> E-mail -> Push With filters on E-mail/push to only send if the user wasn't on-line, the logic being that if they were on-line they'd get the in-app notification and we wouldn't worry about the other types. However we noticed that the e-mail/push steps would fail the workflow with the message 'step queued'. The worker is running and seems to be processing; so we're not sure if this is expected behaviour. In the meantime we've disabled the fitlers but would like to know whether we're doing anything wrong here. Thanks in advance!
59 replies
NNovu
Created by dmgarland on 8/18/2023 in #💬│support
Is there a way to see how many people are connected to the web socket?
I can see you have a feature for detected whether users are on-line; was wondering whether we can get a read on this? Asking so that we can tell roughly how many connections are supported on our fargate containers so that we can project costs Thanks in advance!
2 replies