

The e.parameters lets us access querystring parameters, in this case we will extract a mins value as an integer.
:no_upscale()/cdn.vox-cdn.com/uploads/chorus_image/image/61631181/Assistant_1.0.png)
ANYLIST WITH GOOGLE ASSISTANT IFTTT CODE
In the code the doGet(e) function is how we setup a web app in Google Apps Script. UrlFetchApp.fetch('YOUR_IFTTT_TRIGGER_TO_TURN_LIGHTS_OFF') after(mins*60*1000) // after(durationMilliseconds) UrlFetchApp.fetch('YOUR_IFTTT_TRIGGER_TO_TURN_LIGHTS_ON') Setting up the webhooksĪssuming you’ve already got an IFTTT account and connected the webhooks service you should be create an applet searching for the ‘webhooks’ service: These will be called by the Google Apps Script project we create. ‘If I say “Switch on the garden lights for # minutes”, then make a web request’īefore we set this up we also need to create two IFTTT Webhook applets, one to turn the lights on the other to turn the lights off. As well as commands with a simple phrase you can also create triggers which take a number or text input.
ANYLIST WITH GOOGLE ASSISTANT IFTTT FREE
Like IFTTT Google Apps Script is a free service and provides easy ways to automate tasks across Google products and third party services.įor this project I’m using the Google Assistant service on IFTTT which allows you to create voice commands. If you are not familiar with Google Apps Script this is part of the G Suite product family and lives in Google Drive. As part of this I’m going to show you how I got my Wemo Smart Switch to turn on for a defined number of minutes via Google Assistant. In this post I’m going to show you how you can use Google Apps Script with IFTTT to do more than this and that. Thankfully IFTTT has a Webhooks service which can be used as a this or that, so in other words ‘if this url is called then …’ or ‘if this then call that url’. If current condition changes to snow, then post a tweet to IFTTT’s basic logic isn’t enough and recently I was trying to setup a ‘if this then that for x minutes’ or ‘if this then that after x minutes’. If new feed item from, then add row to spreadsheet in my Google Drive IFTTT is a great free service which hooks into a long list of other applications and devices (currently 570 in total), which lets you create basic ‘if this then that’ type recipes, called applets.
