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!
 
You can change how the webhook is encoded. By default this is application/json but you may also want to use x-www-form-urlencoded instead.
It would be nice if the XenForo API had the same flexibility, eg. could accept application/json additionally to x-www-form-urlencoded. :)

Seems a bit strange to me that webhooks support JSON, but the API doesn't.

 
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.

THIS!!! 100%
Auto account creation and account/group modifications when products are purchased on a platform (in my case, Kartra).
That would be so helpful.
 
THIS!!! 100%
Auto account creation and account/group modifications when products are purchased on a platform (in my case, Kartra).
That would be so helpful.
In the meantime have you tried with this:

 
Last edited:
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.
What is the advantage of using a 3rd party service to post to Twitter and Facebook versus using their existing APIs?
 
Last edited:
Great feature, loads of applications come to mind. I think I'd love to see some special attention around subscriptions as well though I assume we'd need bidirectional support for things like if Stripe payment is refunded. Sending a user a notification on platform when something specific (as in not currently covered) happens with their subscription could be extremely valuable.
Absolutely, enhancing subscription management with bidirectional support for payment events and personalized notifications is a great suggestion. We'll explore this for future updates. Thanks for sharing
 
Last edited:
How quick are webhooks supposed to push? I put in a Guilded webhook (which is Discord compatible, and almost same format) and I've tried all sorts of mix-n-match options.
 
How quick are webhooks supposed to push? I put in a Guilded webhook (which is Discord compatible, and almost same format) and I've tried all sorts of mix-n-match options.
Mine were happening within a second or so. I was using the post new thread.
 
Yea, I had Thread -> Send all events. No go. Tried Guilded and Discord (both use very similar formatting). Should we take this to DM to not flood this thread?
You're right that this thread isn't for support.

You should post a thread detailing what you are trying to achieve, how you have things set up, what documentation you've been following for the receiving side etc.

Difficult to provide advice at the moment as we don't have sufficient info.
 
You're right that this thread isn't for support.

You should post a thread detailing what you are trying to achieve, how you have things set up, what documentation you've been following for the receiving side etc.

Difficult to provide advice at the moment as we don't have sufficient info.
I don't see a way to add a 2.3 Beta tag, so where's the right spot to ask for webhook configuration, since I don't think it's a bug (not yet, at least, not confirmed).
 
Just post anywhere you see fit, threads don't require a prefix.
If I can think of what to say I'll make a thread, but I'm getting incredibly confused on how to work it. Have no idea how to properly send it out. I'm not very tech-savvy, I'm more visual than "format X in Y variable".
 
Hi @Chris D,

What should we do to bring the fields in the picture?
Will we paste the link taken from the make site to our xenforo site as webhook, or the one in the webhook.site section?
things are a bit complicated there.
it would be better if you explain it to those who have no knowledge of these issues :(


1713022938898.webp
 
Apologies if this has been answered elsewhere and I missed it. How granular are these webhooks planned to be?

For instance, if I want a webhook to fire whenever a user is added to a specific user group, would it be possible to configure the webhook to only fire in that specific event or would I need to send a generic "user updated" webhook and code my endpoint to filter out changes to preferences or usernames or other things I don't particularly care about?
 
would I need to send a generic "user updated" webhook and code my endpoint to filter out changes to preferences or usernames or other things I don't particularly care about?
Currently you would have to do that or implement User criteria yourself.
The system has the capability to have criteria for any content type but only Thread criteria has been implemented so far.


One thing I really dislike about the webhook criteria system is that, alrhough it basically shares (via duplicates code) a lot of its logic, it is incompatible with the existing criteria system.
So all existing user criteria can't be used for webhooks, they would have to be implemented sepcificaly for webook criteria (againy, most likely by duplicating code).

Ideally I'd like to see a unified criteria system taht works everywhere (webooks, notices, usergroup promotions, etc.)
 
Last edited:
Hi,

I wish we had the chance to use it on Instagram.

We cannot transfer images using webhooks :(
It also does not show the pictures added to the articles when you press social media.
Only the og:image image of the site appears.

It would be nice to have a "Featured Image".
 
Back
Top Bottom