Etigma
Etigma
NNovu
Created by Etigma on 6/27/2024 in #💬│support
Shadow Payload
Hello ! I'm trying to use Novu with the java sdk and as self-hosted. Actually it work pretty well. I use a payload in this form: Map(String, List<String>) I've tried somes key, value, like: NEWS : [ "new_one" ] IMPORTANT_NEWS : [ "new_two" ] And i try to send email with this informations. To know if there is any News or Important News, i use {{#if NEWS}} in the email template. But for somes times now, even if i don't send IMPORTANT_NEWS in my payload (I just send NEWS, or nothing) IMPORTANT_NEWS will be found in the notification payload, as true (and not as empty list/null/other) Did someone encountered the same problem ?
10 replies
NNovu
Created by Etigma on 4/17/2024 in #💬│support
Trigerring workflow with topic not working.
Hi, I'm trying to use a simple topic to send email to somes subscribers. But its not working: I'm on Java 11. using sdk Novu 1.5.0. Calling like this:
Topic t = new Topic();
t.setType("Topic");
t.setTopicKey(topicId);

TriggerEventRequest triggerEventRequest = new TriggerEventRequest();

triggerEventRequest.setTo(t);
triggerEventRequest.setName(workflowId);
TriggerEventResponse triggerEventResponse = novu.triggerEvent(triggerEventRequest);
Topic t = new Topic();
t.setType("Topic");
t.setTopicKey(topicId);

TriggerEventRequest triggerEventRequest = new TriggerEventRequest();

triggerEventRequest.setTo(t);
triggerEventRequest.setName(workflowId);
TriggerEventResponse triggerEventResponse = novu.triggerEvent(triggerEventRequest);
I've also tryed with curl: Ensuring that my topic exist with subscribers: Get topic:
{
"_id": "660158ce03df956825fbf0dc",
"_environmentId": "65fd49a203df956825fbb40f",
"_organizationId": "65fd49a203df956825fbb409",
"key": "topicTestId",
"name": "super-topic-test",
"subscribers": [
"superTestId2",
"superTestId",
"Wouhou",
"lorem2"
]
}
{
"_id": "660158ce03df956825fbf0dc",
"_environmentId": "65fd49a203df956825fbb40f",
"_organizationId": "65fd49a203df956825fbb409",
"key": "topicTestId",
"name": "super-topic-test",
"subscribers": [
"superTestId2",
"superTestId",
"Wouhou",
"lorem2"
]
}
Get of subscriber:
{
"_id": "6601592503df956825fbf16d",
"_organizationId": "65fd49a203df956825fbb409",
"_environmentId": "65fd49a203df956825fbb40f",
"firstName": "Super",
"lastName": "Test",
"subscriberId": "superTestId",
"email": "[email protected]",
"channels": [
{
"credentials": {
"webhookUrl": "<webhook>"
},
"_integrationId": "660544c403df956825fca201",
"providerId": "slack"
}
],
"deleted": false,
"createdAt": "2024-03-25T10:59:49.150Z",
"updatedAt": "2024-03-28T14:01:20.355Z",
"__v": 0,
"data": {
"lang": "EN"
},
"id": "6601592503df956825fbf16d"
}
{
"_id": "6601592503df956825fbf16d",
"_organizationId": "65fd49a203df956825fbb409",
"_environmentId": "65fd49a203df956825fbb40f",
"firstName": "Super",
"lastName": "Test",
"subscriberId": "superTestId",
"email": "[email protected]",
"channels": [
{
"credentials": {
"webhookUrl": "<webhook>"
},
"_integrationId": "660544c403df956825fca201",
"providerId": "slack"
}
],
"deleted": false,
"createdAt": "2024-03-25T10:59:49.150Z",
"updatedAt": "2024-03-28T14:01:20.355Z",
"__v": 0,
"data": {
"lang": "EN"
},
"id": "6601592503df956825fbf16d"
}
19 replies