Triggering events on topics
probably I am missing something, I am read the API documentation https://docs.novu.co/api-reference/events/trigger-event as well the ruby SDK implementation and don't see it documented
however if I read the e2e tests https://github.com/novuhq/novu/blob/6ffc13f105e3661ea0925be07691307b932473b3/apps/api/src/app/events/e2e/trigger-event-topic.e2e.ts it is covered and uses the the
events/trigger
endpoint
is this the intended way ? is the documentation behind?5 Replies
@Jakob
as well the ruby SDK implementation and don't see it documentedCould you please share more details on this? ruby sdk event trigger docs https://github.com/novuhq/novu-ruby?tab=readme-ov-file#events
GitHub
GitHub - novuhq/novu-ruby: Ruby SDK for Novu - The open-source noti...
Ruby SDK for Novu - The open-source notification infrastructure for engineers. 🚀 - novuhq/novu-ruby
how does this look like for when sending a event to a topic rather than the subscriber ID
payload = {
'name' => 'Trigger1',
'payload' => { # optional
'first-name' => 'Adam' # optional
},
'to' => {
'subscriberId' => '7789'
},
'transactionId' => '89kjfke9893' #optional
}
client.trigger_event(payload)
Apologies, I missed topic part
Looks like sdk does not support sending to topic.
Could you use our api directly?
ok yes that will work
from the Api docs themselves it was not clear that "to" can be a topic as the samples are all about subscriberId