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!
 
Yes, absolutely. Essentially all of those content types listed have create, update and delete events. Some of the content have more events, like thread supports featuring and unfeaturing.

More should be added between now and release where appropriate.
By any chance will the website and “about us” profile fields be included as well? This would be great as it would help filter out users whom are using those fields for Spam. 🙏🙏🙏
 
And there are open-source alternatives to Zapier in case you go over the free limit. A quick google search resulted in https://www.activepieces.com/ being one of them.

There are a number of solutions along the stack with the one end being "program it yourself" and the other end being "we do most of the heavy lifting" with all manner of things in betwixt.

Obviously the ones like zapier take advantage of the convenience and ease of use aspect for the end user and that does come with a cost if you start to make heavy use of it. Personally I will use Zapier/Make to trial any ideas I may have, before then making it into a custom code option.
 
By any chance will the website and “about us” profile fields be included as well? This would be great as it would help filter out users whom are using those fields for Spam. 🙏🙏🙏

Yes, all of that should be available.

The User example in the response in the Thread webhook I demonstrated is a little lacking right now for various reasons, but that is being polished up before release.

You’ll be able to receive most user data, I would expect, including email and custom profile fields, as well as the ones you mentioned.

Anti spam checking would be a good application. Although you’d need to wire something up to respond to a webhook that contains an undesirable user. I suppose at least it could notify you.

Longer term, we would want some deeper integration with Zapier, IFTTT or Make which might be able to work bidirectionally.
 
Yes, all of that should be available.

The User example in the response in the Thread webhook I demonstrated is a little lacking right now for various reasons, but that is being polished up before release.

You’ll be able to receive most user data, I would expect, including email and custom profile fields, as well as the ones you mentioned.

Anti spam checking would be a good application. Although you’d need to wire something up to respond to a webhook that contains an undesirable user. I suppose at least it could notify you.

Longer term, we would want some deeper integration with Zapier, IFTTT or Make which might be able to work bidirectionally.
Already got a ton in my head……

Xenforo Profile info sent to OpenAI where AI views the info and makes a call if it’s Spam like or not. If it’s spam, send me a Slack message, if it’s legit…..carry on.


This saves a TON of time!! Awesome work all!!

Will Smith Applause GIF
 
Are webhooks exportable so people can share their creations with each other? Or will this be a case of just writing a thread with the steps to set up instead of being a "release" bundle if you will?
I realise the third parties used won't be exportable in a lot of cases.
 
The admin side of things to set up webhook sending is so basic that the benefit of having an exporter isn’t really there.

It’s just give it a name, url, pick your event/s.

That’s it. 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.
 
The 3rd party services listed literally have hundreds of applications they can connect to. https://zapier.com/apps

I'm looking at the page you shared and thinking about possibilities (with question marks because I'm not 100% sure these ideas are feasible using the webhooks feature):

XF posts could work with Google Calendar to create events (virtual or real world) that members could join?

XF posts could update a Google Sheet to list folks want to participate in something or other (like pledging money to a cause)?

XF polls could be mirrored on Google Forms to generate analysis reports (pie charts, graphs, etc.)?

Multiple forums could feed a single source to aggregate data (Google Sheets/Forms) from different communities?
 
It would be nice to see this per-user basis, at least for notifications. To have a Webhooks section on the user account page. Some users are more tech-savvy and this would be very useful for them.
 
XF posts could work with Google Calendar to create events (virtual or real world) that members could join?
Yes
XF posts could update a Google Sheet to list folks want to participate in something or other (like pledging money to a cause)?
Yes
XF polls could be mirrored on Google Forms to generate analysis reports (pie charts, graphs, etc.)?
Not familiar with Google Forms specifically but maybe. We don't currently have an event in our code to trigger when a poll is voted on, although perhaps that's triggered by the thread_update event, @Naz?
Multiple forums could feed a single source to aggregate data (Google Sheets/Forms) from different communities?
Yes
 
This is awesome. Can this feature also receive and act upon webhook events? e.g., when an external event happens from an integrated source (e.g., turn on an IoT light, via IFTTT), a thread could be started in a designated forum? Which could then be configured to send a notification to users subscribed to the thread.
 
The admin side of things to set up webhook sending is so basic that the benefit of having an exporter isn’t really there.

It’s just give it a name, url, pick your event/s.

That’s it. 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.
Love the new xenforo development updates! Makes me want to program for it again. Really good stuff here.

The name could be optional, too? At least auto-filled like “hook-post-create-0”.
 
I'm also wondering if webhooks can be used between xenforo installations? Or if this is planned in future?
USER registers on x.com, notify y.com (or also register on Y) .
Thread posted on x.com, mirror thread on y.com

Essentially creating links between xenforo sites, or the sharing or certain information.
 
I'm also wondering if webhooks can be used between xenforo installations? Or if this is planned in future?
USER registers on x.com, notify y.com (or also register on Y) .
Thread posted on x.com, mirror thread on y.com

Essentially creating links between xenforo sites, or the sharing or certain information.
xenforo would need to know how to handle webhooks then. If it could, some of current internal xenforo logic could use the webhooks then. Webhooks are a very powerful update.
 
Back
Top Bottom