Trigger Script From Google Home

Hi,

I’m wanting to trigger a script of some sort from speaking to Google Assistant, and then it reply back with the answer - is this possible?

Interaction would be something like this:

“Hey Google - What temperature is it in the living room?”

  • Google would trigger a script and get the result and then speak the answer on the device I triggered it from-

I’m not sure if this is possible, but it’s something I’d quite like to achieve. Obviously if I wanted to do it for a temp that would be fine because Google just does that via the integration, but if for example I wanted to ask what Grocy tasks I have outstanding, or how many sweet potatoes in stock for instance, now you’re seeing where my mind is going with it.

Many Thanks,