Hook, Line, and Sinker
We have added the really cool plugin developed by mitcho (Michael Yoshitaka Erlewine) called HookPress. HookPress lets you add webhooks to WordPress, providing an easy way to develop push notifications when various events happen on your blog (like publishing a post for instance).
You can now find this under the Settings Module in the dashboard.
As part of the process of integrating HookPress into WordPress.com we trimmed back some of the features (to ensure it didn’t impact performance or security) while improving other aspects of the plugin, like the management interface. To guide you through the rigs and roles of setting up and developing with this new tool check out the Webhooks support page.
There are currently three actions that you can enable a hook for: comment_post, publish_post, and publish_page. We’ll be adding support for more hooks in the future.
So what does all this mean? Well, for starters this is one of those features targeted at developers. Let’s look at a hypothetical example; say I want to get a text message every time a new comment is submitted to my site. First you need to setup a URL that will accept an HTTP POST request with the comment data and then does all of the heavy lifting of taking that data and shipping it off to your phone in the form of a text message. Then you add a new hook via the Webhooks section of the admin area for the ‘comment_post’ action, selecting which fields you want and the URL that you setup earlier. That’s all there is to it, WordPress.com will automatically send an HTTP POST with the fields you selected to the URL you configured for each comment that is submitted. A contrived example to be sure, but it gives you an idea of what the process looks like.
Another big thank you to mitcho for all his brilliant work on this super cool plugin and look forward to seeing what people do with this!
Apr 14th at 11:05 pm
interesting, gonna try out now!
Apr 14th at 11:06 pm
If you have any hooks in core WordPress you’d really like us to support, please let us know here in the comments.
Apr 14th at 11:09 pm
Another great plugin. Congrats, WordPress!
Apr 14th at 11:10 pm
Add hook for “submit for review” (pending) event and save and draft i definitely need this! thanks for awesome work!
Apr 14th at 11:21 pm
That’s a great suggestion! I’ll add that to our test list.
Apr 14th at 11:30 pm
I would really love to be able to sent my post as an html or even plain text file to a Git repo, hosted on Github perhaps. I know this might be a little complicated, but it would be an awesome feature for us hacker-types.
Apr 14th at 11:35 pm
If you create a URL that does the git repo part then you can point a webhook at it to have the post data sent.
Apr 14th at 11:48 pm
Thank you mitcho! Seems pretty foolproof even for me, tech-unsavvy as I am.
Apr 15th at 12:00 am
If I’m being honest…I don’t understand. But thanks..
Apr 15th at 12:01 am
Nice I must say! Though I’m skeptical, if I’ll use it or not.
Apr 15th at 12:07 am
Now it’s there for you if you need it.
Apr 15th at 12:36 am
wow this sounds way too complicated
Apr 15th at 12:53 am
Is this something someone uses with Yahoo Pipes? Honestly, not making any sense until I see a working example.
Apr 15th at 1:15 am
You could create a Yahoo Pipe to be the URL that receives the hook data. Then you could make use of the various pipe features to process it.
Apr 15th at 1:00 am
Super cool
Apr 15th at 1:01 am
Just to simplify it a little, can a webhook be compared to a trackback? For example, if I make a post and specify a trackback, WP will send that information to the URL in the trackback.
Similarly, this webhook would send a notification/data to the URL specified.
Correct me if I’m wrong.
Apr 15th at 1:16 am
You could think of trackback as a specific, special case webhook. The concept of webhooks is more generalized, simply calling a URL to provide it data when certain events happen. In this case they are WordPress actions, but from the webhook point of view they could be anything.
Apr 15th at 2:05 am
OH KAY, i have nooooo idea what this means, but I LOVE WORDPRESS SO MUCH this just makes it even cooler.
Apr 15th at 2:17 am
This is confusing, can a video of how to and the finished product of webhooks be created?
Apr 15th at 6:20 pm
Mitcho has a video he did for the original WordPress.org plugin – http://mitcho.com/code/hookpress/
Apr 15th at 2:26 am
Sounds interesting, I have to take a look at it. *bad pun alert* I might become HOOKED on it.
Apr 15th at 2:50 am
I will definitely make some use of this plugin. Score one for Awesome!
Apr 15th at 3:08 am
Honestly, I still confuse this feature.
It means receive data from other site or send data to other site?
Thx
Apr 15th at 4:09 am
This will send data to a URL of your choice, which will then be sent the data each time the specific action happens (like a new comment).
Apr 15th at 3:20 am
wow! this is absolutely cool! another plug-in in WP world!
Apr 15th at 4:31 am
Sweeet!!!! Thank you
Apr 15th at 5:06 am
This is just great. I am getting a new idea on ways I can use this almost every minute. Thnx.
Apr 15th at 5:18 am
looks promising…..
another good feature !!!!!
Apr 15th at 6:52 am
i can’t understand it,
please , i want to know more about this plugin , how i can recieve comments on my mobile ? what i should to type in url field?
plaese explait in more simply , especialy too many peaople use wordpress in arabic and his blogs in arabic type , so we need someone explain it in arabic
Apr 15th at 6:16 pm
This is a feature targeted for developers, to use it you’ll need to be able setup a URL that can accept HTTP POST requests with the data that WordPress provides.
Apr 15th at 7:10 am
One thing that first comes to my mind is: sending an email (to a list of addresses) whenever a post is published (or a page is added/changed). Maybe this is already supported somehow? If not, of course one could subscribe via RSS, but in many cases email would be nicer than RSS.
Apr 15th at 7:42 am
This is a surprisingly advanced feature for a [free] hosted blog service.
The barrier of entry to WordPress.com is low, but to set up your own webhook requires web hosting, a working knowledge of a server-side language, how to handle HTTP POST requests, and ultimately how to write something useful with it.
Maybe a future blog post could highlight some publicly available webhook services that WordPress.com users can use to do interesting things when content is published.
Apr 15th at 5:35 pm
One of the other comments here already mentioned using Yahoo Pipes with this. Another site that could be used with this is http://www.scriptlets.org/
Apr 15th at 8:29 am
hmm, although i am not going to use this feature soon, but i think i might use it when my blog gets more traffic
Apr 15th at 9:32 am
Sounds useful, but it could help to have a non-geek paraphrase or link to wp dictionary of terms, or else it may end up as another ‘setting’ that is simply blanked by more right brained users who could potentially benefit from it.
Apr 15th at 4:53 pm
This is a feature targeted for developers who want to pass data from events (like a new comment) in WordPress into another system of their own design.
Apr 15th at 9:47 am
Wrapping my head around this one for now and may need some suggestions for apps that can use this info.
(Meantime, I don’t think that Dashboard screenshot was from a COM blog. Just sayin’…
Apr 15th at 11:32 am
I’d really like to know more about this Hook plug-in as I’m not really clear on what this “does.”
Apr 15th at 4:51 pm
There’s more info at http://wordpress.org/extend/plugins/hookpress/ (linked in the post), the original WordPress.org plugin that this was based on.
Apr 15th at 5:47 pm
Cool Tool
Thank you for this! It really helps and works fine on my blog.
Apr 15th at 6:15 pm
I finally found it. Do you have a Webhook for Dummies tutorial?
Apr 15th at 6:38 pm
I have created a web app that will let anyone create their own webhook for their WordPress.com blog. Like the example Joseph mentioned in this post, my first webhook simply notifies you via SMS when someone comments on your blog.
To get your own webhook, visit http://qwiktxt.com/webhook/.
At that site, you’ll need to register for an account. The site itself is actually powered by WordPress.org install of WordPress, so registering should be familiar to you.
Once you’ve created an account, your webhook URL will be http://qwiktxt.com/webhook/YOUR_USERNAME. Then you’ll need to follow the instructions on the page I linked to above to setup your webhook on your WordPress.com blog.
@Joseph Scott – If you get a chance, check out my implementation and let me know what you think.
Apr 15th at 8:22 pm
Nice, thanks for sharing this!
Apr 15th at 7:55 pm
I love Word press! You folks keep up the great development!!!
Apr 15th at 10:49 pm
Cheers. There wasn’t quite enough info initially to make sense of its applicability.
Apr 17th at 12:07 am
This is just great this new feature gives a lot more flexibility to us users. We can do a lot more now with our blogs at WordPress.com
Thanks for bringing us this feature.
Apr 17th at 1:10 am
Looks pretty neat…going to look into this.
Apr 17th at 2:53 am
Not sure I understand much here, let me explore the links
Apr 17th at 12:34 pm
I’m sure it will come in handy when I figure this place out.
Apr 18th at 10:57 am
i don’t know if I understand the meaning of this plug-in. Or maybe I don’t understand English well enough as a Finnish-speaker. BUT: why should I need this? I already have my e-mail and internet connection in my iPhone and I get my blogs information through my e-mail. I think it’s a waist of time to read the same things also from my text messages. Or please correct me and explain to what this is all about? Why this is “so cool” again?
Apr 18th at 7:25 pm
I am new to all of this, but give me a couple of days and I will have it all down.
Apr 19th at 1:13 am
When will you guys add tachyon and wormhole generator plugins? I’m also looking forward to phasers. Thank you.
Apr 19th at 7:22 pm
Those are still stuck in R&D.
Apr 19th at 8:02 pm
@Krisu – Something like the comment notification example mentioned in this post would not be useful to you in your case. However, the cool thing about webhooks is that they open the door for third-party developers to build all sorts of apps that work with WordPress.com. Given time, third-party WordPress devs will hopefully come up with all sorts of useful applications for this new feature.
Apr 20th at 2:34 am
Just learning to Blog, Yes where have I been. Well there are no real excuses. Time to catch up
Apr 20th at 3:59 am
Interesting. I am still trying to figure out how to do the slide show.
Apr 20th at 6:06 pm
Pretty neat…I’ll have to give that a try
)
Apr 20th at 6:53 pm
This sounds like a great feature…I am new to WordPress and I am looking forward to becoming familiar with this great writers outlet!!
Ramona Kent
Author of Anomar’s Journey
Apr 21st at 10:41 pm
The more help we can get the better…Thanks so much!!
Apr 22nd at 4:22 am
Awesome. I’m looking forward to playing with this.
Apr 22nd at 9:42 pm
Love it! Love webhooks. The question now is can we get Oauth subscriptions working?
For example – bob wants to find out whenever I publish. It would be great if he could use Oauth to register at my public webhooks to say he wants to know…
Apr 23rd at 10:16 pm
That’d be a bit fancier than we’re ready for yet.
Apr 23rd at 6:55 am
Is there anyway to use webhooks to send the culled data to the blog administrator’s public e-mail address rather than to a website? (I tried to do this by substituting “mailto:myname@myispn.com” in the URL field but got message it was not a valid url.) What I’m trying to achieve is to be able to get an automated report containing the fields title, post-date,post-url, plus the url’s and location text for all links to images, files, and external sites that I’ve embedded in the content area of each post immediately after publishing it.
And if that is (or in the future) will indeed be possible, It’d be even more wonderful if I could somehow use webhooks to generate and send individual reports for all posts I’ve published in the past: i.e. a one-time action triggered upon enabling that webhook and having it disable itself upon completion of the looped task.
Apr 23rd at 10:17 pm
Sorry the whole idea of webhooks is that they’re on the web, not emailhooks.
Apr 23rd at 4:37 pm
When will we be able to add Google Adsense to our WP blogs?
Apr 23rd at 7:51 pm
Hi David, here are the current rules on adding AdSense. Blogs with more than 25,000 page views per month can request Ad Control on that same page.
Apr 23rd at 6:32 pm
Very cool. I’m gonna check it out.
Apr 24th at 7:38 am
great and perfect.
anna
Apr 24th at 9:47 pm
Lovely….another gizmo to play with!