actions-on-google

Use NodeMailer in Dialogflow

蹲街弑〆低调 提交于 2019-12-20 04:38:17
问题 i would like to send an email for an operation in my program i make in Dialogflow. I wanna use NodeMailer but when i deploy my project i have this error message: The deployment of your Cloud Function failed: Function load error: Code in file index.js can't be loaded. Did you list all required modules in the package.json dependencies? Detailed stack trace: Error: Cannot find module 'nodemailer' Is this possible to use NodeMailer in DialogFlow ? Thanks 回答1: It sounds like you're using the built

Google Actions - Access to Calendar API with access token fails

你说的曾经没有我的故事 提交于 2019-12-20 03:40:08
问题 I followed the instructions in this great post, to setup account linking between my app's server and google actions. In the auth process, I requested "https://www.googleapis.com/auth/calendar" scope permission. I managed to get the auth token on my server by calling app.getUser().accessToken But when I make a request to googleapi calendar, using this piece of code: const google = require('googleapis'); var calendar = google.calendar('v3'); var eventData = { auth: myAuthToken, calendarId:

Make Google Assistant open my app on a specific state

不羁岁月 提交于 2019-12-20 02:49:12
问题 I am trying to integrate my android app with google assistant. I've already done some research and went through some tutorials, but they only bring me text, card, or audio responses. What I need is that the google assistant open my app on a specific state based on what it is asked to google assistant. For example, I will ask google assistant when will the next game of my favorite team happen. Then google assistant will open my app showing the schedule of the next games of my favorite team. I

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

流过昼夜 提交于 2019-12-18 06:09:47
问题 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

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

你说的曾经没有我的故事 提交于 2019-12-18 06:09:05
问题 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

Is it possible to play audio file or stream?

前提是你 提交于 2019-12-18 05:18:13
问题 Is it possible to play audio file or stream using actions-on-google-nodejs library? 回答1: 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

Authenticate Google Calendar on API.AI with Google Actions

可紊 提交于 2019-12-18 04:23:16
问题 I am writing an API.AI app with Google Actions (will run on google assistant and google home). The app should be able to read\add events to the user's google calendar account. The backend is Google Cloud Functions, and I enabled the Calendar API in the developers console. The flow the user should experience is something like this: User : "Hey Google, when was my last meeting with Anna?" Agent : "Your last meeting with Anna was two days ago" User : "Set a meeting with Anna for the tomorrow"

Sorry, this action is not available in simulation

给你一囗甜甜゛ 提交于 2019-12-18 02:41:18
问题 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? 回答1: 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

Error: No response has been set. Cloud Functions for Actions on Google Assistant

蓝咒 提交于 2019-12-17 18:56:40
问题 I am building an Assistant app for Google Home, using Dialogflow , Cloud Functions and the new NodeJS Client Library V2 for Actions on Google . In fact I am in the process of migrating my old code built with V1 to V2. The Context I am trying to get the user's location using two seperate intents: Request Permission (Intent that triggers/send permission request to the user) and User Info (Intent that checks if the user granted permission and then returns the data requested by the assistant to

Use Async Functions in DialogFlow WebHook

一个人想着一个人 提交于 2019-12-17 16:37:53
问题 Referring to the solution posted here (DialogFlow V2 Webhook - Expects Speech responses Immediately and not after async requests) What I want to achieve is that the web hook should wait until I get a response from my api call. P.S: The API is working, its just that the bot doesn't wait for the response to come. Any help would be greatly appreciated. Thanks const rp = require('request-promise'); function convert(params){ return rp('https://data.fixer.io/api/convert?access_key=[my key]&from='+