Use various Firebase services to set up, run, and extend the functionality of your Actions.
Fulfillment defines your Action's functionality and conversational elements. If your Action interacts with external APIs, requires complex logic, or needs to read and store to a database, it will need fulfillment. With Firebase Functions, your Action's fulfillment is hosted as an HTTP web service, making deployment and maintenance quick and easy.
While you can use any HTTP web service for fulfillment on Actions on Google, Firebase Functions is one of the easiest ways to define fulfillment for your Action:
- Deploy your endpoint rapidly and seamlessly, with minimal time spent configuring CLI settings or importing additional libraries.
- Effortlessly integrate with other Firebase cloud services such as Firebase Real Time Database.
- Computing resources are automatically scaled according to your Action's usage, so you don't need to worry about server maintenance at all.
- Setup fulfillment without providing a credit card or billing information.
To get started with Cloud Functions for Firebase, visit the docs for Firebase Functions.
Many Actions use rich media content in their conversations, to improve the user experience. And if they don't, they should! Apps that use images and sound clips rather than just text typically end up being much more vibrant and memorable, and as a result see higher engagement and retention among users.
Firebase Hosting makes it extremely simple to host static rich media files for use in your Action. You can upload files in the Actions on Google folder we create for you in the Firebase console, and then immediately start referencing those files in your Assistant’s rich responses.
If you are an existing Firebase user, you can also easily re-use any assets you have hosted for your mobile or web apps.
If your Action generates user-specific files, Firebase Storage will give you a place to store it. Whether it’s a log of your Action’s responses in a text file or an image file, allow your users to access content you create for them, wherever they are.
This also means your user’s data can persist across multiple platforms. For instance, your web app generates an image for a user. By using storage, that image is accessible to that same user, through your Action. When using your mobile app, if connectivity is spotty, the download of the user’s files will pause and then resume when their signal improves.
To learn more, visit our Firebase Storage docs.
Firebase Realtime DB
Your Action may require a backend to store simple data. Firebase Realtime Database is a cloud-hosted solution that stores data as one large JSON tree. Low latency means Realtime Database is ideal for synched states across clients.
Plus, if you're an existing Firebase developer, you can re-use your existing database to share a backend between your mobile and Actions. This means your mobile app can be notified of changes a user makes through your Action. Ultimate synchronicity!
Learn more by visiting the Firebase Realtime Database docs.