Skip to content

Instantly share code, notes, and snippets.

View jedfonner's full-sized avatar

Jed Fonner jedfonner

View GitHub Profile
@jedfonner
jedfonner / index.js
Created August 2, 2021 23:54
Example of a Firebase Cloud Function integrating with DialogFlow
const functions = require('firebase-functions');
const cors = require('cors')({ origin: true });
const uuid = require('uuid');
// https://cloud.google.com/dialogflow/es/docs/reference/libraries/nodejs
// https://googleapis.dev/nodejs/dialogflow/latest/index.html
const dialogflow = require('@google-cloud/dialogflow');
// The ID of the GCP project where your Dialogflow agent is deployed
const PROJECT_ID = 'your-project-id';