N
Novu16mo ago
Aman

Subscriber missing recipient details

Hey can someone please help me, getting this error, here's what's my code looks like ``` await novu.trigger("event_name" { to: { subscriberId: "email", }, payload: {}, });
9 Replies
Aman
Aman16mo ago
getting the error message Subscriber missing recipient details
Pawan Jain
Pawan Jain16mo ago
Hi @._aman Can you please help us in debugging by sharing answer of these questions? 1. What are the steps in your workflow? 2. Is this subscriber already created before trigger or you are creating this subscriber inline of trigger? Read more:- https://docs.novu.co/platform/subscribers#create-a-subscriber
Subscribers | Novu
Subscriber is a user to whom Novu will send a notification. Each subscriber in Novu is uniquely identified by subscriberId. Novu manages your users in the form of subscribers. Novu stores some user-specific information that helps you send multichannel notifications to your users.
Aman
Aman16mo ago
two steps 1. Trigger 2. Email
Novu_Bot
Novu_Bot16mo ago
@._aman, you just advanced to level 2!
Aman
Aman16mo ago
subscriber inline of the trigger
await novu.trigger("event_name" {
to: {
subscriberId: "email",
},
payload: {},
});
await novu.trigger("event_name" {
to: {
subscriberId: "email",
},
payload: {},
});
this creates a subscriber also, if not present right?
Pawan Jain
Pawan Jain16mo ago
As you have email as step in your workflow, so novu will check if email property is present in subscriber, if not novu will throw error Subscriber missing recipient details Can you please add email field also?
await novu.trigger("event_name" {
to: {
subscriberId: "email",
email: "email"
},
payload: {},
});
await novu.trigger("event_name" {
to: {
subscriberId: "email",
email: "email"
},
payload: {},
});
ANy specific reason of using email as subscriberid? In novu , we don't recommend using email as subscriberid as in your system user can change email
Aman
Aman16mo ago
nothing specific will change it to user id still not working
Pawan Jain
Pawan Jain16mo ago
Can you please join here for screen sharing ? https://meet.google.com/teo-xrxp-ocn May be I will be able to debug it
Aman
Aman16mo ago
joining
Want results from more Discord servers?
Add your server