Is it possible to access "text ingredients" from Google home request


Hi all,

I made an app that accepts a request from Google home. It then waits let’s say 5 seconds before triggering a list of IFTTT commands to switch off lights etc.

When you make the IFTTT applet (which links your Google home request to your glitch app) it gives you the choice to either use a simple phrase OR use a phrase with an added number OR a phrase with a text ingredient OR a phrase with both. Is it possible to use a phrase with a number and then access that number from the glitch app?

For example I would say to Google home “turn off the lights in 10 minutes”, and then I can access the “10” from the glitch app? This would be cool as you could specify how long the timer should be rather than having to make lots of separate glitch apps (an app for 10 minute timer, an app for 5 minute timer, an app for 15 minute timer etc).

Anyone know how this could be done? I’d expect it would be quite easy to do. Many thanks.


Yes, so your ‘this’ is Google Assistant’ and your ‘that’ is a webhook to your glitch project? In the config of the webhook you can select the ingredient to be sent, which you can see in the JSON body of the webhook request in your Glitch app. You’ll need to use the body-parser middleware (assuming you’re using Express) to be able to access that content easily.

An example setup outputting the json.body is below, so you’d need to take parts of that and add to your app:

var express = require('express')
var bodyParser = require('body-parser')

var app = express()

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))

// parse application/json

app.use(function (req, res) {
  res.setHeader('Content-Type', 'text/plain')
  res.write('you posted:\n')
  res.end(JSON.stringify(req.body, null, 2))

Passing Variables from IFTTT to Glitch

Thank you very much for your help, I’ve managed to make the script just as I wanted now. So I can say “hey Google, turn on (say name of smart device) in (however many) minutes” and it works :grinning::grinning::grinning::grinning:

Code can be seen here:


Whoops here


Sounds pretty slick!


It is pretty cool, however there is a weird glitch I can’t for the life of me figure out. I made a new topic for it