Can I use Python to build an action for Google Home [closed]
Asked Answered
C

2

5

I am starting development of Google Home actions and would like to do so with the Python language instead of node js, provided in the getting started tutorial at https://developers.google.com/actions/get-started/.

I was going through the tutorial and was stuck at the point where it requires the use of node js for the demo facts app.

I need to use Python for this, as mentioned above. (I think web hooks are something of importance here. Not sure what they are.)

Cite answered 31/8, 2017 at 8:25 Comment(0)
C
6

The webhook is the callback that is called by the action. It will receive a JSON payload with all of the context data from Google Assistant. Google will send a POST request to whatever service you specify in the API.AI console as the webhook. It is then up to you to send a response back to Google so that it can 'render' that response on the client device. You can use flask or any other Python framework to process the POST request and generate your response.

Remember that Google Assistant can run on a variety of platforms and as such, you will want to look at the 'surface' parameter to specialize your response payload for the device you are responding to.

Camala answered 5/10, 2017 at 1:57 Comment(0)
S
2

Yes, you can use python for developing google home .I have used AWS Lambda and api gateway to map the web hook. If your code is too small you can code in the lambda inline editor itself but if it include additional import packages ,code it in your machine and zip it along with necessary packages .The steps are for notifications

Sclerometer answered 23/4, 2018 at 9:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.