Never lose your Garmin step streak again with IFTTT and hook.io
Using the below approach, every day at a time you specify, this solution will check how many steps you have taken so far and alert you if you are still below your goal. If you want to set up multiple check times or more complicated approaches, they can easily be built on top of this.
This solution uses data available if your Garmin profile is public and will allow you to receive a phone call (or some other alert you choose) if you are not on track to complete your step goal.
I am not employed or paid by Garmin, IFTTT or hook.io and just wanted to share a solution to prevent the heartbreak of losing a multi-hundred day streak because of one absentminded evening.
- IFTTT: Used to trigger the check each day as well as handle sending the notification if you are under your goal.
- hook.io: Allows us to do Python scripting each time a URL is called in order to fetch your number of steps and then trigger IFTTT for notifications if you are under your goal.
- A Garmin watch and a public profile
Setting up hook.io
Then, you will need to fill out the application details:
For easy copy and pasting the code is as follows. Change the USERNAME to your Garmin username, TIMEZONE if you are far from EST, and GOAL if your goal is something different than 10,000 steps:
You will also need to update the IFTTT_MAKER_KEY by going to https://ifttt.com/maker_webhooks/settings and copying the URL part right after use/ and pasting it in place of the IFTTT_MAKER_KEY placeholder in the code:
Setting up IFTTT
Create an account with IFTTT if you don’t already have one (https://ifttt.com/join). We will need to create two IFTTT applets. One to trigger the microservice and the other for the microservice to trigger if the step goal is not met.
For the first one, after clicking create (https://ifttt.com/create) set up the Trigger using the “Date & Time” trigger and set it to be whatever time you want the service to run. I set mine to 8 PM so I could make up for any step deficit in the hour or two before I fall asleep.
In the “That” field, we will select “Webhook” and specifically, “Make a web request”. For the URL, put in the hook.io webhook URL you created before.
You are now done with this task after you finish saving it.
We will now create the other task. Click to create a new task and then select “Webhook” for the trigger and name the event “garmin_under_goal”
For the “That” part of the trigger, select “Phone call” or “Text message” or whatever else you want. Then set the message you want it to say:
If you want it to also state how many steps you are currently at, click the “Add ingredient” button and do something like the following:
Now every day at the set time, your hook will be run, and if you are under your goal, it will trigger the other IFTTT event causing you to be called, notified, texted or emailed depending upon what you set up. Say goodbye to breaking your step streak because it slipped your mind later in the day!