I am using Dialogflow to create an action for the Google assistant. I am following this tutorial: https://medium.com/voice-tech-podcast/get-current-location-of-a-user-using-helper-intents-in-actions-on-google-19fe9a8ea99f
When I use the command firebase deploy
in step 5, this is the output that I get:
=== Deploying to 'location-tracker-xxxx'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> lint
> eslint .
✔ functions: Finished running predeploy script.
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
i functions: preparing functions directory for uploading...
✔ Deploy complete!
Project Console: https://console.firebase.google.com/project/location-tracker-xxxx/overview
I am supposed to get Webhook URL which I can use as webhook URL in Dialogflow.
This is my index.js:
const functions = require("firebase-functions");
const { dialogflow, Permission, SimpleResponse } = require("actions-on-google");
const app = dialogflow();
app.intent("Default Welcome Intent", conv => {
conv.data.requestedPermission = "DEVICE_PRECISE_LOCATION";
conv.ask(new SimpleResponse('Welcome to location tracker'));
return conv.ask(
new Permission({
context: "to locate you",
permissions: conv.data.requestedPermission
})
);
});
I have read this Stackoverflow but it did not solve my problem because there is not shown what the solution was science the code referred to is not available anymore.
Thanks!