Many times your IFTTT applets are just what you need for your smart applications… if you could just add a small delay to better time some of the actions.
Adding a delay to your IFTTT applets is very easy with Apilio: you’ll need to daisy-chain them and this article will show you how.
Introducing Apilio to add delays to IFTTT actions
Adding a delay to your IFTTT actions is something that Apilio can help you with. This is how things work:
Without delays:
- Something happens and an applet on IFTTT triggers a few actions, one after the other
With delays:
- Something happens and an applet on IFTTT lets Apilio know
- Apilio sends events to IFTTT at specific times, taking into account your delays, so things can be executed by IFTTT when you want to
- IFTTT runs the actions when they receive the event from Apilio
We are basically making a sandwich where IFTTT is the bread and Apilio is the PB&J
APILIO
No coding is needed, you just need to specify the delay in Apilio and connect your IFTTT applets.
A step-by-step example
In this example, I’m not going to setup any conditions in Apilio, I’m assuming you are doing that in IFTTT. My example is as follows:
- If my phone connects to my home wifi
- Then turn the foyer lights on
- And, 5 minutes later, turn the foyer lights off
1. Create a placeholder Logicblock in Apilio
Go to https://app.apilio.com/logicblocks and create a new Logicblock. You just need to give it a name at this point, for example “foyer_lights”. We’ll use this name shortly. Save your logicblock.
2. Connect the Apilio service on IFTTT
Go to:
3. Create the IF THIS THEN APILIO applet that starts your routine
For example, I want to start my routine when my phone connects to my home wifi. I will setup an applet that if my phone connects to a specific wifi, then I will initiate a Logicblock evaluation in Apilio:
You’ll need to setup an applet that starts with your desired triggers, and that calls Apilio at the end. The “THEN” part calls Apilio’s Logicblock that you created on the second step, “foyer_lights”.
4. Create your IFTTT actions in Apilio and specify any delays
Go back to Apilio and edit your “foyer_lights” Logicblock. We are going to add the two actions we want to execute: turn the lights on and then, 5 minutes later, turn the lights off. These two IFTTT actions are just event names that will be sent to IFTTT to orchestrate your actions at your desired times. 5 minutes is: 5 * 60 seconds = 300 seconds.
These are the two actions you’ll have in the Logicblock:
5. Connect your actions to IFTTT applets: IF APILIO THEN THAT
Your applet that catches the first event, foyer_light_on looks like this:
In my example, I’m using a LIFX lightbulb, but you could replace it with any other service.
And the second action, the one that is being delayed, is using the second event, foyer_light_off.
IFTTT will receive this event 5 minutes after the other, thus delaying this action.
6. All done!
Great work, now when your phone connects to your home wifi, the foyer lights will turn on for a bit when you get home.
Applets that don’t count towards your 3-applet limit
Find the applet you need on our list and just enable it, these don’t count towards the 3-applet limit:
I don’t want to turn the lights on if it’s daytime!
I can hear you say: “But Anna, isn’t it wasteful to turn the lights on if it’s daytime?” Glad you asked! I think you are going to like this expanded example:
Related articles