Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Bug Report: cannot trigger workflow with topic #5571

Closed
2 tasks done
lukmanfarizi opened this issue May 15, 2024 · 7 comments
Closed
2 tasks done

🐛 Bug Report: cannot trigger workflow with topic #5571

lukmanfarizi opened this issue May 15, 2024 · 7 comments
Labels

Comments

@lukmanfarizi
Copy link

📜 Description

With Novu v.0.24, I am unable to trigger workflows with topics, whereas it worked in v.0.22. Although the API results indicate success with a ‘processed’ status, the trigger is neither being called nor recorded in the activity feed.

👟 Reproduction steps

parameter to trigger topic,

{ "name": "event-started", "to": { "type": "Topic", "topicKey": "notification" }, "payload": { "alert": "xxxxx" } }

result from novu,
{ "data": { "acknowledged": true, "status": "processed", "transactionId": "24a5b418-f789-417c-ab81-ed951f93df0a" } }

👍 Expected behavior

it should trigger workflow

👎 Actual Behavior with Screenshots

image

Novu version

V.0.24.0

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented May 15, 2024

@ainouzgali
Copy link
Contributor

Hi @lukmanfarizi :)
Could you please try having to as an array of objects. Like this:
{ "name": "event-started", "to": [{ "type": "Topic", "topicKey": "notification" }], "payload": { "alert": "xxxxx" } }

@ainouzgali
Copy link
Contributor

ainouzgali commented May 19, 2024

@lukmanfarizi did you get a chance to try what I suggested? It should work, please let me know if you still have problems with that.
Assuming it did work for you - I will open a ticket for having a correct validation error for this.

@lukmanfarizi
Copy link
Author

@ainouzgali, I apologize for the delayed response.

I have already tested your suggestion, but unfortunately, it is still not working. I attached capture from postman.

image

@mohamed-cherifi
Copy link

mohamed-cherifi commented May 20, 2024

Hello,

I am having a similar issue.
I am using Novu 0.23
Here's what I've tried so far with no luck:

  • Direct API trigger
image
  • Node novu trigger sdk
image
  • Node novu.events trigger sdk
image

So even when I tried to trigger the topic via a direct api call the notification didn't appear on the activity feed.
But if I trigger the notification the standard way, ie with a subscriber id it does work as expected.

For additional context here's the list of topics:
image

@BlackH3art
Copy link

BlackH3art commented May 20, 2024

Hello,

@lukmanfarizi @mohamed-cherifi

The question is what version of Novu are you using? Is it the claud version or the selfhosted version?

I had exactly the same issue using self-hosted version. Topics were processed and properly sent but no actual notification was delivered.
After couple days and discussion on Discord, it turns out that there is environment variable called IS_TOPIC_NOTIFICATION_ENABLED required in order for topic to be actually send.

If you're using self-hosted version, then adding this line in /docker/local/deployment/docker-compose.yml under the worker service in environment section should solve the problem:

IS_TOPIC_NOTIFICATION_ENABLED: true

Or in .env files if you run Novu locally, not using docker-compose.

@ngonam22
Copy link

Hello @BlackH3art and thank you for your solution!!

Im using the latest version of Novu self hosted and have the exact same problem. Took me hours to digging around the source code but found nothing!!
Anw really wonder what happened? We missed this Flag in our document or something?

@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants