actions-on-google

Get original parameter input - Dialogflow Fulfillment

て烟熏妆下的殇ゞ 提交于 2020-03-05 04:42:05
问题 I want to get the original input of a parameter in my fulfillment code. I tried: var time = agent.parameters.time.original but the result was undefined. I have tried: var query = agent.query but could not accurately parse the parameter I need the original input of. 回答1: According to an answer on the old API.ai discourse forums, it looks like original parameters may only be available in a webhook fulfillment request if you set a context on the intent. At that point, the original parameter

Use multivocal libary to configure repeat intent in Dialogflow for VUI

无人久伴 提交于 2020-02-25 04:12:29
问题 I'm trying to configure my VUI to repeat a sentence in Dialogflow when it is prompted for this. Little back story, I am helping develop a social robot for elderly so repeating a sentence is a much needed feature. I just started on this project and the previous developer responsible for this is gone and not reachable, also, I have no experience in Node.js. I am looking to use the multivocal for this. These are the steps I have done so far: Created an intent called 'Repeat'. Added training

Send push notification title to its invocation intent in Actions on Google

时间秒杀一切 提交于 2020-02-25 04:07:11
问题 I'm sending push notifications in Actions on Google (ref this official documentation). So once I send the notification I'm sending title in it. So it looks like this, where A Very Happy Birthday, Jay Patel is the title that I've sent. So once I click on the notification, it opens Google Assistant and invokes the intent (configured in this step), but it doesn't specify any contexts or other data regarding that notification so I'm not getting a person name that I've specified in title or any

“The agent returned an empty TTS” when action is not opened separately to asking an intent

自古美人都是妖i 提交于 2020-02-23 03:59:05
问题 When I invoke the skill with 'okay Google, ask {skillname} to {utterance}' I get the response 'The agent returned an empty tts" and the conversation closes. It doesn't even seem to hit my backend - I've tried hosting the backend code on both a local server and on AWS and the same issue happens in both cases. There's no log of the request being made either on Stackdriver on Google or on CloudWatch on AWS. The only response I get is the following in the debug tab: { "response": "The agent

Error with token exchange requests in Google Smart home

回眸只為那壹抹淺笑 提交于 2020-02-16 08:23:49
问题 I´m following this Google documentation to make account linking with oauth. In the token exchange requests item, I am receiving the JSON below, as expected: { "client_id" : "*****", "client_secret" : "*****", "code" : "myauthorization_code", "grant_type" : "authorization_code", "redirect_uri" : "https://oauth-redirect.googleusercontent.com/r/****" } and my response is: { "access_token" : "myaccess_token", "expires_in" : 3600, "refresh_token" : "myrefresh_token", "token_type" : "Bearer" } But

get json data from realtime database to Dialogflow inline editor (google assistant)

耗尽温柔 提交于 2020-02-04 05:46:12
问题 Beginner here on programming, I'm working on my free time on a project which is related to Google Assistant, for the first time i'm using the Firebase Realtime Database and don't know how to get the data from there, the code below is in Dialogflow's inline editor, where is category1 2 and 3 inside those are students with credits. I have made some changes and put these three (categories1 2 and 3) in the database picture below, i want to remove these three categories from code and replace it

Google Assitant App not storing user information

≯℡__Kan透↙ 提交于 2020-01-25 08:54:04
问题 So I have been following this documentation provided by Google: https://developers.google.com/actions/identity/user-info Recently, the request.userId was deprecated so Google. So I turned to this documentation which specifies use the conv.user.storage. I have tried using the storage property in my app but it seems it doesn't store any user data as the next time I access it, the storage generates a new user id key. const data = "Something you want to save"; let userId; // if a value for userID

Parameters in link to my action are ignored by Dialogflow

笑着哭i 提交于 2020-01-24 20:11:30
问题 I suddenly can't seem to pass parameter values as part of my link to a Google Action anymore. This used to work a few months ago, and I don't believe anything changed at our end. As an example, I have one parameter in my default Welcome intent called "source", type @sys.any. In the Actions On Google console, I enable the "Link" for actions.intent.MAIN (I can also see the source parameter listed there). But when using the link, the "source" parameter value never makes it to Dialogflow. I tried

Difference between `GoogleUser.getId()` (oauth) vs `app.getUser().userId` (actions-on-google)

有些话、适合烂在心里 提交于 2020-01-17 08:43:30
问题 The id I get from app.getUser() from the actions-on-google-nodejs app looks entirely different from the id I get from Oauth. app.getUser() in Google Assistant { userId: 'KMdEs***szG-ZRQl***cU', user_id: 'KMdEs***szG-ZRQl***cU', userName: { [...] The same id is returned with and without the app.SupportedPermissions.NAME permission. googleUser.getBasicProfile().getId() in Google OAuth 11348***63489 Is there any way to match these users up? It's the same Google Project in the developer console,

How do I get user entitlements to persist across conversations

浪尽此生 提交于 2020-01-16 09:35:11
问题 I am trying to see if a user has purchased a product by checking conv.user.entitlements but except for immediately after purchase, this is empty. This value seemed to be persisting between conversations previously, now it is always empty. I am able to see the entitlement using conv.user.entitlements immediately after purchase, but then it is gone. if (arg.purchaseStatus === 'PURCHASE_STATUS_OK') { console.log('purchase2 ', conv.user.entitlements); //this works as expected showing the