Google Assistant is a voice assistant enabled on a wide range of Android devices, including smart speakers, phones, wearables, TVs and others.

Actions on Google

You can extend functionality of Google Assistant with Actions on Google. Aimylogic implements an integration with Actions on Google thus you can easily create an action for Google Assistant. All you need - is to create a bot in Aimylogic.

How to create an action

There are a couple of steps you have to do to create an action for Google Assistant.

Step 1. Enable Google Assistant channel

First of all you have to enable Google Assistant channel in your bot. Please go to Channels menu and click on Google Assistant button. A settings window appears. Just click on Connect button. A new channel will be appended.

Step 2. Download Action package

Click on the link "Download action.json" to download a JSON file. This is your action manifest. You have to upload it to your project in Actions Console.

Step 3. Create a new project in Actions Console

Each Action for Google Assistant is represented by a project in Actions Console. Please go to Actions Console and click on Add/Import Project button. Type some name for the project and select a language of your action.

Click on Create Project button and then select or skip a category.

Step 4. Add invocation name

Go to the Invocation menu and type some invocation name for your action. This name is used to activate your action in Google Assistant. Click Save button after this.

Step 5. Copy project ID

To upload a JSON file to your action you have to know it's project ID. Go to the Settings menu and copy Project ID string.

Step 6. Download gactions

To upload your JSON manifest to your project in Actions Console you have to use gactions tool. Just download an appropriate version.

Step 7. Upload action package

Open a terminal on your computer and jump to the folder with downloaded gactions tool and action package file (it has .json extension). Type the next command in your terminal

gactions update --action_package PACKAGE_NAME --project PROJECT_ID

Here you need to replace PACKAGE_NAME with your action package file name, and your project's ID instead of PROJECT_ID. Press Enter key. Gactions will ask you to authorise yourself to upload your action package

Copy an URL from the screen and open it in the browser. Sign in with your account used in Actions Console then. Copy the an authorisation code and paste it back to the terminal and press Enter key again. Thus your action package will be uploaded now and your action will become ready for test.

How to test your action

Once you've uploaded your action package to the project in Actions Console, you are able to test the action on the real device or in the test console. Just ask Google Assistant to run your action using invocation name you've added on step 4 of this guide.

Google Actions limitations

Please note that Google limits some features in Actions. Please learn more about these limitations here.
Was this article helpful?
Thank you!