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!
 
Has anyone who has moved to xf 2.3 done anything interesting with webhooks yet?
I’ve created a few things already. I’m using web hooks to notify a slack channels, e.g user reports. I also have something where if a thread is posted in a request form it sends a slack notification along with an email to the team. Not sure if you would classify that as interesting though
 
Has anyone who has moved to xf 2.3 done anything interesting with webhooks yet?
While not directly part of XF, I added a way to receive Webhooks into WordPress and have used them for a couple of basic user -> user actions like register and delete so far. There are so many possibilities with this tech that I am not fully sure what to pick first. 🤔

Screen Shot 2024-09-17 at 14.25.17.webp
 
The STRIPE api strongly recommends using webhooks for some of their acceptance methods, such as wire xfers.

I'm curious if anyone knows how I would go about added that to our existing stripe/xf setup?
 
You can do this using make.com.

Define webhook first,
select some actions that will trigger this webhook (new thread, update, delete etc.)
then identify that webhook information from the make.com site.
after you have done this process smoothly, when one of the actions you have defined for the webhook takes place; your thread will be published on social media. I used it on Linkedin, Facebook, Pinterest, Wordpress without any problem.
However, if you are going to use free membership from make.com, the system may give an error after a certain limit.
 
Is there any documentation listing all the content types for webhooks?

I'm specifically wondering if I can use a webhook with User Upgrades, or when a user is added/removed from a group.

I'm still on 2.2 so I can't check myself.

Thanks.
 
Is there any documentation listing all the content types for webhooks?

I'm specifically wondering if I can use a webhook with User Upgrades, or when a user is added/removed from a group.

I'm still on 2.2 so I can't check myself.

Thanks.

Not sure about official docs somewhere, here's a list of all potential events:


Posts​

10 events
  • post.insert
  • post.update
  • post.delete
  • post.bookmark
  • post.upvote
  • post.downvote
  • post.react
  • post.unreact
  • post.report
  • post.warn

Profile Posts​

7 events
  • profile_post.insert
  • profile_post.update
  • profile_post.delete
  • profile_post.react
  • profile_post.unreact
  • profile_post.report
  • profile_post.warn

Profile Post Comments​

7 events
  • profile_post_comment.insert
  • profile_post_comment.update
  • profile_post_comment.delete
  • profile_post_comment.react
  • profile_post_comment.unreact
  • profile_post_comment.report
  • profile_post_comment.warn

Reports​

3 events
  • report.insert
  • report.update
  • report.delete

Resources​

6 events
  • resource.insert
  • resource.update
  • resource.delete
  • resource.bookmark
  • resource.feature
  • resource.unfeature

Resource Ratings​

7 events
  • resource_rating.insert
  • resource_rating.update
  • resource_rating.delete
  • resource_rating.upvote
  • resource_rating.downvote
  • resource_rating.report
  • resource_rating.warn

Resource Updates​

8 events
  • resource_update.insert
  • resource_update.update
  • resource_update.delete
  • resource_update.bookmark
  • resource_update.react
  • resource_update.unreact
  • resource_update.report
  • resource_update.warn

Resource Versions​

3 events
  • resource_version.insert
  • resource_version.update
  • resource_version.delete

Threads​

8 events
  • thread.insert
  • thread.update
  • thread.delete
  • thread.upvote
  • thread.downvote
  • thread.feature
  • thread.unfeature
  • thread.poll_vote

Users​

5 events
  • user.insert
  • user.update
  • user.delete
  • user.report
  • user.warn

User Upgrades​

6 events
  • user_upgrade.insert
  • user_upgrade.update
  • user_upgrade.delete
  • user_upgrade.purchase_complete
  • user_upgrade.purchase_reinstate
  • user_upgrade.purchase_reverse

XFMG Comments​

3 events
  • xfmg_comment.insert
  • xfmg_comment.update
  • xfmg_comment.delete
 
@Chris D

Does the webhook reattempt delivery if it does not receive a 2xx status code response from the listener endpoint? If so, how long before it is marked as failed, and is there any documentation on this?

Thanks.
 
Can you configure actions if webhooks are received? For example upgrades and downgrades to a user group if using a currently not built in external payment provider?
 
There's no industry standard which is why, unless you're writing your own webhook receiver, you will want to use a service like IFTTT, Zapier, or Make (there are others).

These provide a layer of abstraction between one service and another, translating the payload format from one service into the payload format required by another service.

There are literally endless integrations.

@Kier and I were musing yesterday whether we could make his office lights flash when a post is made in a particular forum. The answer is, yes.
So could this be used to send you a text message when someone hits the report button on a forum?
 
So could this be used to send you a text message when someone hits the report button on a forum?
In theory yes you could using Make.com. When a user hit's report button it could trigger a web hook to send data. This data can then be passed onto a service such as TextMagic which should be able to send you the text message. I'm sure there are other services (some maybe cheaper) which could handle the actual sending the text, I just selected this one as it's the first that came up in the list on Make.com's scenarios. I suspect many of these will be paid features......it's just a matter of finding one that fits best for you.

Additionally you can setup services such as Slack, Telegram or Teams that all have App's that could create a push notification when reports are created. These services are mostly free and will provide a path similar to text messages that may work depending on your scenario.
 
In theory yes you could using Make.com. When a user hit's report button it could trigger a web hook to send data. This data can then be passed onto a service such as TextMagic which should be able to send you the text message. I'm sure there are other services (some maybe cheaper) which could handle the actual sending the text, I just selected this one as it's the first that came up in the list on Make.com's scenarios. I suspect many of these will be paid features......it's just a matter of finding one that fits best for you.

Additionally you can setup services such as Slack, Telegram or Teams that all have App's that could create a push notification when reports are created. These services are mostly free and will provide a path similar to text messages that may work depending on your scenario.
Thank you.
 
Back
Top Bottom