Sapar
NNovu
•Created by Sapar on 8/9/2024 in #💬│support
Using Novu to send push notifications via FCM
Hi. I try to use Novu to send push notifications via FCM. According to the docs https://docs.novu.co/integrations/providers/push/fcm I enabled the FCM integration - got my service account key from the Firebase Console, pasted the entire JSON file content in the Service Account field of the FCM provider in the integration store on Novu’s web dashboard. Then following this guide https://docs.novu.co/integrations/providers/push/fcm#setting-device-token I try to add the subscriber’s device token. And from this place there are some confusions.
23 replies
NNovu
•Created by Sapar on 8/8/2024 in #💬│support
Cannot create a topic via API Docs playground
6 replies
NNovu
•Created by Sapar on 2/26/2024 in #💬│support
Cannot use a workflow if its name has underscores
I've created a workflow through API with following params:
$data = [
'name' => 'new_seller_admin_notify_four',
'notificationGroupId' => '6409c0dbe5d10c2178942e3f',
'preferenceSettings' => [
'email' => true,
'sms' => true,
'in_app' => true,
'chat' => true,
'push' => true,
],
'steps' => [
[
'template' => [
"title" => "new_seller_admin_notify",
"content" => [
[
"type" => "text",
"content" => "Hello adminss!<div>New seller has been registered!</div><div>Name: {{name}}</div><div>Email: {{sellerEmail}}</div>",
"styles" => [
"textAlign" => "left"
]
]
],
"type" => "email",
"subject" => "New Seller",
"contentType" => "editor",
"senderName" => "Chester field",
"variables" => [
[
"name" => "name",
"type" => "String"
],
[
"name" => "sellerEmail",
"type" => "String"
]
]
],
],
]
]
When I trigger event using this workflow, I'm getting an error:
[2024-02-26 07:25:17] local.ERROR: [NovuService]:sendNotificationToTopics ["The given data failed to pass validation."]
If I replace underscores with dashes, an event is triggered successfully.
new_seller_admin_notify_four
change to
new-seller-admin-notify-four
23 replies
NNovu
•Created by Sapar on 2/23/2024 in #💬│support
Cannot create a workflow through API
I'm using the code in my app:
$novu = new Novu(<NOVU_API_KEY>);
$novu->createNotificationTemplate([
[
'name' => 'new_seller_admin_notify',
'notificationGroupId' => '65d88e638b742c73124b6c23',
'active' => true
'preferenceSettings' => [
'email' => true,
'sms' => true,
'in_app' => true,
'chat' => true,
'push' => true,
],
'steps' => [
[
'template' => [
"title" => "wellness_course_started_title",
"content" => [
[
"type" => "text",
"content" => "Hello admins!<div>New seller has been registered!</div><div>Name: {{name}}</div><div>Email: {{sellerEmail}}</div>",
"styles" => [
"textAlign" => "left"
]
]
],
"type" => "email",
"subject" => "New Seller",
"contentType" => "editor",
"senderName" => "Le Paniew Blue",
"variables" => [
[
"name" => "name",
"type" => "String"
],
[
"name" => "sellerEmail",
"type" => "String"
]
]
],
],
]
]
]);
I am getting an error:
[2024-02-23 12:49:49] local.ERROR: [NovuService]:createNotificationTemplate ["{"message":["active must be a boolean value"],"error":"Bad Request","statusCode":400}"]
BUT, I set 'active' => true.
17 replies
NNovu
•Created by Sapar on 2/15/2024 in #💬│support
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
6 replies
NNovu
•Created by Sapar on 2/13/2024 in #💬│support
Not getting email notifications from topic
I use novu in my laravel app. I configured api key and uri. I created a topic:
$novu->createTopic([
'key' => 'seller_registration_notification',
'name' => $name,
]);
The result is successful.
[2024-02-09 10:16:23] local.INFO: [NovuService][Success]:createTopic {"id":"65c5fb765de7c63123a6da72","key":"seller_registration_notification"}
I created subscriber: $novu->createSubscriber([ 'subscriberId' => 'admin_20', 'email' => '[email protected]', 'firstName' => 'Sapar', 'lastName' => 'Atayev' ]); The result was successful. [2024-02-12 14:21:58] local.INFO: [NovuService][Success]:createSubscriber {"id":"65ca2988619fe4f9cf65013a","subscriberId":"admin_20","firstName":"Sapar","lastName":"Atayev","email":"[email protected]","channels":[],"organizationId":"6409c0dbe5d10c2178942df2","environmentId":"6409c0dbe5d10c2178942e1c","deleted":false,"createdAt":"2024-02-12T14:22:00.538Z","updatedAt":"2024-02-12T14:22:00.538Z","v":0} Added subscriber to topic: $novu->topic('seller_registration_notification')->addSubscribers(['admin_20']); Result is successful. [2024-02-12 14:21:59] local.INFO: [NovuService][Success]:addSubscribersToTopic {"succeeded":["admin_20"]} Created workflow manually through interface. Workflow ID is 'lpb-new-seller'. I added the step 'Email' in order to send email notification. Configured the email template in workflow. Sent notification to topic: $novu->triggerEvent([ 'name' => 'lpb-new-seller', 'to' => [ [ 'type' => 'Topic', 'topicKey' => 'seller_registration_notification' ], ], 'payload' => [ 'info' => 'info', 'name' => 'Mr. John', ] ]) Success. Novu activity feed shows success. But I don't receive any email to subscriber mail box. [2024-02-13 07:44:32] local.INFO: [NovuService][Success]:sendNotificationToTopics {"transactionId":"70544a21-28a8-49b1-9ce5-11bb7468627b","acknowledged":true,"status":"processed"} Need help. Thanks.
I created subscriber: $novu->createSubscriber([ 'subscriberId' => 'admin_20', 'email' => '[email protected]', 'firstName' => 'Sapar', 'lastName' => 'Atayev' ]); The result was successful. [2024-02-12 14:21:58] local.INFO: [NovuService][Success]:createSubscriber {"id":"65ca2988619fe4f9cf65013a","subscriberId":"admin_20","firstName":"Sapar","lastName":"Atayev","email":"[email protected]","channels":[],"organizationId":"6409c0dbe5d10c2178942df2","environmentId":"6409c0dbe5d10c2178942e1c","deleted":false,"createdAt":"2024-02-12T14:22:00.538Z","updatedAt":"2024-02-12T14:22:00.538Z","v":0} Added subscriber to topic: $novu->topic('seller_registration_notification')->addSubscribers(['admin_20']); Result is successful. [2024-02-12 14:21:59] local.INFO: [NovuService][Success]:addSubscribersToTopic {"succeeded":["admin_20"]} Created workflow manually through interface. Workflow ID is 'lpb-new-seller'. I added the step 'Email' in order to send email notification. Configured the email template in workflow. Sent notification to topic: $novu->triggerEvent([ 'name' => 'lpb-new-seller', 'to' => [ [ 'type' => 'Topic', 'topicKey' => 'seller_registration_notification' ], ], 'payload' => [ 'info' => 'info', 'name' => 'Mr. John', ] ]) Success. Novu activity feed shows success. But I don't receive any email to subscriber mail box. [2024-02-13 07:44:32] local.INFO: [NovuService][Success]:sendNotificationToTopics {"transactionId":"70544a21-28a8-49b1-9ce5-11bb7468627b","acknowledged":true,"status":"processed"} Need help. Thanks.
49 replies