Maybe you are one of the lucky ones (like most of the Apilio team!) who works remotely and needs a gentle nudge to leave your computer and stretch your legs every morning. Or maybe you want a reminder that, since its the weekend, you should be out there in the open air, expanding your brain cells, getting some sunshine.
This is also a great example to get you started with Apilio as it doesn’t require any special devices: just your Android smartphone.
Whatever your need, this example will send you a notification if you are still connected to a specific WiFi network by a specific time of the day:
The detailed example below will evaluate our logicblock every weekday at 10AM. If we are still home, because we are still connected to our home WiFi, then we will receive a notification on our phone.
1. Creating the conditions
Every weekday at 10AM
This is something that happens every week day on an instant (10AM), I will use this condition to trigger my logic as well, as I want to get my reminder at 10AM (if necessary):
I’m connected to my home wifi
We will have a variable that stores whether we are connected to our home WiFi or not. Let’s call it ‘connected_to_home_wifi’. It will be set to true if you are currently at home, which is where I am when writing this example:
Creating the condition
The condition ‘am_i_connected_at_home’ is to check whether you are connected to your home WiFi. If you are connected, then the condition will be true when the variable is true. If you are not connected to your home WiFi (meaning, the variable is set to false), then the condition will be false.
How to set the variable to true or false via IFTTT
Our variable will be set to either true or false when your phone connects to your home WiFi. For this, you will need to install the IFTTT app on your Android smartphone, so this can be easily checked for this automation.
This is how Apilio knows that you have disconnected from your wifi:
- We will create an applet that if your Android smartphone disconnects from your home WiFi, it will set the variable ‘connected_to_home_wifi’ to false.
- Go to IFTTT and create your own applet (https://ifttt.com/create)
- As the “if this” part, choose Android device and then Disconnects from a specific WiFi network as your trigger. Enter the name of your home WiFi in the details
- As the “then that” choose Apilio, and then the action to set a variable to false
To set ‘connected_to_home_wifi’ to true:
- We will create an applet that if your Android smartphone connects to your home WiFi, it will set the variable ‘connected_to_home_wifi’ to true.
- Follow the same steps as before, but choosing the Android device trigger when it connects to a specific WiFi, and the Apilio action to set a variable to true.
2. Creating the Logicblock
It’s time to put it all together in a logicblock! Let’s call it for example ‘should_go_for_a_walk’.
Select the Conditions:
- ‘at_10_am_every_weekday’ (this is the condition that acts as the trigger)
- ‘am_i_connected_at_home’ (this is the second condition that must be met)
Create one action, set the event to ‘lets_walk’.
Save your logicblock now.
3. Creating my action in IFTTT
When your logicblock evaluates and determines that it is time for you to go out and get some fresh air, you will receive a notification on your phone via the IFTTT app. This is setup as follows:
- Go to the create section to start your applet
- As the “if this”, choose the Apilio service, and the trigger to receive an event
- As the “then that” part, choose the service Notifications from IFTTT, and then the action to send a notification from the app. You can then compose a message that will set you into action
- Finish the applet
And that’s it! Every day at 10AM, when I’m still connected to my home WiFI, Apilio sends me a gentle nudge to go out for a bit. You won’t get the reminder if you have already left your home.
Try it yourself! Let me know your comments below. You can find other examples to get you inspired in this forum.