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!
 
Cool.

Will this be released with helpful tutorials (posting to social media, etc.) until user-friendly integration is implemented?
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.
 
Last edited:
Webhooks are a nice & totally unexpected feature :)

The Secret is a value that is sent in the XF-Webhook-Secret request header when sending the webhook
Why XenForo always tends to introduce custom headers is somewhat beyond me :)
It would be nice if was possible to configure the header:

Will there be a way to customize the webhook data/format that is sent? So we wouldn't need to go via Zapier or Make and instead to direct endpoints?
The would be really nice.
The most powerful approach to achieve this probably would be a callback (like te template modifications, pages, etc.) to pre-process the payload (& headers).
A less powerful (but maybe easier to grasp) approach could be to allow template syntax for a webhook to build the final payload.

Don’t see an exporter being useful. Especially as you wouldn’t want to export the webhook target URL being that it is very application specific.
There is a usecase where export / import would be pretty useful:
If a development instance is used to prepare an upgrade of a production instance, this would allow to setup everything in the dev env and just import all neessary webhooks into production after upgrading teh production system.

Now if XenForo even implemeted an OIDC provider ... that would be really cool.
 
I am not sure if this can be happen but I guess developers can use this feature for addons license check as well. Is this possible with webhooks?
 
@Chris D
Use case question...
Currently I send different emails at different times (so many days after first registration) after a registered user signs up to my forum if they have not yet upgraded to a Premium membership, I currently do this manually, is this something that could be automated using webhooks?
 
@Chris D
Use case question...
Currently I send different emails at different times (so many days after first registration) after a registered user signs up to my forum if they have not yet upgraded to a Premium membership, I currently do this manually, is this something that could be automated using webhooks?
Probably!

Are string class identifiers no longer used?? And we will also learn about this later in HYS?
Oops. Yes they can still be used but we now do this by default.
 
There are so many possibilities and the biggest thing in my opinion, is that this opens those possibilities for non-developers.

  • New report? Post it to slack/discord chat.
  • New user? Add them to a mailing list (when they agree to it)
  • User gets awarded a special unique trophy? Send them an email in a Gmail thanking them
  • user purchases a product/user upgrade? Wait X amount of time to send email asking for review somewhere
  • Auto post specific threads to Facebook/twitter

This can open up so much for a variety of communities.
Yup. For me, I'd probably be using it with Slack/Discord and Github at least :D
 
@Chris D ,

What is your view on developing a feature to automatically add content to social media accounts?


In the link above, there is a Wordpress plugin that adds content to almost all social media accounts in a very advanced way.

Social media, is very important both to increase the power of our sites and to reach larger audiences.

This kind of enhancement will be appreciated by all XenForo users.
 
@Chris D ,

What is your view on developing a feature to automatically add content to social media accounts?


In the link above, there is a Wordpress plugin that adds content to almost all social media accounts in a very advanced way.

Social media, is very important both to increase the power of our sites and to reach larger audiences.

This kind of enhancement will be appreciated by all XenForo users.
This feature will do exactly that. If you're not familiar I'd imagine within a week or 2 of release someone will have released a bunch of how-to articles to do exactly this.
 
This feature will do exactly that. If you're not familiar I'd imagine within a week or 2 of release someone will have released a bunch of how-to articles to do exactly this.
hmm, that's great.
We're looking forward to it.

While it’s not using Xenforo, this video should give you an idea. I suspect that Xenforo’s setup will be ALOT easier as it’ll already have all the hooks setup, you’ll be able to basically skip to about the 5 minute mark in the video.
 
This feature will do exactly that.
Erm ... no.

As it is right now it wouldn't be possible with XenForo 2.3 to directly post content to Facebook, X, etc. as those targets don't understand XenForo payload - an intermediate service (like Make, Zapier, IFTT, etc.) would be required.

The WordPress plugin linked by @SelamT can post to various social media without an intermediate service so this a lot different and not exactly the same.

If you want to be able to directly post content from XenForo to social media sites a deeper integration would be necessary; most likely webhooks would need to be able to generate payload in the target format (rather than XenForo format) and support OAuth.
 
Top Bottom