DEV Community

Tinashe Gondwa
Tinashe Gondwa

Posted on

How to capture Entity Values in Node.js Backend

Hi DEVs. I'm looking for a way to capture user input entered in Dialogflow as an Entity, then the value of the entity(actual data) sent to Node.js and saved as a variable. I've tried using getEntityQuery() but it's not working.

Any help would be greatly appreciated.

Top comments (4)

Collapse
 
newtonmunene_yg profile image
Newton Munene
Collapse
 
teenahg profile image
Tinashe Gondwa

Thanks Newton, I've been able to implement this.

My problem now however is trying to get specific data inputs from a user, like so:
var id1 = agent.parameters["SomeDialogflowEntity"];
var id2 = agent.parameters["DialogflowEntity2"];

both values being captured dynamically from Dialogflow, then use these values(id1 and id2), as conditions in an SQL statement in the Node.js backend connected to a database.

Collapse
 
newtonmunene_yg profile image
Newton Munene

Are you trying to get them in a fulfillment webhook or from the match intent response?

Thread Thread
 
teenahg profile image
Tinashe Gondwa

I want to get them from a fulfillment webhook.