N
Novu2y 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
AmanOP2y ago
getting the error message Subscriber missing recipient details
Pawan Jain
Pawan Jain2y 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
AmanOP2y ago
two steps 1. Trigger 2. Email
Novu_Bot
Novu_Bot2y ago
@._aman, you just advanced to level 2!
Aman
AmanOP2y 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 Jain2y 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
AmanOP2y ago
nothing specific will change it to user id still not working
Pawan Jain
Pawan Jain2y 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
AmanOP2y ago
joining

Did you find this page helpful?