IFTTT: Simple code "recipes" for the non-programmer

Credit: edenpictures via Flickr

How do you get started coding, when you’ve never learnt a programming language? Even to the experienced eye a page of code can look unintelligible, lines of letters and numbers that only mean something to the developer who put them together. It’s a lot like trying to describe knitting over the phone, in Latin. What’s needed is a way of programming simple applications that doesn’t look like code at all.

That’s where a service like IFTTT comes in. IFTTT, short for If This Then That, is a simple tool for programmatically automating tasks, providing a glue that links consumer and enterprise web services. The developers behind the service have created a bare-bones site that focuses on creating and sharing action-driven simple workflows that join together web services. There’s no fancy editor, no complicated user interface; just a simple step-by-step approach to building (and sharing) applications.

The model behind IFTTT is very simple: triggers and actions fit together to make recipes, using data as ingredients. It’s as easy as thinking “if this happens, then do that”, making an IFTTT recipe the very essence of a simple program. The recipe metaphor makes a lot of sense. We’ve all followed the instructions on a packet of brownie mix to make just the cake the manufacturers designed – and then we’ve started to add our own ingredients to the mix, changing a triple chocolate brownie into a chocolate orange ginger brownie with a dash of espresso.

IFTTT is much like that customized brownie mix. Taking triggers and actions and fine tuning the ingredients means that you can bake an application that meets your needs, even if you’re using the same components as everyone else. You just make the tweaks you need to get the results you want – and if it doesn’t work first time, you can go back again and start over.

Web APIs are everywhere, but they’re often complex and poorly documented. What the team behind IFTTT has done is to take a selection of popular sites and services, and extracted the APIs that you’re most likely to want to use. Those APIs are then wrapped up as channels, with the data they need treated as ingredients in your IFTTT recipes.

Choose from 59 web services to bake an IFTTT recipe

IFTTT has 59 different channels, from services like Facebook, Evernote, LinkedIn, Twitter, and Yammer. Some are consumer services, some have an enterprise focus. Some are just inputs (what IFFTT calls "triggers"), some are outputs (called "actions"), and others are both. All you need to do is activate a trigger to use it in your recipes – a process that’s as easy as signing into a site from IFTTT, and giving it permissions to work with IFTTT.

So, for example, if you want to build a recipe that sends a message to a Yammer group when a team member uploads a file to a shared Dropbox folder, you’ll start by activating the Dropbox channel.

Once activated, you get two trigger options. One fires when a new file is uploaded to your public folder, and one when a new photograph is uploaded. Once you choose the trigger to use, IFTTT then walks you through the steps needed to create your program. For a Dropbox-driven app, you can choose a sub-folder to monitor, or just use the default public folder.

Credit: Screenshot/IFTTT
First the This: Adding a Dropbox trigger to an app.

Tap the create button to set up your trigger. IFTTT shows its logo, replacing the word This with your trigger and its ingredients. You’re now ready to choose an action from a list of channels that handle input from IFTTT. If you pick the Yammer channel you’ll first need to grant access to IFTTT before adding a Yammer action to your recipe. Yammer’s API allows IFTTT to deliver information to users, or even transfer files from Dropbox to a Yammer file store.

Credit: Screenshot/IFTTT
Then the That: customising an IFTTT Action with data from the trigger.

If you choose to notify your colleagues, you can start to customize the action. IFTTT is able to direct a message to an existing group of Yammer users, such as a specific project team or an entire department. You can then define a message based on ingredients from the trigger you set. The Dropbox channel gives you a selection of ingredients that can be added to a message, including file names, the dates they were uploaded or changed, and a URL. You can add these ingredients to your own text before finalizing your recipe.

Once you’ve created and saved a recipe, it’s loaded and ready to run. Personal recipes run every 15 minutes, unless they’re built using what IFTTT calls a quick trigger (denoted by a lightning bolt). It’s unlikely that you’ll be building a personal or a team recipe that needs to run more often. A dashboard lets you see what’s been triggered and when, so you can see if your recipes are working the way you intended.

Credit: Screenshot/IFTTT
Finalising a recipe, ready to run and to share

Recipes can be shared with the rest of the IFTTT community, and you can browse through a library of applications to find one that meets your needs, or find one that you want to adapt to your own ends. Perhaps you want to send all the links you tweet to an Evernote notebook, or update a Twitter profile with an Instagram image. There are even triggers that reach out into the Internet of Things, sending SMS messages or controlling LED sequences, or taking input from smart switches.

Most important, IFTTT shows that programming isn’t hard. You need to think about what you want to do and what you want to achieve. By choosing to just deal with events (IF THIS happens THEN THAT happens), IFTTT gives you a framework to start thinking like a programmer. The result is a way of making simple apps that can be put together in minutes, and thrown away when they’re no longer necessary – just like baking that brownie. And of course, if you want to do more, there is always Yahoo Pipes.

From CIO: 8 Free Online Courses to Grow Your Tech Skills
View Comments
Join the discussion
Be the first to comment on this article. Our Commenting Policies