This guide will show you how to install Google Assistant to your Alexa device (Amazon Echo / Dot / Show). This skill uses the official Google Assistant API giving you access to more features on your Alexa device.

Before we begin, there are some things you need to know:

What can the Google Assistant Skill do?

For information on what Google Assistant can do, read here. However, not all of these features are functional on the Alexa device.

The following features do not work:

  1. Alarms and timers. Use Alexa for these.

  2. Device location. If you have a Home address set in your google account then it will use that as a default. NOTE:- if you are in Europe and want weather forecasts in metric then just ask the assistant to “Change my units to Celsius”.

  3. Playing music, news, or podcasts is not supported.

  4. Account linking for third party services requires owning a Google Home and installing the Google Home application. This affects using services like Uber, or connecting to home automation devices like Hue.

  5. Multiple Users are not supported – it will only use the Google account linked through the Alexa app

  6. Asking Google Assistant to change volume. You will need to ask Alexa directly.

(source: https://github.com/tartanguru/alexa-assistant)

What is the difference between this and the other Ask Google skill?

The Google Assistant skill does everything the Ask Google skill does but better and has even more features. The Ask Google skill is a basically a screen reader and answers your questions by reading the Google answer boxes at the top of the results page. This can give incomprehensible answers if there are charts or tables in the answer box. This will not happen with the Google Assistant skill which uses the official Google Assistant API. You can ask Google Assistant any kind of questions, ask for traffic travel times, ask about local places, ask about events on your Google Calendar, ask about flight information, and much much more.

Is it free?

This skill uses Amazon services (AWS Polly and S3) which cost money depending on how often you use the skill. The rate is low and should cost around $5.20 per year if you do 1000 calls to the skill per month. If you do not want to pay to use this skill (note: you are paying Amazon, not the creator of the skill), you can try using the “Ask Google” Alexa skill instead which is free but with less functions. For more information regarding the pricing, read here.

 

This is an unofficial Google Assistant skill and is not endorsed by Google or Amazon.

This skill was created by tartan_guru. More information on this skill including instructions, updates, troubleshooting, and more can be found on the official page here:

https://github.com/tartanguru/alexa-assistant

How-to Install Google Assistant Skill to Echo / Dot / Show

1. Create a personal AWS account here using the same email address used to register your Alexa device.

Create an AWS Account

2. You are required to enter your credit card information.

AWS Payment Information Page

3. In the Support Plan page, select the Basic plan.

AWS Plan Page

4. Once your account is created, go here and sign into your account.

5. Click on the region drop-down next to your name on the top-right corner and select “US East (N. Virginia)” if you live in the US, or “EU (Ireland)” if you live in Europe. These are the only two regions that support Alexa.

AWS Change Region

6. Now click on Services on the top-left corner and go to Lambda under the Compute section.

AWS Lambda

7. Click on the Get Started Now button or Create function to create a Lambda function.

AWS Lambda Get Started Now

8. Click Author from scratch.

9. Click on the dotted line icon, select Alexa Skills Kit, then press Next.Alexa Skills Kit Integration

10. Under Basic information, entering the following values:

  • Enter “google-assistant” for Name*
  • Enter “Google Assistant” for Description
  • Select Node.js 6.10 for Runtime*

11. Under Lambda function code, select Upload a .ZIP file for Code entry type and upload the index.zip file. You can download the file here (click Clone or download > Download ZIP). Unzip the downloaded file and the index.zip file will be located inside the folder.

12. Under Environment variables in the Lambda function code section, enter the following five lines:

S3_BUCKET <enter random string>
CLIENT_SECRET
CLIENT_ID
API_ENDPOINT embeddedassistant.googleapis.com
REDIRECT_URL

You can get a random string from here. Copy the random string into the S3_BUCKET value field.

The completed section should look like this:

13. Under Lambda function handler and role, select Create a custom role for Role* – it should open a new page/tab.

14. In the new page, select Create a new IAM Role for IAM Role, and call the Role Name “google_assistant“.

15. Now click View Policy Document and click on Edit.

16. Press Ok to continue editing the policy.

17. Replace the text in the box with the following:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": [
                "arn:aws:logs:*:*:*",
                "arn:aws:lambda:*:*:*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "polly:SynthesizeSpeech"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": "*"
        },
        {
            "Effect": "Allow",
            "Action": "dynamodb:*",
            "Resource": "*"
        }
    ]
}

 

18. Press Allow. You should now be taken back to the Lambda function handler and role section with google_assistant selected under Existing role*.

19. Press on the Advanced settings tab, set Memory (MB)* to 1536 MB and Timeout* to 12 sec.

20. This is what the completed Configure function page should look like:

21. Press Next.

22. Press Create function.

23. Once the new Lambda function is created, copy the ARN code on the top-right corner. You will need this for later.

We are done with this page for now. Leave this page open as will we need to return to it later. We will now proceed to create the Alexa Skill.

24. Open a new page and go create a free Amazon Developer account here. (If you already have an account, please skip to step 26)

Amazon Developer Registration

25. Under the Payments page, answer No for both questions.

Amazon Developer Payments Page

26. Sign into your account here and click on to the Alexa tab.

Sign In to Amazon Developer Console

27. Under Alexa Skills Kit, press on Get Started.

Get Started with Alexa Skills Kit

Before we continue, if you have the old Ask Google skill installed (from our other tutorial) and want to set activation name for the new Google Assistant skill to “Google” (Alexa, ask google what sound a duck makes?”), you will need to either:

  • Remove the old Ask Google skill by going to the Alexa tab > Alexa Skills Kit > and hit the delete icon next to the old Google skill.

  • OR, change the old Ask Google skill invocation name to something other than “google”, by going to Alexa tab > Alexa Skills Kit > hit Edit next to the old Google Skill > and change the Invocation Name and hit Save.

Otherwise you will need to use a different Invocation Name for step 29. Some popular ones are “google assistant” or “assistant”. If you use a different invocation name for this skill, you can activate the skill by saying this name. Example, “Alexa, ask <new invocation name> what restaurants are open right now?”. (Ignore this if you do not have the old Ask Google skill installed)

28. Press Add a New Skill on the top right corner.

Add a New Alexa Skill

29. In the Skill Information page, enter the following information:

  • Select English (U.S.) or English (U.K) for language. German is currently not supported.
  • Enter “Google Assistant for Alexa” for Name.
  • Enter “google” for Invocation Name.
  • Leave the rest of the settings as is and hit Save and then hit Next.

30. In the Interaction Model page, copy the following text into the Intent Schema box:

{
  "intents": [
    {
      "intent": "AMAZON.StopIntent"
    },
    {
      "intent": "AMAZON.CancelIntent"
    },
    {
      "slots": [
        {
          "name": "search",
          "type": "SEARCH"
        }
      ],
      "intent": "SearchIntent"
    }
  ]
}

31. Type “SEARCH” (all caps) into the Enter Type field under Custom Slot Types.

32. Copy the following text into the Enter Values box and press Add:

who is the queen
why is the sky blue

33. Copy the following text into the Sample Utterances box:

SearchIntent {search}

34. Press Save and then Next.

35. In the Configuration page, select AWS Lambda ARN (Amazon Resource Name) for Service Endpoint Type and enter your ARN code (from step 23) in the Default field.

36. Select Yes for Account Linking and copy the two URLs in the Redirect URLs section. You will need this for later.

We are now done with this page. Leave this page open as will we need to return to it later. We will now setup the Google API.

37. Open a new page and go to the Cloud Platform Console here. Sign in with your Google Account. If this is your first time using Google Cloud Platform, you will need to agree to the terms of service.

38. Press Select a project on the top right corner.

39. Press the + button.

40. You can enter any name for project name or leave it as default and hit Create.

41. You will be redirected to the Cloud Platform Console homepage. Wait for a notification on the top right corner.

42. Press on the notification icon and select “Create Project: <Project Name>”.

43. Go to the Google Assistant API manager here and hit Enable.

44. Press Create credentials.

45. Under Add credentials to your project, enter the following information:

  • Select Google Assistant API for Determines what kind of credentials you needs.
  • Select Web server (e.g. node.js, Tomcat) for Where will you be calling the API from?
  • Select User data for What data will you be accessing?
  • Then press What credentials do I need?

46. Type “google_assistant” for the Name.

47. Under Authorized redirect URIs, enter the first Redirect URL from step 36 and press enter. Now, enter the second Redirect URL from step 36 into the second box.

48. Press Create client ID.

49. Enter “Assistant” for the Product name shown to users and press Continue.

50. Press I’ll do this later.

51. Click on “google_assistant“.

52. Copy the Client ID and Client secret. You will need this for later.

53. Go back to the Alexa Skill page (from step 36), and enter the following URL into the Authorization URL field:

https://accounts.google.com/o/oauth2/auth?access_type=offline

54. Replace the Client ID with the Google Client ID from step 52.

55. Under Domain List, press Add domain and add google.com . Press Add domain again and add googleapis.com .

56. Under Scope, press Add Scope and add https://www.googleapis.com/auth/assistant-sdk-prototype . Press Add Scope again and add https://www.googleapis.com/auth/script.external_request .

57. Under Authorization Grant Type, enter https://accounts.google.com/o/oauth2/token for Access Token URI.

58. Copy the Client Secret code from step 52 and enter it into the Client Secret field.

59. Enter https://www.google.com/policies/privacy/ for Privacy Policy URL.

60. This is what the completed Global Fields page should look like:

61. Press Save then press Next. We do not need to continue with this page. The skill is ready is configured.

62. Open the Lambda function page from step 23. Press Code.

63. Enter the Client Secret and Client ID from step 52 into the CLIENT_ID and CLIENT_ID fields under Environment variables.

64. If you live in the U.S., set the REDIRECT_URL to https://layla.amazon.com/api/skill/link/ . If you live in Europe, set the REDIRECT_URL to https://pitangui.amazon.com/api/skill/link .

65. Hit Save.

66. Open the Google Activity Controls page here (sign in with your Google account if you’re not already signed in), and enable the following:

  • Web & App Activity – Check the box for “Include Chrome browsing history and activity from websites and apps that use Google services
  • Location History
  • Device Information
  • Voice & Audio Activity

67. In the Alexa app (on your iOS or Android device or you can use the web based app here), go to Skills > Your Skills > Google Assistant for Alexa > and press Link Account. Sign in with your Google account.

68. Press Allow.

69. The Google Assistant skill for Alexa is now set up.

70. For local searches to work, you will need to add a home or work address to your Google account. Go to Google Maps here and make sure you’re signed into your account. Now go to Menu.

71. Go to Your places.

72. Set a home and/or work address.

You are finally done! You can activate the skill by saying, “Alexa, ask Google…”, or if you set a different invocation name, “Alexa, ask <invocation name>…”

If you have any questions or comments, feel free to leave it below and we will try to answer them quickly.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *