Firebase 如何编写此履行代码(包括输出)?

Firebase 如何编写此履行代码(包括输出)?,firebase,google-sheets,dialogflow-es,Firebase,Google Sheets,Dialogflow Es,首先,在开发了简单的代码之后,我试图编写如何将用户输入的数据保存到GoogleSheet。它可以工作。感谢Master先生提供本教程(链接下方) 推荐人:马斯特先生: 接下来,我遇到了代码下面的问题。我不知道如何写它来实现。有人能意识到这一点来教我吗 工具:Dialogflow、Google sheet、Firebase 主题:订单流程 我试着在这里写()。但是,它不起作用。(首先代码) 您可以使用下面的代码 let forhere= agent.parameters.forhere; let

首先,在开发了简单的代码之后,我试图编写如何将用户输入的数据保存到GoogleSheet。它可以工作。感谢Master先生提供本教程(链接下方)

推荐人:马斯特先生:

接下来,我遇到了代码下面的问题。我不知道如何写它来实现。有人能意识到这一点来教我吗

工具:Dialogflow、Google sheet、Firebase

主题:订单流程

我试着在这里写()。但是,它不起作用。(首先代码)


您可以使用下面的代码

let forhere= agent.parameters.forhere;
let howmanypeople= agent.parameters.howmanypeople;
let whattime= agent.parameters.whattime;
let namelist= agent.parameters.namelist;
然后在api调用中使用此变量。

对T.Ali:

Dialogflowfirebasefulfillment&错误消息:

虽然我认为这个错误没有说明这些错误在哪里

Dialogflow Request body: {"responseId":"ab277bc6-3bcc-4c4b-9a94-192b9ecfb8af-f308a5c4","queryResult":{"queryText":"黃大哥","parameters":{"forhere":"內用","whattime":{"date_time":"2019-09-20T12:00:00+08:00"},"howmanypeople":3,"namelist":"黃大哥"},"allRequiredParamsPresent":true,"outputContexts":[{"name":"projects/test-tyrpxs/agent/sessions/5dd26d5c-bd99-072c-3693-41f95a3a348d/contexts/forhere","lifespanCount":4,"parameters":{"welcome":"嗨","welcome.original":"hi","forhere":"內用","forhere.original":"內用","whattime":{"date_time":"2019-09-20T12:00:00+08:00"},"whattime.original":"明天中午","howmanypeople":3,"howmanypeople.original":"3","namelist":"黃大哥","namelist.original":"黃大哥"}}],"intent":{"name":"projects/test-tyrpxs/agent/intents/ec0f55c4-e9c9-401f-bce7-d2478c40fb85","displayName":"ForHere"},"intentDetectionConfidence":1,"languageCode":"zh-tw"},"originalDetectIntentRequest":{"payload":{}},"session":"projects/test-tyrpxs/agent/sessions/5dd26d5c-bd99-072c-3693-41f95a3a348d"}

Error: No handler for requested intent
    at WebhookClient.handleRequest (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:317:29)
    at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/srv/index.js:105:9)
    at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9)
    at /worker/worker.js:783:7
    at /worker/worker.js:766:11
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)
此外,我已经在下面写下了正式工作的代码(将用户数据输入到GoogleSheet)。

感谢鲁本先生帮我排字。首先,我非常感谢您的帮助。但是,它和我写的代码类似吗?const{forhere,howmanyopele,whattime,namelist}=agent.parameters;constdata1=[{Forhere:Forhere,howmanyopele:howmanyopele,Time:whattime,Name:namelist}];好的,首先,如果您在Firebase拥有试用帐户,它将不允许您从履行中调用外部Api。如果您已升级了计划,则在履行窗口上单击“在Firebase控制台中查看执行日志”->,然后告诉我调用intent后日志上的内容。
Dialogflow Request body: {"responseId":"ab277bc6-3bcc-4c4b-9a94-192b9ecfb8af-f308a5c4","queryResult":{"queryText":"黃大哥","parameters":{"forhere":"內用","whattime":{"date_time":"2019-09-20T12:00:00+08:00"},"howmanypeople":3,"namelist":"黃大哥"},"allRequiredParamsPresent":true,"outputContexts":[{"name":"projects/test-tyrpxs/agent/sessions/5dd26d5c-bd99-072c-3693-41f95a3a348d/contexts/forhere","lifespanCount":4,"parameters":{"welcome":"嗨","welcome.original":"hi","forhere":"內用","forhere.original":"內用","whattime":{"date_time":"2019-09-20T12:00:00+08:00"},"whattime.original":"明天中午","howmanypeople":3,"howmanypeople.original":"3","namelist":"黃大哥","namelist.original":"黃大哥"}}],"intent":{"name":"projects/test-tyrpxs/agent/intents/ec0f55c4-e9c9-401f-bce7-d2478c40fb85","displayName":"ForHere"},"intentDetectionConfidence":1,"languageCode":"zh-tw"},"originalDetectIntentRequest":{"payload":{}},"session":"projects/test-tyrpxs/agent/sessions/5dd26d5c-bd99-072c-3693-41f95a3a348d"}

Error: No handler for requested intent
    at WebhookClient.handleRequest (/srv/node_modules/dialogflow-fulfillment/src/dialogflow-fulfillment.js:317:29)
    at exports.dialogflowFirebaseFulfillment.functions.https.onRequest (/srv/index.js:105:9)
    at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9)
    at /worker/worker.js:783:7
    at /worker/worker.js:766:11
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickDomainCallback (internal/process/next_tick.js:219:9)