Incoming Web Hooks


(Matt Howard) #1

Does Discourse have functionality to receive an incoming webhook from a service like PagerDuty and post it to a forum? Basically I’d send alerts from PagerDuty to the WebHook URL for Discourse and it would create a new forum topic.

If so, is there a guide that I can follow to set this up?


(Jay Pfaffman) #2

You’ll need to make calls to the Discourse API, perhaps using some intermediary like Zapier, OR write a plugin to catch whatever arbitrary incoming stuff.

If you can get PagerDuty to conform to Discourse’s API, then you’re golden. You can search here for examples and/or see How to reverse engineer the Discourse API.


(Matt Howard) #3

Thanks @pfaffman. So there is only webhooks configuration to send FROM discourse TO another site?


(Jay Pfaffman) #4

Webhooks go out. API calls come in.


(Matt Howard) #5

ok, i only asked because sites like google chat will give you a url you can use to point web hooks to so I could copy that url and put it in pagerduty and have pagerduty send an alert to the google chat webhook url and post in google chat. wasnt sure if there was similar functionality with discourse


(Rafael dos Santos Silva) #6

We support some webhooks, like for email bounce from some SMTP providers in core, and some webhooks in plugins, like Patreon webhooks in the Patreon plugin.

For your need, PagerDuty webhooks into Discourse topics, you will need to write a plugin.

We have a very similar plugin in early stage here: GitHub - discourse/discourse-prometheus-alert-receiver