N
Novu14mo 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
Aman14mo ago
getting the error message Subscriber missing recipient details
Pawan Jain
Pawan Jain14mo 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
Aman14mo ago
two steps 1. Trigger 2. Email
Novu_Bot
Novu_Bot14mo ago
@._aman, you just advanced to level 2!
Aman
Aman14mo 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 Jain14mo 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
Aman14mo ago
nothing specific will change it to user id still not working
Pawan Jain
Pawan Jain14mo 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
Aman14mo ago
joining
Want results from more Discord servers?
Add your server