NovuN
Novu•2y ago
AN1RUDH

Triggering a workflow using topics does not do anything

Hi everyone,
We've self-hosted Novu and were able get it in a working state. We're able to send notifications. However, when we tried to create topics and send notifications to those topic(s), we get back a sucess response:
{
    "data": {
        "acknowledged": true,
        "status": "processed",
        "transactionId": "677555f6-0d9c-4ae0-b12f-6d3254a07146"
    }
}

But this actually doesn't do anything, nothing shows up in activity feed, not notifications are sent. (We have subscribers in those topics).
I also checked the database and I don't see any records with transaction ID that we get back from the response. (I think mainly jobs collection)
Also, took a quick look at API and worker logs but wasn't able to find anything useful.

The way we trigger this was using the node SDK: (Also tried making an API call directly but the results were same)
const res = await novu.trigger('worklow', {
  to: [
    {
      type: "Topic",
      topicKey: 'my-topic',
    },
  ],
  payload: {
    key: "value"
  },
});

However, if we send notification (trigger workflow) for individual subscribers, it works:
const res = await novu.trigger('worklow', {
  to: 'subscriber-id',
  payload: {
    key: "value"
  },
});

This sends the notification as expected and entry shows up in activity feed too.

Thanks for your time. 🙏
Was this page helpful?