- 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-bot
folder 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.sh
if you wish to use this deploy script. - Install the gcloud command line utility.
- From
src/yoda-bot
deploy usingsrc/yoda-bot/deploy.sh
or 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 URL
from 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.add
with the Action Name ofmath.add
. g 1. Under User Says enter "what is 10 plus 6"- Mark the 10 as
number1
with entity type@sys.number
- Mark the 6 as
number2
with entity type@sys.number
- Under Fulfillment mark Use webhook
- Mark the 10 as
- Create an Intent named
yoda.translate
with the Action Name ofyoda.translate
.- Under User Says enter "translate hello world to Yodish"
- Mark
hello world
asphrase
with 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.add
yoda.translate
- Click Test.
- Click View to open the Actions on Google simulator.
- Type
Talk to my test app
in the simulator, or sayOK Google, talk to my test app
to 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.