Triggering workflow to topic subscribers doesn't work.
I've got simple workflow defined
send-mail
which is just simply sending mails. I've tested it and I'm receiving mails when I'm triggering it to single subscriber, but it doesn't work when I try to trigger that to the topic.
First I created the topic like so:
Then I added two subscribers like so:
And now I'm trying to trigger
this worflow to the topic like this:
I'm getting back the transaction id in a response:
But no actual mail is delivered, and there's no such transaction id on my Activity Feed.
I've got Novu self-hosted and deployed with docker.
Any help appreaciated.30 Replies
Hi @maybeNoT, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Topics
* Go
* Workflows
* Preferences
-----------------------------
Answer
Based on the description, it seems like you've followed the correct steps for creating a topic, adding subscribers to it, and triggering a workflow to the topic. If you're not seeing the expected emails being sent and the transaction not appearing in your Activity Feed, there could be several factors at play, including configuration issues or the way the workflow is set up.
However, without direct access to error logs or more detailed system configurations, it's challenging to pinpoint the exact cause. Here are a few troubleshooting steps you can consider:
1. Check Workflow Configuration: Ensure your
send-mail
workflow is correctly configured to handle topic triggers. Workflows need to be set up in a way that supports the type of triggering you're attempting.
2. Review Topic and Subscriber Setup: Double-check if the topic and subscribers are set up correctly. Ensure the subscribers added to the topic are valid and capable of receiving emails.
3. Inspect Docker and Self-Hosted Setup: Since you're using a self-hosted Novu deployed with Docker, ensure your environment is correctly configured, especially regarding network settings and access to email sending services.
4. Consult Novu Documentation: For more detailed guidance and examples on triggering workflows, topics, and troubleshooting, refer to the Novu documentation.
5. System Logs: Check your system logs for any errors related to the failed trigger attempts. Errors or warnings in the logs can provide more insight into what might be going wrong.
If after following these steps, you still encounter issues, it may be beneficial to review any recent changes or updates to your Novu setup or consult with your development team for further diagnostics.1. How to configure workflow to handle topic triggers?
2. Where can I review the topic and subscribers? I can't see this option in interface.
Got it. Tagging @Support for additional help.
@Ask Inkeep
Hmm.. Seems like you didn't ask a question. Please try again.
@Ask Inkeep
How to configure workflow to handle topic triggers?
Where can I review the topic and subscribers? I can't see this option in interface.
Thanks for the follow-up, @maybeNoT. I'll get back to you soon.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Topics
* Get workflows
* Glossary
* PHP
-----------------------------
Answer
To configure a workflow to handle topic triggers, you need to ensure that your workflow is set up with the correct trigger identifier and is designed to process notifications for topics. This involves specifying the
type
as 'Topic' and the topicKey
when triggering a notification to a topic, as shown in the example (1) :
Regarding reviewing topics and subscribers, the current Novu interface might not directly display this information. Managing topics and subscribers typically involves using the Novu API for creating, adding subscribers to, and triggering notifications to topics. For detailed operations like listing topics or subscribers, you would generally interact with the Novu API programmatically (1) (2) .
For more details on these processes, including managing subscribers and topics through the API, please refer to the Novu documentation available online.Got it. Tagging @Support for additional help.
@maybeNoT
Do you see any error in logs for this?
No, I'm not getting any errors.
Also I can see my topic is properly created and subscribers are added:
Workflow:
@Pawan Jain
@Support
@maybeNoT, you just advanced to level 2!
@maybeNoT
I am a bit confused
as you mentioned you see nothing in logs.
Could you check with simple text content inplace of html or complex content in the email content editor step?
I triggered workflow like this with a single request now and with a simple text mail.
And this is the response that I get back:
For the single:
- I received mail
- I can find event by transaction ID in activity feed
For the topic:
- I did not receive an email
- I can't find it in activity feed
Just like no event was actually triggered.
My request is going through.
I think I'm getting proper response.
I don't see any errors, or which logs you want me to check and where?
Could you join in google meet and share the screen?
https://meet.google.com/pdf-rhqv-ibg
Yea I can.
I got a message that I can't join.
try again now
Requesting.
Hello @Pawan Jain , I got the same problem !
While using topic is fonctionnal in my tests on web.novu.co.
On my environment (as simple as @maybeNoT ) its not working.
I'm using Java And/or Postman for my tests.
In Java, i can see that when I request a topic with a topicKey, its working properly but TopicResponse has a topicId and topicKey null.
(but a key and name not null)
That's the case for both environments
@Etigma just to make sure I understand, on your enviorement, you mean you run the full enviorment, correct?
Yes
Thanks, @Pawan Jain please keep us updated👀
As we discussed yesterday, I'm trying to launch Novu locally.
1. I was able to install dependencies properly. The problem was that my
pnpm
version was too old and you require ^8.9.0
2. Now trying to run pnpm run start:web
and I'm getting this error.I did run
npx update-browserslist-db@latest
as suggested.
Then it threw an error and suggested to do pnpm up caniuse-lite
I did that as well - and still this issue.3. Trying to run
pnpm run start:api:dev
Also unable to start due to 562
errors, most of them:
4. Trying to run
pnpm run start:worker
similar to this one above, but 196
errorspnpm install
@Pawan Jain