Git Product home page Git Product logo

fulfillment-firestore-nodejs's Introduction

Dialogflow Firestore Sample

  • This sample demonstrates how to connect Dialogflow to the Firestore database.
  • Dialogflow parses users' requests and sends requests to Firebase function indicating whether it should add or retrieve an entry from the Firestore database. The Firebase function queries the database to add or retrieve the entry and then compiles the proper response to the user. You can speak to your Dialogflow agent and tell it to write something to the database or retrieve it.
  • The sample will save what you tell it to save into the database as well as retrieve the value you store previously.
  • When you speak to your Dialogflow agent a webhook call is sent to Firebase functions which talks to the Firestore database to retrieve or add a entry as see below:

This sample is meant to be a starting point for anyone looking to connect a database to their Dialogflow agent and can be expanded to store users preferences, retrieve relevant data from your systems or enable your users to collaborate via chat/voice.

Dialogflow → Webhook Request → Firebase Function → Firestore Database

Setup

Dialogflow and Fulfillment Setup

To create this agent from our template:

Firestore Setup

  1. In Dialogflow's console, in the left menu > go to Fulfillment > Enable Inline Editor > Deploy.
  2. At the bottom, go to View execution logs in the Firebase console.
  3. In the Firebase console, go to Database > Create database.
  4. Select Start in locked mode > Enable.

Running the sample

  1. In Dialogflow's console, in the Dialogflow simulator on the right, query your Dialogflow agent with Write Buzz Aldrin to the database and then query What's in the database? to get the response "Buzz Aldrin".

Related Samples

Name Language
Fulfillment & Regex Validation Node.js
Weather: Fulfillment & WWO API Node.js
Bike Shop: Fulfillment & Google Calendar API Node.js
Temperature Trivia: Fulfillment & Actions on Google Node.js
Fulfillment & Actions on Google Node.js
Fulfillment & Firestore Database Node.js
Multi-language/locale Node.js
Basic Slot Filling Node.js

For Fulfillment Webhook JSON Requests & Responses.

References & Issues

How to make contributions?

Please read and follow the steps in the CONTRIBUTING.md.

License

See LICENSE.

Terms

Your use of this sample is subject to, and by using or downloading the sample files you agree to comply with, the Google APIs Terms of Service.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.