Hi;
I have created a chatbot with dialogflow using the inline editor. It works perfect right now. My problem is, how to capture the message entered by the user . ie,
imagine I have this conversation: user: Good morning bot: Hi, how can I help you...
my purpose is to get the text: Good morning. then, I'll store this statement into my data base. I want just a method to capture it. can you tell me, what I shoulf write, please?
exemple: if I want to capture a parameter , I write . let ville = agent.parameters.ville;
in case of the whole text, what I shoulf write??
Thank you :)
To get the full content of the message the user said, use:
let query = agent.query
You'll find it here: https://github.com/dialogflow/dialogflow-fulfillment-nodejs/blob/8bcea44eb3cf931d9ba316b273a59be672d0da63/src/v2-agent.js#L129
@nathanjliu thank you so much, it works :)
Most helpful comment
To get the full content of the message the user said, use:
let query = agent.queryYou'll find it here: https://github.com/dialogflow/dialogflow-fulfillment-nodejs/blob/8bcea44eb3cf931d9ba316b273a59be672d0da63/src/v2-agent.js#L129