Search code examples
actions-on-googledialogflow-esgoogle-home

How can i customize google home expressions while building my app?


I would like to make input to Google Home, not as a intent, more as a answer. I'm using Dialogflow

Example :

Home : "What is your name ?"
Me   : "John"
Home : "Nice to meet you John"

Which function am I supposed to use to make an understandable input? How can I store this in a variable?


Solution

  • You have to create an intent to expect your answer. Then create you select part of your "user says" expression to be your answer, like the following image shows.

    Define your action and parameter name.

    Then on your fulfillment you can can get it like this:

    let name = app.getArgument('userName');