- Use the Actions on Google Console to add a new project with a name of your choosing.
- Click Use API.AI and then Create Actions on API.AI to open the API.AI console.
- Click Save to save the project.
- Click on the gear icon to see the project settings.
- Deploy the fulfillment webhook provided in the
src/yoda-botfolder using Google Cloud Functions:- Create a Google Cloud Platform project if you don't already have one.
- Create a Cloud Storage Bucket to store your source code when deploying to Cloud Functions. Add this value to
src/yoda-bot/deploy.shif you wish to use this deploy script. - Install the gcloud command line utility.
- From
src/yoda-botdeploy usingsrc/yoda-bot/deploy.shor using$ gcloud beta functions deploy yodabot --trigger-http --stage-bucket [YOUR_STORAGE_BUCKETNAME]
- Go back to the API.AI console and select Fulfillment from the left navigation menu. Enable Webhook, set the value of URL to the
Function URLfrom the previous step (should look something likehttps://us-central1-your-project.cloudfunctions.net/yodabot, then click Save. - In the API.API console:
- Create an Intent named
math.addwith the Action Name ofmath.add. g 1. Under User Says enter "what is 10 plus 6"- Mark the 10 as
number1with entity type@sys.number - Mark the 6 as
number2with entity type@sys.number - Under Fulfillment mark Use webhook
- Mark the 10 as
- Create an Intent named
yoda.translatewith the Action Name ofyoda.translate.- Under User Says enter "translate hello world to Yodish"
- Mark
hello worldasphrasewith entity type@sys.any - Under Fulfillment mark Use webhook
- Create an Intent named
- Select Integrations from the left navigation menu and open the Settings menu for Actions on Google.
- Enter the following intents as Additional triggering intents
math.addyoda.translate
- Click Test.
- Click View to open the Actions on Google simulator.
- Type
Talk to my test appin the simulator, or sayOK Google, talk to my test appto any Actions on Google enabled device signed into your developer account.
For more detailed information on deployment, see the documentation.
Ask Bret on Twitter at @bretmcg.
Please read and follow the steps in the CONTRIBUTING.md.
See LICENSE.
