What You'll Learn 🧠
- How to link your project to Google Actions and Dialogflow
Step 1 ➤ Creating an Account on Google Actions
- Create an account on Google Actions (if you haven't already).
- You must create this account to link your project to Google Actions and Dialogflow.
Visit the Google Actions Homepage.
- Click [Go To Actions Console] and log in your with Google account.
Step 2 ➤ Creating a New Google Actions Project
- You can think of a Google Actions project as the Google equivalent of an Alexa skill.
- However, on the Google Assistant platform, for every unique skill you wish to publish, you must create a new project on the Google Actions console.
To create a new Google Actions project, hit [Add/Import Project].
If this is the first time you are using this account, a window will appear, simply answer the questions and click on Agree and continue.
A pop-up will appear. Enter a Project Name and click [Create Project].
- Select the [Conversational] template in the bottom right corner.
- This will allow you to connect your Google Actions project with a Dialogflow agent ⏤ a requirement for integrating with Voiceflow.
- Your Google Assistant project is now created! We'll attach a Dialogflow agent to it in the next section.
Step 3 ➤ Creating a New Dialogflow Agent
- Dialogflow, another Google service, is used as Google Assistant's NLU engine.
- It receives your choices, intents, and slots (called "entities" in Dialogflow) and creates a language model that will be used in your skill.
- Along with a Google Actions project, you will also need to create a new Dialogflow agent for every Voiceflow project that you wish to publish to Google.
You should now be at the home page of your project on the Google Actions console. Under Build your Action, click on [Add Action(s)] in the menu bar to the left.
- Select [Add your first action]
- A 'Create Action' pop-up should appear. Select the Custom intent option and click [Build] and this should open the Dialogflow Console in a new tab.
- If you see your project name (Test-Project, in this case) and the phrase "Agent will be linked with [project id] Google Project" under the 'Google Project' section, your Google Actions project has been successfully linked with Dialogflow.
Click [Create] to continue.
If you see a blank agent name and no listed project in the 'Google Project' section, you are logged into the wrong account on Dialogflow and must log out. Log back in with the same Google account that you used to create your Google Actions project and repeat the steps in this section.
Logout from Dialgflow if you're not on the same account.
Login with the same account, go back to the Google Actions Console window and hit the Add your first action again.
You should now see the Agent linked to the correct project
At this point you have successfully created your agent. Hooray! Now you will need to generate a set of credentials which allows Voiceflow to manage your project on your behalf.
Click the settings icon on the left menu bar.
Click the 'Service Account' link.
This will take you to the IAM & Admin service accounts page.
If you get an 'Unauthorized Access' error message, you might be logged into the wrong Google account. On the IAM & Admin service accounts page, log back in with the same account that you used to create the Google Actions project and Dialogflow agent.
On the left-hand side menu bar, you'll see that you're now in the IAM & admin user management home page, click [CREATE SERVICE ACCOUNT] at the top.
In the 'Service account name' field, type in Voiceflow Creator Tool, select the name and click [CREATE].
After selecting [CREATE], you will be redirected to the next page. Click on the 'Select a role' box, and type in 'Dialogflow API Admin'. Select the option [Dialogflow API Admin] from the drop down menu and hit [CONTINUE].
Voiceflow will use this service account to manage your Dialogflow agent for your Google Assistant project.
On the next page, click [ + CREATE KEY ]
In the pop-up that appears, select 'JSON' as the key type and click [CREATE]. This should download a credentials file to your computer
Upload the file you just downloaded to Voiceflow in the Google publishing page under the 'Google Assistant Credentials File' field.
That's It! 🎉
- Your project is ready to publish to Google Assistant
- To make changes to your project's Directory Information on Google (Such as Invocation Name, Display Icon, and Locales), see Deploying Your Google Assistant Project to Production