Unlock the hidden power of your apps.

Try Zapier Free!

How to Turn GTalk into a Command Line for Anyone

Bryan Helmig
Bryan Helmig / April 29, 2013

I spend all day in IM chatting with co-workers and customers, so it makes perfect sense to leverage IM as an entry point to trigger quick one-off automated tasks. Zapier makes it easy to "plug" Gtalk or Jabber in hundreds of SaaS apps and today I'd like to show five of my favorites.

Also, you could use any message like medium to accomplish these! Think email or SMS on mobile or even other IM providers like Jabber or AIM.


1. Create & Merge Pull Request in GitHub

We have a lot of feature branches in Zapier, so it helps to have a hand opening pull requests and merging them. This one uses some fanciness (primarily our named variables mechanic) but you can find the basic Pull Request via Gtalk Zap template here.

Basically, we don't want to "predefine" which branch get merged from and into, we'd like to define that in our message! So you can image we'd naturally spec out a message as something like:

create pull request from my-feature to master

However, Zapier isn't that smart (yet!), you'll need to do something like this to extract the fields:

create pull request from head(my-feature) to base(master)

Now, Zapier will handily extract head and base from the message variable and create branch new message_head and message_base variables! While in the editor you can watch this happen live via samples as you play around sending in new messages with different variables.

https://zapier.cachefly.net/storage/photos/2e939ea359cba749d225e5002880ad12.png

You'll want to define a custom filter as well so other CLI commands don't inadvertently trigger this zap:

https://zapier.cachefly.net/storage/photos/f8c9f30f1334a9baa2ef4dbab7f93805.png

2. Create a New Trello To-Do Card

Another simple but very handy tool is the quick creation of Trello cards. You can view the basic zap template for creating new Trello cards via Gtalk here. Much like our GitHub Pull Request example, we'll use named variables.

I personally use a message format that looks like this:

create trello card named(my fancy name) due(tomorrow)

But you can go crazy adding label() or fileurl() and more.

Of course, you'll need to make a filter which forces message to start with "create trello card" just like the first example. You'll start seeing a pattern I suspect. ;-)

3. Add An Image From a URL to Dropbox

I spend a little too much time in Reddit's photo communities and get obsessed with some of the incredible shots found in r/spaceporn, r/AbandonedPorn and r/EarthPorn (despite their dubious names, they are completely safe for work). I am also a bit of a pack rat. I bet you can see where this is going…

So let's trigger the instant download of images into Dropbox with this little zap template:

save file from url(http://i.imgur.com/FiaD3ei.jpg) to dropbox

The image URL will be located in message_url and placing that directly into Dropbox's "File" field will trigger a bit of an easter egg: we recognize and download files from URLs (since direct URLs are commonly returned as file representations in REST APIs, not binary data).

Just like before, don't forget make a filter which forces message to start with "save file from"!

4. Create Google Calendar Event

As you can imagine, this one is pretty straight forward. I generally prefer to use what Google calls "quick add", as it does some intelligent things like parse out times and

Here is the basic zap template to create a Calendar Event via Gtalk:

create new event like(dinner tomorrow 7pm with mike@zapier.com)

Zapier will just pass the dinner tomorrow 7pm with mike@zapier.com part on to Google, and they are smart enough to parse out tomorrow 7pm and mike@zapier.com for you (as long as you do Quick Add!).

We also have a detailed event option if you want to get really specific.

Just like before, don't forget make a filter which forces message to start with "create new event"!

5. Speak as the Zapbot in Campfire

The Zapbot, our hubot inspired automaton, has a healthy disdain for all things human. At certain times someone on the team may find it necessary to anonymously speak through the Zapbot.

The basic Gtalk to Campfire template is here, but this is the way I use it:

make the zapbot speak(PUNY HUMANS. SHIP MORE FASTER.)

Don't forget the custom filter matching for "starts with" "make the zapbot", lest you trigger on the incorrect messages.


By now, I think you get the gist of it and I hope you can try out your own Zapier templates. Some great services we support that are ripe for interesting use-cases are MySQL, Google Spreadsheets, CRM's like Highrise and Salesforce, but also mailing lists like Mailchimp!


“Zapier is the extra team member at our agency linking our systems together and managing the push and pull of data.”

Alex Minchin, Managing Partner at Zest

Try Zapier Today

Build workflows with your apps.

Try Zapier Free

Connect apps. Automate tasks. Get more done.

Try Zapier Free
Load Comments...

Comments powered by Disqus

Workflow

Take the Work out of Workflow

Zapier is the easiest way to automate powerful workflows with more than 750 apps.