Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (31 sloc) 1.99 kB
title layout section breadcrumbs
Webhooks
default
worker
Webhooks
/webhooks

IronWorker Webhooks - The Ultimate Webhook

Using IronWorker webhooks enables you to run pretty much anything you want whenever an event happens at a third party service that supports webhooks.

How to Use IronWorker Webhooks

The best way to see how this works is via an example. The rest of this section will use a Github to Hipchat webhook where Github will hit the webhook and the worker will post to Hipchat. The full code is here.

Step 1: Create a worker and upload it to IronWorker

This is the same as you would create and upload a worker normally, the difference is in how the task is queued up.

First let's create the worker:

Now let's upload it:

Step 2: Add your workers webhook URL to Github service hooks

Github service hooks are where you can add webhooks for Github events. In your Github project, click Admin, Service Hooks, then Post-Receive URLs.

Admin button

Post-receive

In the text field, add the webhook url for your worker, it should look something like this:

https://worker-aws-us-east-1.iron.io/2/projects/{Project ID}/tasks/webhook?code_name={Code Name}&oauth={Token}

The upload script above will print the exact URL to your console so you can just copy and paste it.

Step 3: Commit and push some code to your github project and watch the magic happen!

That's it! It will post your github commit information to the Hipchat room you specified in the config file.

Jump to Line
Something went wrong with that request. Please try again.