XF 2.3 Automate workflows with webhooks

hys_5_make_create_webhook.png
hys_5_spoiler.png xenforo.com_community_threads_a-first-look-at-xenforo-2-3.216641_ (1).png xenforo.com_community_threads_a-first-look-at-xenforo-2-3.216641_.png

In what is probably one of the worst kept secrets in XenForo 'Have you seen...?' history, the eagle eyed amongst you may have picked up on one or two... or three... clues that we may be talking about this soon, and the day has finally arrived! Today we're excited to show you our take on the highly requested webhook implementation in XenForo.

For those of you who haven't heard of webhooks before, they are a powerful utility that allow one application or service to send information to another when certain events occur. These can be everyday actions such as when making a payment for access to a product or service, or more specific implementations such as having a new Thread from your forum posted to Discord automatically.

It is likely that even if you're not a developer type person then you have utilised or encountered webhooks in one way or another at some point without realizing.

Here at XenForo, we automate a lot of our workflow using webhooks, some of which may be obvious, others less so. For example, we receive a webhook from GitHub every time that we fix a bug report - this is what automatically marks bug reports as fixed. Another example, is we send a webhook to Slack every time someone posts a bug report or reports content.

Webhooks as a general concept, can be a very flexible tool with an endless amount of use cases, the ability to send webhooks whenever certain events occur on your forum to another system is going to be something you can take advantage of starting with XenForo 2.3.

Now while webhooks may appear on the surface to be something targeted towards developers, there are a number of fantastic third party automation services which are capable of receiving webhooks and triggering actions. These services, such as IFTTT, Make, and Zapier, offer a convenient and user friendly way to automate and integrate applications within your website with thousands of integrations already available.

Closer integration with one or more of these services is being considered for a future release, but all three of the above examples do accept webhooks as a trigger.

As ever, there's a lot to talk about in this one so feel free to jump to a specific section below:
We're excited to hear what you think about webhooks coming to XenForo and what kind of use cases you'll be exploring. Let us know below.

Have you had enough yet? We haven't. There's more to come next week!
 
Until I read this thread, I didn't know I needed this. 😲

The beta release cycle is going to be insane. I hope the XF team have stocked up on Mt Dew and snacks. (y)
 
This will be helpful so I can replace my custom code that reports an error to a slack channel. So glad to see this integrated into the main framework. Nice work devs.
 
Explain use cases so we can consider them for the future.
Wouldn't the answer to this be subjective? If there are thousands of possibilities with other services with what we're getting with webhooks in 2.3 (can't wait btw!) then wouldn't it be the same, bi-directional?

Maybe one example could be that if user registers to a wordpress site, then that data is inserted as a new user register on the XF site with the same data. Additionally, when a new user is registered via that pathway (from wordpress), a new thread is created in a specific node welcoming that user which could be a different thread/message than other users who may register organically on the XF site.
 
Wouldn't the answer to this be subjective? If there are thousands of possibilities with other services with what we're getting with webhooks in 2.3 (can't wait btw!) then wouldn't it be the same, bi-directional?
Would that not just be the XenForo REST API, which has existed since 2.1? The webhook itself just sends an HTTP request to an API endpoint

Both of your examples would already be possible:
Maybe one example could be that if user registers to a wordpress site, then that data is inserted as a new user register on the XF site with the same data. Additionally,



a new thread is created in a specific node welcoming that user which could be a different thread/message than other users who may register organically on the XF site.
 
Explain use cases so we can consider them for the future.
Moderation…….

If a user posts something it can be sent to OpenAi to be checked for hate or Spam. If it seems to be Spam it can automatically place the content into Moderation for human review. If it seems legit…..we all move on. Having this only work one way does save time by having AI send a message or something, but it does still limit things.
 
Explain use cases so we can consider them for the future.
If a new user registers on WordPress, then create user on XenForo.
If a user buys an account upgrade on another platform, then apply user upgrade to account on XenForo.
 
Would that not just be the XenForo REST API, which has existed since 2.1? The webhook itself just sends an HTTP request to an API endpoint

Both of your examples would already be possible:





I understand from a technical point of view, this is possible (I know with my example, for instance - that addon that's already available for wordpress/XF, I think by yourselves too - most likely uses that method) but with the new webhooks function coming for 2.3 - Not only is it going to be powerful, it's also going to be quite simple, especially for people that are versed in simple automations anyway. With bi-directional functionality, it should be just as easy. Easy for the every-day forum owner.
 
Some automation I would love to see are populating XenForo when external content becomes available. For example :

IF a specific YouTube channel publishes a new video THEN post it to XenForo media gallery.

IF a new study about a specific topic is published on reseatchgate or pubmed THEN post it to XenForo resource manager.

These are just a few examples but you get the gist. If an external source offers content as well as api / webhooks to get it OR if an intermediate application exists to fetch that content, then it would be really useful to be able to pull it into xenforo and addon content.

@Chris D could you please share your thoughts on this topic?
 
Last edited:
Back
Top Bottom