IFTTT is a free web service that allows users to create chains of conditional statements called applets to connect different web services. It works by employing triggers from various services like Instagram or Dropbox that initiate actions in other services like posting photos to Dropbox. Users can use existing applets or create their own by selecting triggers, actions, and services. The document provides examples of how IFTTT can automatically update a Twitter profile picture whenever a photo is added to a specific photo album on a user's device. It also explains the key components of IFTTT including triggers, actions, applets/recipes, ingredients, and how it relies on APIs from various services.
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
IFTTT Automation Service Explained
1. 1
IFTTT: “If This Then That”
Author: Shashank kapoor* ,Mehar Saran
Faculty of Engineering, Dayalbagh Educational Institute, Dayalbagh Rd. ,Agra
Abstract : If This Then That, also known as IFTTT is a free web-based service to create
chains of simple conditional statements, called applets. In this article we would
study about the basic working of this application and also the various algorithm
involve in executing this Service.
Introduction
Like pretty much all other Internet-based
services, IFTTT requires you to create an
account to begin using it. Signing up is
extremely straightforward and, because
the service is completely free, there is no
need to provide a credit card. Simply
visit the website and use your email
address or Google or Facebook accounts
to sign up.
IFTTT employs the following concepts:
Services (formerly known as
channels) are the basic building
blocks of IFTTT. They mainly
describe a series of data from a
certain web service such as YouTube
or eBay. Services can also describe
actions controlled with certain APIs,
like SMS. Sometimes, they can
represent information in terms of
weather or stocks. Each service has a
particular set of triggers and actions.
*for correspondence
Shashank kapoor
B.Tech IIIrd Yr Mech
154169
Shashankkapoor1994@gmail.com
Triggers are the "this" part of an
applet. They are the items that trigger
the action. For example, from an RSS
feed, you can receive a notification
based on a keyword or phrase.
Actions are the "that" part of an
applet. They are the output that
results from the input of the trigger.
Applets (formerly known as recipes)
are the predicates made from
Triggers and Actions. For example, if
you like a picture on Instagram
(trigger), an IFTTT app can send the
photo to your Dropbox account
(action).
Ingredients are basic data available
from a trigger—from the email
trigger, for example; subject, body,
attachment, received date, and
sender’s address.
2. 2
IFTTT in Action
Dashboard: On the dashboard, there is a
brief explanation of how IFTTT and
recipes work. The "This" in "If This,
Then That" stands for a trigger, while the
"That" stands for an action. These two
linked events create an IFTTT recipe.
Thus, referencing
the Philips Hue example we mentioned
earlier, the trigger could be
a Facebook photo tag and the action
would be the Philips Hue light turning on
Anatomy of Recipe
IFTTT uses pre-made recipes to perform
actions between services—say, to
automatically backup your Instagram
photos. There are lots of recipes ready to
be implemented, but it’s easy to create
new recipes, too. It’s important to
understand the component parts of a
recipe, though, to make best use of
IFTTT’s potential. Let's take a look.
Here are also channels that will control
internet connected devices, like WeMo
switches, Philips hue connected bulbs,
Automatic car sensors, and Blink(1)
USB indicator lights. Other channels
include Facebook, Evernote, Instagram,
Google Calendar, some iOS native apps,
and many more.
Enabling channels is just the first step.
Once IFTTT is connected to your
favorite services, it can start looking for
triggers, the “this” in “if this then that.”
Triggers are behaviors performed by you
or the service, and can be active or
passive. An active trigger could be a new
post to the user’s Instagram with the
hashtag “#vacationspots,” while a new
weather report would be a passive
trigger. The two behaviours could spur
the same actions, say a new tweet or
entry in Evernote. An active trigger is
only prompted when the user performs a
behavior using the monitored channel,
though, and a passive trigger will be set
in motion and recur automatically
without further input from the user.
3. 3
Actions are “that” in “if this then that”
and will occur as a result of the trigger.
When the IFTTT recipe runs in response
to a trigger, any number of preset actions
can occur using enabled channels. Some
actions include sending an SMS or
email, posting to Facebook or Twitter, or
saving a photo or message to Evernote or
Google Drive.
So far this could seem pretty hamfisted. I
don’t want every image I save to iOS
photos uploaded to Facebook or every
email I receive archived in Microsoft
OneNote; I’d like to be more precise
with my triggers and even my actions.
That’s where Ingredients come in.
Instead of posting to Delicious all of the
URLs I save to Pocket, IFTTT will look
for tagged URLs and leave everything
else alone. Rather than posting all of
my Last.fmscrobbled tracks to Tumblr,
IFTTT will only post my favorited
tracks. Using action ingredients, I can
then further refine IFTTT’s output by
adding titles, tags, and more.
Creating APIs
APIs, or Application Programming
Interfaces, create rules for how two
applications communicate and interact
with one another. APIs disclose parts of
a service application’s code, allowing a
second application to accomplish tasks
using the service.
Programmers don’t want to make
accessible all of their code for two
reasons. The first is fairly obvious: It’s
their code and they want to limit its
availability or run the risk of outsiders
stealing chunks of it wholesale.
Secondly, not all of an application’s code
is necessary to accomplish all tasks. By
specifying exactly what is important and
making just that available with an API,
programmers actually make their
applications a lot more accessible. As
examples, Day One syncs a user’s data to
iCloud, and Fantastical takes a peek at
Google and iCloud calendars; APIs
allow Day One and Fantastical to
integrate with useful services, providing
a better user experience.
IFTTT works by employing not just one
or two APIs but dozens. Right now,
IFTTT supports 85 services. By
combining any two of these channels and
setting parameters for actions, IFTTT
can accomplish thousands of tasks that
range from the general to the specific.
Building from Scratch
There are a ton of IFTTT recipes ready
to go, and you can get a lot accomplished
with what’s already there. I’ve
previously described how to use IFTTT.
4. 4
Sometimes, though, you have to roll up
your sleeves and do the work yourself.
I’m going to build a recipe that
automatically updates my Twitter profile
picture. While this recipe may not be
what you want yourself, it will serve as a
good primer on creating recipes and an
example of how different services work
together with IFTTT, and you can use
the steps here to create your own recipes
in the future. Trigger fires every time a
photo is added to the iOS Photos album
specified.
Complete the trigger.
Now it’s time to tell IFTTT what to do
with the information received from the
trigger. Click “that” in the “if this then
that” statement.
Specify an action to be performed.
Choose a channel to perform an action.
Select the channel that will perform the
action. To update a profile picture on
Twitter, select the Twitter channel.
Activate the channel, if necessary.
Again, I haven’t yet activated the Twitter
channel, so I’m prompted to give IFTTT
access. Unlike last time where I was
forced to shift to the IFTTT iOS app, I
can complete the activation process by
logging into Twitter in my browser.
Follow the prompts or continue to the
next step if the channel is already
activated.
Decide which action Twitter should
perform when it receives the iOS Photos
trigger prompt from IFTTT. There are
several actions IFTTT can perform with
Twitter, but I’ve selected “Update Profile
Picture.”
Select an action to be completed.
5. 5
Customize the action by adding tags or
additional information to the tweet. The
tweet is optional, though, so feel free to
delete it all together.
Edit the action fields as desired.
While IFTTT will accept direct text
input here, it also provides a list
of Ingredients that will pull
information from the trigger and add it
automatically to the action.
Save the new recipe. Use the default
description provided by IFTTT or
create a new one and toggle
notifications on or off.
Save the new recipe.
IFTTT will then open the My
Recipes page, with the new recipe
displayed at the top. From there, turn the
recipe on or off and share it with other
IFTTT users.
IFTTT will run each recipe every fifteen
minutes or so, but the Refreshbutton will
check the recipe right away.
Turn the recipe on/off, manually run the
recipe, or share the recipe publicly.
Remember, this recipe only runs when
an photo is added to the specified album
in iOS. To make it work, add an
appropriately named album in iOS
Photos. This recipe can be edited to
tweet all photos saved in iOS, too.
6. 6
Key Insight
Conclusion
IFTTT is a powerful tool for automation
that relies on service APIs, and to get the
most out of it, you'll only have to put in a
little elbow grease. While there are a lot
of pre-made recipes ready to use, you'll
have the greatest opportunity for
customization if you make your own
recipes. They'll be best suited for your
needs, and will keep you from having to
click around online so much to get
repetitive tasks done.
References
1. http://engineering.ifttt.co
m/data/2015/10/14/data-
infrastructure/
2. https://computers.tutsplus
.com/tutorials/how-to-
automate-anything-with-
ifttt--cms-20537
3. https://en.wikipedia.org/w
iki/IFTTT
4. https://www.pocket-
lint.com/smart-
home/news/130082-what-
is-ifttt-and-how-does-it-
work
5. https://lifehacker.com/the
-beginners-guide-to-ifttt-
1819624556
6. https://github.com/edelga
do/ifttt
7. https://www.digitaltrends.
com/cool-tech/what-is-
ifttt-and-how-does-it-
work/
8. http://www.ishu.com.np/t
ag/ifttt/