Discourse Webhooks - Help

I’ve been working on implementing a webhook client in JS. In order to get the proper shape of the sent events I created a server to listen for the events and write the posts to a file. Then I TDDed the server to handle the events and throw them into a database for later analysis.

It seems like one of the recent updates made a change to the webhook code and I was missing events for a day or so. I would love to build this server as an additional way to monitor, but would need some more information about the webhooks feature than is available in posts on meta such as full request schemas for each event type. Also some insight into any upcoming changes to that feature would be appreciated.

I think there are a lot of users who would find this type of event tracking very helpful. I plan to post a full tutorial on setting this system up along with some canned dashboards.

What kind of information do you need? :slight_smile:

@tgxworld Thanks for getting back to me!

I would like:

  • Full list of possible events emitted from the webhooks. Currently I have the following, but I would imagine that there are CRUD for topic,user, and post events_types:
    • post_created
    • post_edited
    • topic_created
    • topic_edited
    • topic_destroyed
    • user_updated
    • user_created
  • For each event, sample JSON payloads to test against
  • Any planned changes to the API or webhook payloads
6 Likes

Any chance on getting this stuff?

Sorry, but this would take quite a lot of work to do, and we only do custom work for our Enterprise customers.

@fantasticfears might be available to work on this as a freelancer though. If you’re able to pay for this work, you should get in touch with him about this.

6 Likes

I haven’t received message from Jack a while back. Anyway, here is the work for anyone interested.
There is a discourse_webhook_payload.rb inside the gz file. It generates payload format in JSON.

https://d11a6trkgmumsb.cloudfront.net/original/3X/2/f/2f58dc35111add0b6baaac12e4dd3874027afed0.gz

1 Like

Hi all.
I just activated the webhook and it works fine.
But is there a way to get more events: like on a topic / on an answer…

Thanks for your help.

Could you elaborate more on this? What fields do you need from the topic?

2 Likes

Hello,

  • A user like a topic
    If I had the topic_id and ID of the user who perform the like, I will be able using the API to get all informations I need.
  • A user like a message
    If I had the post_id, topic_id and ID of the user who perform the like, I will be able using the API to get all informations I need.