actions-on-google

How to fetch device location using API AI?

北战南征 提交于 2019-11-30 19:14:20
I am using GUI tools provided by API AI to create Actions. Is it possible to fetch device location? I have heard that this is possible by requesting permissions. Is this documented anywhere? An example/code snippet will be very useful. The documentation is a bit unclear. I hope this can help someone. All you have to do is create a child fallback intent for the intent you are requesting permissions from. To do so you need to click on the "Add follow-up intent" link on your intent. Note that the link will only appear when you hover it. Select the fallback option from the dropdown list and a

Device location in dialogflow (api.ai) webhook request

白昼怎懂夜的黑 提交于 2019-11-30 16:05:50
I'm working on a Dialogflow chat bot for Google Assistant, in the webhook request JSON example here: https://developers.google.com/actions/reference/v1/dialogflow-webhook the webhook receives device data including its location: "device": { "location": { "coordinates": { "latitude": 123.456, "longitude": -123.456 }, "formatted_address": "1234 Random Road, Anytown, CA 12345, United States", "zip_code": "12345", "city": "Anytown" } } For some reason my webhook is not receiving any device data (the "device" key is missing completely). Does anyone know what I'm doing wrong or how I can include this

Device location in dialogflow (api.ai) webhook request

和自甴很熟 提交于 2019-11-30 15:53:14
问题 I'm working on a Dialogflow chat bot for Google Assistant, in the webhook request JSON example here: https://developers.google.com/actions/reference/v1/dialogflow-webhook the webhook receives device data including its location: "device": { "location": { "coordinates": { "latitude": 123.456, "longitude": -123.456 }, "formatted_address": "1234 Random Road, Anytown, CA 12345, United States", "zip_code": "12345", "city": "Anytown" } } For some reason my webhook is not receiving any device data

Is there a way to have change female to male voice during the conversation in DialogFlow (Api.ai)

六眼飞鱼酱① 提交于 2019-11-30 07:36:30
问题 We a building a chatbot app for Google Home using Api.ai (Dialogflow now) which has both male and female historical figures. We are using Actions on google. Google lets you default to a male or female voice when deploying the app. Is there a way to switch between male to female voice dynamically, for example, using code in webhook? 回答1: Maybe . Although SSML supports a <voice> tag, the documentation for Actions does not list it as supported. However, as you noted, there appears to be some

How to fetch device location using API AI?

亡梦爱人 提交于 2019-11-30 03:43:48
问题 I am using GUI tools provided by API AI to create Actions. Is it possible to fetch device location? I have heard that this is possible by requesting permissions. Is this documented anywhere? An example/code snippet will be very useful. 回答1: The documentation is a bit unclear. I hope this can help someone. All you have to do is create a child fallback intent for the intent you are requesting permissions from. To do so you need to click on the "Add follow-up intent" link on your intent. Note

Is it possible to play audio file or stream?

ぃ、小莉子 提交于 2019-11-29 12:19:54
Is it possible to play audio file or stream using actions-on-google-nodejs library? Nick Felker Using SSML you can return an audio clip up to 120s. <speak> <audio src="https://actions.google.com/sounds/v1/animals/cat_purr_close.ogg"> <desc>a cat purring</desc> PURR (sound didn't load) </audio> </speak> Edit If you want to play audio the mp3 file (over 120s), you need to use Media Responses if (!conv.surface.capabilities.has('actions.capability.MEDIA_RESPONSE_AUDIO')) { conv.ask('Sorry, this device does not support audio playback.'); return; } conv.ask(new MediaObject({ name: 'Jazz in Paris',

Why is the carousel not showing in the console simulator?

不问归期 提交于 2019-11-29 11:40:51
I am trying to figure out how I can embed Google Actions responses, such as the carousel , in a webhook response for DialogFlow. I am using V2 of the REST protocol, so I am filling ACTIONS_ON_GOOGLE in the source field and the payload field contains the Google Actions field as specified (as per How can I integrate the Google Actions responses in a webhook response in Dialogflow? ). I am sending the following response: { "fulfillmentText":"This is a carousel.", "source":"ACTIONS_ON_GOOGLE", "payload":{ "conversationToken":"", "expectUserResponse":true, "expectedInputs":[ { "inputPrompt":{

Dialogflow v2 API + Actions v2 API: MalformedResponse 'final_response' must be set

夙愿已清 提交于 2019-11-29 10:24:45
I'm trying to start working on Google Actions v2 API together with Dialgoflow v2 API. I have the following example (so far in Dialogflow -> Fulfillment Webhook) taken from official Google Actions Migration Guide , but unfortunately I keep getting MalformedResponse 'final_response' must be set error. 'use strict'; const functions = require('firebase-functions'); const { dialogflow } = require('actions-on-google'); const app = dialogflow(); app.intent('Default Welcome Intent', conv => { conv.ask('How are you?'); }); exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app); And

Get email from user using Google actions

泄露秘密 提交于 2019-11-29 00:32:02
I want to recieve the user email using Google Actions as documented here but docs talks about EMAIL permission, but when I read the permission docs here I can't find any EMAIL permission. Any help? How can I receive the user email? Ya, unfortunately the Assistant's SDK doesn't give you the email address. But if you implement account linking (like Ahmed mentioned) and use the Streamlined Flows, then you'll be getting the email provided to you; you just need to use the jsonwebtoken library and you can decode the assertion JWT and grab the email address. That being said, this happens during "sign

Sorry, this action is not available in simulation

混江龙づ霸主 提交于 2019-11-28 23:23:24
My test invocation name is "Mrs Tang", so i input "Talk to Mrs Tang", but it responds "Sorry, this action is not available in simulation"... Does anybody know How can I resolve this error? According to the doc : Turn on the Web & App Activity, Device Information, and Voice & Audio Activity permissions on the Activity controls page for your Google account. You need to do this to use the Actions Simulator, which lets you test your actions on the web without a hardware device. And I had do what Jeremy Gordon suggested. To add a second google account in the GCP IAM console with a viewer action