By: Kevin Hale Back to Guides
Today’s feature is dedicated to the developers interested in becoming a member of the hardcore Wufoo army. Thanks to our recently released real time notification platform, you can now create a WebHook from your Wufoo form so that it’ll automatically send a HTTP POST of the data collected from your form to a web page on your server so that you can get at it programmatically as it comes in rather than having to use our normal Query APIs to poll or request the data periodically to see if there’s anything new.
What’s a WebHook?
For those of you who aren’t familiar with the lingo, WebHooks are really easy to understand. They’re basically a system that sends a message from a web server containing a collection of variables when something happens. It’s a very simple event notification system and it makes integrating Wufoo into a custom application or external database a lot easier than using traditional APIs.
WebHooks in Wufoo push data out when they arrive and the reason a push system (our servers letting your servers know when something happens) is better than a polling system (your servers periodically asking our servers if there’s something new) is that it’s a lot less work to implement, uses less resources most of the time (on your end and our end) and can get you the data as soon as it arrives as opposed to when you think it might be coming.
Because a WebHook sends the data as an HTTP POST as opposed to a JSON formatted string or XML file, they’re also so much easier to parse. For example, if you’re using PHP, getting at the data being sent from us would be as easy as
How does it work?
All you have to do is create a page that will accept an HTTP POST and prepare your end for doing something with the data we send you. The POST will contain a collection of Field IDs paired with the data submitted for that field. If you want to know what fields are associated with what Field IDs, you can look them up on your account’s API page, which you can access from the Code Manager. If you’re more ambitious, you can also use our Query API to get at that information dynamically.
Once you’re set on your end, just tell us the URL of that web page. Setting up a WebHook in Wufoo is very easy. Just go to the Notification Settings for a form that you want to have sending WebHooks and then follow along with Tim in this screencast:
Please note that WebHooks do not allow you to export or send entries that have already been collected through your form to your server or application. It only works on entries after the WebHook is set up. If you want to import a lot of past data into your database or application, you’ll want to either use either our APIs or develop a way to import from a CSV file.
The ability to create a WebHook from your Wufoo form is available to all users across all plans. If you want to learn more about how to integrate Wufoo’s real time notifications using WebHooks, check out our WebHook documentation.