Using APIs without Writing a Line of Code Staffan Sölve Travis Spencer September 30, 2014 The Nordic APIs team is very distributed, and it is growing quickly. We’re more than a dozen people working on various things, and we are scattered around Sweden, Spain, and the US. Our team has very little software running on our devices. Most of what we have is some sort of client, like Skype. Most of the major systems we depend on are cloud services. These are things like MailChimp for managing our newsletter, Eventbrite for ticketing, Twitter for connecting with the community, Asana, YouTube, Lanyrd, Meetup.com, etc., etc. We’ve got more than our share because these cloud services allow us to work the way we want — from anywhere with any device. This is important not only because we are very distributed but also because we are always on the go. We are seldom at our desks. Our phones are always on though, and we’re cranking out killer content from trains and coffee shops and wherever else. Cloud, mobile, and social services allow us to work this way. We’re the modern team!This is a fun way to get the job done, but it can be hard to keep in sync when you can’t yell to the cubical down the way. Skype, SMS, phone, and email keep communications open and desynchronization low. With much of our work happening in these cloud services though, we are some times unaware when things are done or not done. We can’t be IMing and SMSing every time we create a Google Doc or draft a newsletter. That’s not practical, but something is needed if others in the team are going to quickly respond to the new information. APIs can help with this!Application Programming Interfaces — BWAH-HA-HA! By their very definition, APIs sound complicated and technical. Some may say that they are best left to programmers. Not us though! Even if the use of APIs were restricted to coders, not every process that needs automating justifies the effort of an engineer. Like our team, you probably have many non-programmers in your group. How can the effort necessary to automate your processes be lowered to justifiable levels? How can non-technical staff help with this problem?While APIs are technical, there are non-technical ways of working with them. There are actually services that can use APIs to create a sort of “personal assistant” for our work and daily lives, saving time and enhancing communication. These helpers provide a number of ways for programmers and non-programmers alike to reap the many benefits of APIs. In this post, we will look at a couple of services that can do this for us: Zapier and If This Then That (IFTTT). Both give us handy API-driven tools to achieve our goals, while hiding all the heavy machinery behind the scenes. We will give you some examples from our own team, and walk you through some scenarios that you can implement yourself.Best of all, using these services makes working with APIs as easy as a game of connect-the-dots. Keep reading, and you’ll be playing along in no time.Overview of Zapier and IFTTTThese two popular services, Zapier and IFTTT, provide interconnection between various APIs; they deliver simple building blocks that we can use to assemble automated workflows which will expedite our daily chores. Zapier is generally considered business-oriented, whereas IFTTT is more consumer-oriented. This contrast is currently quite visible in their respective user interfaces. As both services develop and competing alternatives arrive in this dynamic environment, however, this may change. At the time of writing, Zapier comes with a price tag and a free, but limited, plan; IFTTT is free at the moment, but a premium plan is expected soon. With Zapier, you are more likely to find all of your favorite cloud services; the ones that our team uses where all available and TONS more. This includes such sophisticated business platforms as Microsoft Exchange, Eventbrite, and MailChimp — many of which are not currently available with IFTTT.Hers is a side-by-side comparison of the two products:FeatureIFTTTZapier (Basic)Zapier (Business)No. of Rules∞2050Execution of Rule∞3,000 / mo15,000 / moPre-integrated Apps125389389Execution Frequency15 min15 min5 minToggle Rules On/OffXXXLibrary of Third-party RulesXXXLogsBasicOverview & detailedOverview & detailedTo decide which of these is the best fit for you, try them both. They are quick, easy, and cheap to evaluate. To orient you a little more and get you on your way, let’s play that game of connect-the-dots!Using these ToolsBoth Zapier and IFTTT work by automatically performing a specified action when a certain condition occurs. You decide what event will fire off the rule, and what the corresponding response will be. The format of the rules that you create with these services is very basic and follow this form in all cases:If condition, Then action.Though the rule format is simple, the possibilities they provide are very powerful. You can use these to automate all sorts of actions. To get your imagination wondering, here are some examples that the Nordic APIs team uses:If someone buys an event ticket and wants to be invoices rather than paying online, then send the finance team an email.If someone tags a tweet with #NordicAPIs or mentions @NordicAPIs, send a group IM to the marketing team. Then, one person can claim it in the group chat, avoiding multiple replies.If the Web site goes down, send an IM to the Web crew.If someone unsubscribes from our mailing list, then break the sad news to the entire team that a ferry lost its wings :-(See how the format works?If condition, Then action.Both Zapier and IFTTT provide numerous conditions/triggers, and many, many actions. These can be combined in hundreds of ways. Just about any event that can invoke an API or expose one can be used in your rules. The possibilities are really only limited by your own imagination. Anything that can invoke or expose an API can be used in your rules. Even physical objects that have APIs and are connected to the web, such as thermostats and light switches, can be integrated into your recipes. With just a pinch of code and a web hook, you can take this to unbelievable levels with relatively little effort.This is amazing power that is at your disposal. To get you started, we’ll walk you through a couple scenarios that you can implement right away.Scherio 1: Remind us to meetup for lunchIn this example, we want to remind ourselves and an associate about a reoccurring lunch meeting. On Mondays, suppose you meetup with a friend. To help you both remember, you would like an email to be sent at a certain time and day. We want this reminder to be sent automatically, without our having to check our calendar and send an email manually. Using IFTTT, we accomplish this by creating a rule in six easy steps:First, we register a user account with IFTTT and log in.To set up the recipe, we click Create a Recipe and bring up the over-sized IfThisThenThat button.Click this and browse to, or search for, the trigger Date & time.Now, we activate each individual trigger:Click Date & time, and select a suitable day.Click that and select the GMail channel, which we activate once. (IFTTT also has a Mail channel for sending email, but that does not allow you to send to anyone but yourself.)Fill in the email form with recipient, subject and message, and direct a copy to yourself. (We can even attach something, like the original invitation letter.)Save and activate the recipe.IFTTT will check the trigger setup in step 4 every fifteen minutes or so. When the condition matches, the action defined in step 5 will fire. All this without a single line of code!Scenario 2: Notify someone at home when you leave workLet’s look at one more example. This recipe is best set up using a smartphone.First, download IFTTT on your iPhone or Android device and log in.Then, designate a trigger for your geographic location, and the GMail channel to use for the notification action.IFTTT allows you to copy a recipe, which another user has already written and shared publicly. Using this feature in the IFTTT mobile app:Tap the “mixing bowl” recipe symbol, then the “glasses” browse symbol.Next, tap the “magnifier” search symbol.Now, search for a shared recipe called “Notify wifey when I’ve left work” (exactly that!).Once activated, edit the recipe to specify your own work address with a perimeter (the trigger).Finally, edit the email address and message to use as the action. (You will probably want to change the name of the recipe too.)Once again, without a single line of code, we have integrated two functions that will work automatically for our purposes.ConclusionWhatever our needs, whether personal or professional, tools like Zapier and IFTTT allow us to use APIs to simplify our personal and professional lives. These services cost nothing to try out, are quick to setup, and easy to evaluate. Neither requires custom coding, and both put the power of APIs at our disposal. Best of all, they both provide a lot of useful automation that will simplify our lives. If your team is like ours, these cloud-based API orchestrators will allow you to communicate with your team more easily and regularly. This will result in increased productivity and better communication. Try them for yourself and see.Let us know how it goes. Share your thoughts and reactions with the Nordic APIs community here in a comment, on Twitter, and on Facebook.