r/WordpressPlugins • u/Efficient_Try_9136 • Sep 17 '26
[FREE] I built a WordPress webhook plugin, posts, comments, uploads and signups all POST clean JSON to any URL
I do automation for a living. n8n workflows, ComfyUI pipelines, Hermes agents. Most of my work is getting one system to tell another system that something happened.
WordPress is the one that won't. There's no webhook in core. If you want your site to tell n8n that a post just went live, you write it yourself with add_action and wp_remote_post, or you have n8n poll the REST API on a schedule and burn workflow runs on "nothing changed yet".
I needed this for my own workflows often enough that I built it as a plugin instead of pasting the same snippet into every site. It's free and it's on wp.org now.
You paste one URL into Settings, tick the events you want, and each event POSTs a JSON payload to that URL. No API key to generate, no account to sign up for, nothing going through a third-party server.
Events you can toggle: post published, updated, trashed, permanently deleted. Comment added, comment status changed, comment deleted. Media uploaded. New user registered. Works on any post type, and the post payload can include the excerpt or the full content if your workflow needs it.
A published post sends roughly this:
{
"event": "publish",
"post_id": 42,
"title": "How to automate WordPress",
"slug": "automate-wordpress",
"url": "https://example.com/automate-wordpress",
"post_type": "post",
"status": "publish",
"author": "admin",
"timestamp": "2026-09-05 12:00:00"
}
There's a test button that sends a sample payload so you can check the receiving end before you trust it live, and a log in wp-admin showing every send with its HTTP status. It keeps the last 50.
Things it doesn't do, because I'd rather you know now:
It fires on events, not on a schedule. If you want a nightly digest of everything that happened, you assemble that on the receiving side.
There's a cool-down timer, 15 seconds by default and settable to 0. It stops a fast sequence of saves from firing the same event over and over. The trade is that if you publish and then edit again inside that window, you get one event instead of two.
There's no retry queue. If your endpoint is down when the event fires, the request fails and you see the error code in the log. Nothing re-sends it later. Retries would mean storing state or running a cron, and I wanted this to stay one file with no database tables.
https://wordpress.org/plugins/yak-event-hooks/
What I'm unsure about: I only wired the events I actually needed. Taxonomy changes, plugin updates and WooCommerce order events are missing, mostly because I didn't want to invent payload shapes nobody asked for. If you're trying to start a workflow on an event that isn't in the list, tell me which one and what the payload should carry.
1
u/Efficient_Try_9136 Sep 17 '26
Setup:
Plugin page: https://wordpress.org/plugins/yak-event-hooks/
Needs WordPress 5.0+ and PHP 7.4+. If the test shows a 403 or 404, it's almost always the URL not being live on the receiving end yet rather than the plugin.
1
u/TopSydeWP Sep 19 '26
two things i'd want before putting this on client sites: fire the request on
shutdown(or a single-event cron tick) instead of inline in the save, otherwise a slow endpoint stalls the editor save for the whole wp_remote_post timeout, and add an optional shared secret with an HMAC of the raw body in a header so the receiver can verify the payload actually came from that site.for events,
upgrader_process_completeplusactivated_plugin/deactivated_pluginwould be the ones i'd use most. we run maintenance across about a hundred sites and the thing that bites you is an update landing out of band, so a payload with component type, slug, old version and new version is enough to reconcile against your own inventory. also worth usingtransition_post_statuswith the old status in the payload, since "publish" alone can't tell a workflow whether it was a new post or a scheduled one flipping over.1
u/sg_xp Oct 05 '26
Does it support WooCommerce order statuses?