- Node.js and NPM
- We recommend installing using nvm for Linux/Mac and nvm-windows for Windows
- Install the Firebase CLI
- We recommend using MAJOR version
8
,npm install -g firebase-tools@^8.0.0
- Run
firebase login
with your Google account
- We recommend using MAJOR version
- From the Actions on Google Console, New project > Create project > under What kind of Action do you want to build? > Custom > Blank project
- Install the Actions CLI
- Navigate to
sdk/settings/settings.yaml
, and replace<PROJECT_ID>
with your project ID - Run
gactions login
to login to your account. - Run
gactions push
to push your project. - Run
gactions deploy preview
to deploy your project.
- You can test your Action on any Google Assistant-enabled device on which the Assistant is signed into the same account used to create this project. Just say or type, “OK Google, talk to my test app”.
- You can also use the Actions on Google Console simulator to test most features and preview on-device behavior.
This Action uses the Assistant conversation testing library for testing. Follow the steps below to run the tests for this project:
- Enable the Actions API for your project (The Actions API is enabled by default for newly created projects):
- Visit the Google API console and select your project from the Select a project dropdown.
- If the Action API is not enabled, search for "Actions API" and click Enable.
- Create a Service Account key:
- Visit the Google Cloud console credentials page and select your project from the Select a project dropdown.
- In the "Service Accounts" click on the "App Engine default service account" service account.
- Enter a service account name and click Create.
- From the Select a role dropdown, select Project > Owner.
- Click Continue.
- Click ADD KEY, then select Create new key, then press CREATE to download the service account JSON file.
- Rename the service account file to
service_account.json
, and place it in the root folder of the project. - Enable Web and App Activity Controls for the service account. It is necessary to have this setting enabled in order to call the Actions API.
npm run enable-activity-controls
- Run tests
npm run test
- Questions? Go to StackOverflow or the Assistant Developer Community on Reddit.
- For bugs, please report an issue on Github.
- Actions on Google Documentation
- Actions on Google Codelabs
Please read and follow the steps in the CONTRIBUTING.md.
See LICENSE.