A DIY integration between Resource Guru and Slack, via Zapier

By - 13 Feb 2015

Resource Guru, Zapier, and Slack icons

12th March 2015 update: we just improved webhooks to make this integration even better

Resource Guru’s webhooks just got a shiny new interface and became a whole lot easier to use. This gives us a great platform to work on a series of official integrations with other apps in the future. In the meantime, I wanted to see what’s currently possible, so I’ve been experimenting with some DIY integrations.

We’re big fans of Slack here at Resource Guru—we use it all day long for team communication. But we were thinking, wouldn’t it be great if we could get notified about Resource Guru bookings inside Slack? Especially every time someone adds a vacation (using a special “vacation” project). Well, we’re working on an official integration with Slack to do just that but, in the meantime, you don’t need to wait – it is now possible to make your own integration using Resource Guru’s webhooks and Zapier. This is what the notifications look like and here’s how I did it.

slack example

Tech alert: this article is aimed at people who have skills that are a bit beyond web browsing or who are keen to stretch themselves.

testimonial-ogilvy

Set up a Zap in Zapier

There are quite a few cloud integration services to choose from these days, including Zapier, IFTTT, itDuzzit, and Pipethru. For this example, I chose to use Zapier because it’s been around for quite a while and has some pretty good functionality. Please note that Zapier is only free up to a point and they do charge if your usage exceeds their limits.

Once you’ve set up a Zapier account, the first step is to “Make a Zap”. Choose “Web Hook” as the trigger and “Slack” as the action app, like this.

Zapier Zap

Zapier will then generate a receiving webhook URL for you, like this one. This is where Resource Guru will “send” updates.

Zapier webhook

Next, Zapier will help you connect to your Slack account.

Zapier select Slack account

Set up a webhook in Resource Guru

At this point, we’re going to briefly break away from Zapier to set up a webhook in Resource Guru. So, leave Zapier open in one tab and go to your Resource Guru account in another tab. (By the way, you will need to have administrator permissions to do this.) Go into your account Settings > Web Hooks > New Webhook.

New Webhook

Fill in the form and enter the Zapier webhook URL where it says “Receiving URL” (you can leave “Secret” blank). Resource Guru will send events that take place in your account to that receiving URL—and Zapier will then pass them on to Slack. Finally, select “Add Webhook.” With me so far?

Back to Zapier

OK, now we’re going to finish setting up the Zap. Here’s where you can start to add some logic to your Zap to make it more useful. Resource Guru will send events in JSON payloads that look something like this.

Webhooks payload

We’re going to use Zapier’s custom filters to do 3 things. 1) check that the payload is for a Resource Guru booking (and not some other event, like adding a client) 2) check that the payload contains a booking for our project called “Personal Holiday,” which has the ID 48750 (you can find the ID for a Resource Guru project by hovering over it with your mouse and looking at the URL in your browser status bar) and 3) check that the payload doesn’t relate to a holiday being deleted (you might prefer to leave this one out). Like so:

filter webhook triggers

Lastly, we’re going to specify which Slack channel we want our notifications to appear in and what the message should say. You can leave the other fields blank.

Zapier Webhook to Slack Setup

Then test your Zap and turn it on. Now, whenever anyone makes a booking for a “Personal Holiday” in Resource Guru, we get a notification in Slack like this:

zapier slack notification example

Experiment

My example is specific to Slack, but these cloud integration services connect to hundreds of apps including Gmail, Google Calendar, Trello, Basecamp, Hipchat, Zendesk, Salesforce, etc., etc. With webhooks, you can set up your own integrations to do useful things based on events in your Resource Guru account. So, start experimenting, have fun, and let us know what you come up with!

Speaking of vacations

We are busy creating dedicated vacation and time off functionality within Resource Guru—so, it will no longer be necessary to create a project called “Vacation” or “Holiday.” Sign up for our newsletter to find out when it goes live!

Hi, I'm Andrew, one of the co-founders of Resource Guru. Please feel free to leave comments or get in touch - I'd love to hear from you.