Use various Firebase services to set up, run, and extend the functionality of your Actions.
Cloud Functions for Firebase
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 Cloud Functions for Firebase, 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, Cloud Functions for Firebase 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 Cloud Firestore.
- 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, visit the docs for Cloud Functions for Firebase.
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.
Cloud Storage for Firebase
If your Action generates user-specific files, Cloud Storage for Firebase 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 Cloud Storage for Firebase docs.
Your Action may require a backend to store simple data. Cloud Firestore is a cloud-hosted solution that stores and syncs data.
Cloud Firestore offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions, which means its perfect for use with Actions on Google.
Learn more by visiting the Cloud Firestore docs.