0

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?

Prisoner
  • 49,922
  • 7
  • 53
  • 105
  • I'm sorry, I'm not sure what you mean by "understable"? And, to be clear, are you trying to use Dialogflow for this, or something else? (Or don't you care?) – Prisoner Jan 02 '18 at 10:57
  • understandable* Sorry ( Something that google home can understand) And yeh im using DialogFlow :) – Victor Attila Breelle Jan 02 '18 at 11:40
  • https://stackoverflow.com/questions/48027819/how-to-reply-back-a-user-with-his-her-name-using-dialogflow – Guest5 Jan 02 '18 at 12:26
  • The name was just an example, actually i dont care about name. The purpose is to ask a code " Give me your secret code" " my code is 1 2 3 4" juste just i will compare what i say and a code in a variable, exit if the code is false, continue if it's true. – Victor Attila Breelle Jan 02 '18 at 13:01

1 Answers1

3

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');
Bruno Araújo
  • 319
  • 4
  • 10