Rand Abu Salim
Rand Abu Salim

Reputation: 65

Retrieving data from firebase by the dialog flow inline editor fulfillment

I am just start learning how to write fulfillment to read a data stored in the firebase as a first step.

Actually, I stored the same data in the firebase realtime database and the firebase cloud database just to try from which one i must read my data, so I am just stuck how to retrieve it by the inline editor

My data is just a JSON object String names. Note : form where i should start to learn Node.js for dialogflow fulfillment to do basic operation as storing and retrieving ?

Upvotes: 1

Views: 735

Answers (1)

Prisoner
Prisoner

Reputation: 50701

You can use the firebase-admin library for node.js.

The inline editor is just Firebase Cloud Functions under the covers.

Your fulfillment code needs to run "somewhere" in the cloud - you'll need an HTTPS URL that you will provide, so this is called a "webhook". Firebase Cloud Functions are a convenient place to do this - they provide a HTTPS endpoint and good scalability, but you can run your fulfillment webhook anywhere on the public Internet.

Dialogflow provides an easy way to use Firebase Cloud Functions, by providing the inline code editor. This uses Firebase Cloud Functions to do the work, but hides the URL from you, so it is one fewer thing you need to deal with.

There are a number of good places to get started, but one is using Google's Codelabs for the Assistant make sure you also have looked at Google Docs for Actions on Google, which links to other resources as well.

Upvotes: 1

Related Questions