I love coffee. The best way I like to brew my coffee is French Press. Every morning, the very first ritual after brushing my teeth is to get started on the coffee. For the brand of coffee I use, the ideal times I like to brew my coffee for is 4 minutes. Additionally, recently, I also decided to start tracking how much coffee I consume in a day. To be able to achieve the same, the tools that I end up using are:
- The Apple Watch – primarily because I end up having that gadget on me a lot more than the mobile phone.
- Siri Shortcuts – Apple’s acquisition of the Workflow app has been a big game-changer in my world of personal automation.
- iOS 14 – Just because it’s wasn’t possible to use Siri Shortcuts on the watch before iOS 14.
- Google Sheets – Spreadsheets are bae ♥️.
- IFTTT – This is one of the key tools I use, every day, to automate various parts of my life.
The Workflow
Here’s a quick flowchart to understand how the automation runs, in my case. This should make it easier to understand how the data flows from one section to another.
IFTTT Webhooks
The key to connect IFTTT with Google Sheets and share data is by using their Webhooks service. Don’t worry. It might sound a bit technical but I’ll make it quite easy peasy for you.
- Make sure that your IFTTT account is connected with Webhooks and your Google Sheets account.
- Visit this URL and copy your API Key. Keep it safe, since we’ll need it in the later stages.
Setting up Siri Shortcuts
Now it’s time to get to the business end of things. Launch the app, and start creating a new Shortcut.
- Choose the action
Choose from Menu
- Under prompt, ask ‘⏱ Start the timer?’
- Below, add 3 items:
- ✅ Yes
- ❌ No
- ⛔️ Cancel
- If all went well, it should look something like this:
- Under the section ‘Yes’, drag the action
Start Timer
- Set the timer to 4 minutes.
- Leave the section under ‘No’.
- Under ‘Cancel’ simply drag and drop the action
Exit Shortcut
. - Next, add the action
Get Device Details
. After adding it, tap on the action and chooseDevice Name
, if it isn’t already chosen. - Then, drag the
URL
action. Add the URL below in that field:https://maker.ifttt.com/trigger/<triggerWord>/with/key/<apiKey>
Note that there are 2 variables in the above URL:- <triggerWord>: We’ll configure this while setting up the IFTTT side of the automation.
- <apiKey>: Copy and paste the IFTTT Webhooks API Key that we’d retrieved in the above step.
- After this, drag and drop the action
Get Contents of URL
.- Choose ‘Method’ as
POST
. - Under the
Headers
section:- ‘Request Body’ should be
JSON
. - Add 2 fields:
value1
⇢ Magic VariableDevice Name
value2
⇢ Magic VariableCurrent Date
- ‘Request Body’ should be
- Choose ‘Method’ as
- That’s it! Our Siri Shortcut is ready. For now. At this stage, the shortcut should look something like this:
Setting up IFTTT integration
Visit this URL to create a new IFTTT recipe. After that, simply follow the screencast tutorial below.
If you notice in the video above, I used the keyword coffee
to trigger this recipe. This is nothing but the same triggerWord
that needs to be used in the URL https://maker.ifttt.com/trigger/<triggerWord>/with/key/<apiKey>
used in the Siri Shortcut we created above.
Next, trigger the shortcut a couple of times from you iPhone, iPad and/or Apple Watch to send a few data sets to Google Sheets.
Open the Sheet named CoffeeLog
in the folder My Drive
> IFTTT
. It should look similar to mine.
Please don’t judge me for the time when I had coffee late in the evening ????
My Coffee Schedule Chart
Once the data started to get captured, all I did was pivot the above table and configured a chart to be created with updated data, every time a new set of data comes in. This is how my coffee drinking frequency chart looks like.
I am happy to report that in the last 1 month, I haven’t had more than 2 cups of coffees a day ????????