Trigger webhook on topic publish

I have a scenario where topics are created by staff for later publishing in a category only visible to staff. Topics are then scheduled for publishing in a public category by a topic timer. This public category has a webhook attached to it and the webhook is triggered on Topic Event (description: When there is a new topic, revised, changed or deleted).

Webhook starts as expected when I create a new topic in this public category manually, but it doesn’t start when the topic is published by a topic timer.

I guess that the change event on the topic (in this case assigning a new category) is processed on the staff topic (which doesn’t have a webhook attached) and not on the public topic. If I manually edit the newly published topic the webhook is triggered as expected.

Would it be possible to add publishing to Topic event, so that it would trigger the webhook on: When there is a new topic, revised, changed, deleted or published.

2 Likes

This has been implemented in the following commits.

https://github.com/discourse/discourse/commit/1056dd16d3eabf889e9857f2de827719645af269
https://github.com/discourse/discourse/commit/8cb189024506d5857870e7b21f6c3d8c9dcf76e6

4 Likes