0

I am trying to integrate dialogflow phone gateway with my dialogflow bot. one specific intent uses the response of function written in inline editor (fulfillment). when the function is called it throws following error:

Error: No responses defined for platform: GOOGLE_TELEPHONY at WebhookClient.send_ (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:488:13) at promise.then (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:306:38) at at process._tickDomainCallback (internal/process/next_tick.js:229:7)

this same flow works perfectly fine with google home and the action simulator.

I have tried: https://github.com/dialogflow/dialogflow-fulfillment-nodejs/issues/117

    let context = {'name': 'context-name', 'lifespan': 2, 'parameters': {'param': agent.parameters.param}};
    agent.setContext(context);
    agent.add(' this is the response text');
Rohit Patidar
  • 92
  • 2
  • 10

2 Answers2

0

I was able to solve the problem by changing the version of dilogflow-fulfillment to the latest i.e. 0.6.1 in package.json, also replaced agent.setContext(); With agent.context.set();

Also you cannot use multiple agent.add() in single webhook call, because only the first one will get resolved.

Rohit Patidar
  • 92
  • 2
  • 10
0

I faced this problem and the following helped me

agent.end("");

This needs to be inserted at the end of the function Try it