N
Novu•5mo ago
Sapar

Not getting email notifications on Trigger event

I created a subscriber and workflow. I do not get email notifications after Trigger event. I use API interface in https://docs.novu.co/api-reference/events/trigger-event. Set my Apikey and send a request. I get response: {"data":{"acknowledged":true,"status":"processed","transactionId":"5551a66b-05e7-4b2c-8d97-1851a911d07a"}}. Activity feed show success and says that message sent: { "providerId": "novu-email", "identifier": "novu-email-G-sfycO38C", "name": "Novu Email", "_environmentId": "6409c0dbe5d10c2178942e1c", "_id": "64da408c88468b9fd36f56e0" } Please help. The last transaction id: 5551a66b-05e7-4b2c-8d97-1851a911d07a
3 Replies
Pawan Jain
Pawan Jain•5mo ago
@Sapar I sent you two emails one from novu-email and other one from ses Did you receive any email? @Sapar following up on this 🙂
Sapar
Sapar•5mo ago
Hi, @Pawan Jain I think I've found a bug. For example, my subscriber has email admin1@mail.com. My newly created workflow has a step variables 'email'. As an example I want to notify admins about a new user that has been registered. Consequently, when I trigger event, I send a payload like this: Hello admins, a new user has registered. The email of a new user is {{email}}. The name of a new user is {{name}}. In the code: $novu->triggerEvent([ 'name' => '<WORKFLOW_TRIGGER_IDENTIFIER>', 'payload' => [ 'email' => 'new.user1@mail.com', 'name => 'New User Jr.' ], 'to' => [ 'subscriberId' => '3775', ] ])->toArray(); And here is the problem. After triggering the event, notification will be sent not to admin1@mail.com, but to new.user1@mail.com. e.g. NOT TO subscriber email, but to email from PAYLOAD.
Pawan Jain
Pawan Jain•5mo ago
Thanks for sharing finding
Want results from more Discord servers?
Add your server
More Posts