actions-on-google

Action using web-fulfillment with firebase throwing MalformedResponse 'final_response' must be set

喜欢而已 提交于 2019-12-02 12:32:47
问题 Env : Using firebase cloud deployed google action. Action is using webhook to get results from functions. I am using Blaze plan so calling external URL should be legit. I am using dialogflow V2. Part of my function's job is doing the following: I make an external API request using the following (Masked code detail): var requestObj = require('request'); var options = { url: 'my url', headers: { 'User-Agent': 'request' } }; function callback(error, response, body) { if (!error && response

Multiple Dialogflow commands asked at same time

时光怂恿深爱的人放手 提交于 2019-12-02 12:24:48
问题 I have an Action where the user can set values of different parameters. Currently this is implemented something like this, and it works well: Now I want to make the conversation less robot-like and more flexible, so I would like to allow users to set or change more than one value at a time. They should be able to say things like Change the Interest Rate to 4% and the Term to 15 years. or Change the Interest Rate to 4%, the Term to 15 years, and the Years to Average Principal to 3. 回答1: There

Simulator error UnparseableJsonResponse (“Cannot find field.”)

痞子三分冷 提交于 2019-12-02 11:54:34
问题 I have successfully tested the first few intents of my app with my webhook in the DialogFlow console, but testing in the Simulator gives the following error: UnparseableJsonResponse API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: ": Cannot find field.". NB!!! The first thing to notice is that it refers to "API Version 2". No requests are reaching my webhook - so it appears that this is all within Google. Using Chrome Developer Tools, I see the Network entry

DialogFlow/Actions: Allow Google Assistant user to create Event in Google Calendar from Actions App

那年仲夏 提交于 2019-12-02 09:53:17
Target/Summary : I have an Actions App developed in Google DialogFlow and I want the user be able to create Google Calendar Event using the App (from Google Assistant). In other words, authenticate the user to Allow my app to use his Calendar to create Events. What is done: Since Google Actions doesn't allow use of Google Auth/Token endpoints, I opted to use http://www.auth0.com . Created an account (used my Google account) on auth0.com , created an Application and setup the following values using their management panel ( Domain, CliendId and ClientSecret generated by auth0): Created OAuth

Google action MediaResponse not working on some devices

最后都变了- 提交于 2019-12-02 09:12:05
we are currently playing around with newly launched https://developers.google.com/actions/reference/rest/Shared.Types/AppResponse#mediaresponse According to documentation we will receive a final Response after media is finished playing. This works well in simulator but on mobile devices and speakers it works intermittently We only get this call back 2 or 3 times and sometimes never get it on either devices. As it works few times we are sure it's just google engine but want to make sure we are not doing anything wrong ourselves. I am using my own backend and have our engine (Action SDK). I am

How to wait for the promise when using get in Firestore

主宰稳场 提交于 2019-12-02 09:04:04
I am just trying a simple get command with Firestore, using this code from Google it doesn't work because it's not waiting for the promise? Earlier I had put only a snippet of code, this is the entirety of index.js -- I'm using Firestore with Dialogflow to build a Google Assistant app and trying to call a function from the welcome intent that gets a field from Firestore, then writes that field to a string (named question1), and then this string should be spoken by the assistant as part of the ssml response. I've been on this for at least 30 hours already, can't seem to comprehend promises in

How can I integrate the Google Actions responses in a webhook response in Dialogflow?

你。 提交于 2019-12-02 08:43:22
问题 I am trying to figure out how I can embed Google Actions responses, such as the cards carousel, in a webhook response for DialogFlow. On https://developers.google.com/actions/dialogflow/webhook, I found the following information: The response format of the Dialogflow webhook contains the standard Dialogflow webhook response contents and a data.google object that closely resembles a standard conversation webhook response with the following general differences. So I tried extending the webhook

{“error”:“invalid_client”,“message”:“Client authentication failed”}

邮差的信 提交于 2019-12-02 08:29:09
I completed these steps Installed laravel/passport. Created a website user. Generated passport keys PHP artisan passport: install Generated client_id and client_secret using PHP artisan passport:client Added redirection and callback routes in web.php Authorized the user and got the final access token. client information step in the action console. find my application in the home app but when I log in to the web page show client authentication failed. Thanks in advance for the help The link you provide for the "redirect" URI must be the one that Google has specified. You're redirecting to

Wait some seconds before agent's reply

余生颓废 提交于 2019-12-02 08:25:07
I'm trying to build a very simple Dialogflow app for Actions on google. What I had in mind was a very simple timer, but every X seconds the agent will tell the user "X seconds left". I'm using the Fulfillment section on dialogflow. What I've tried to do was a simple "setTimeout" that include another agent.add but this seems to be ignored by Dialogflow when I deploy it: function startTimer(agent) { agent.add("Timer started! 20 seconds from now."); setTimeout(function(){ agent.add("10 seconds left!"); }, 10000); agent.add("Time out."); } let intentMap = new Map(); intentMap.set('timer',

Unable to accept the permission prompt on Actions on Google

你说的曾经没有我的故事 提交于 2019-12-02 06:19:13
问题 I am trying to get permissions for location and name for my app. Here is my index.js - link It seems to be stuck in a loop :- Here are my intents on API.AI :- 回答1: The event actions_intent_PERMISSION needs to be attached to an Intent that will be called after the user authorizes the information to be sent. The handling for it in the webhook needs to read the information given and save it or do something with it immediately. Your code is looping because the code that is processing the request