Use Google Assistant through your Amazon Alexa device.
An unofficial Alexa skill that forwards your questions to the Google Assistant API and plays back Google's spoken answer.
Important
Something not working? Check Troubleshooting before opening an issue.
- Features
- How it works
- Prerequisites
- Installation
- Configuration
- Usage
- Development
- Troubleshooting
- Uninstalling
- Contributing
- License
- Ask Google anything from any Alexa device: "Alexa, ask google what's the weather like".
- Spoken answers in Google's voice, plus a visual card on Echo Show and other screen devices (APL).
- Follow-up questions keep the session open when Google expects a reply.
- Location-aware answers. The skill looks for a location in this order:
- a location you saved by voice,
- the Alexa device's GPS (mobile devices),
- the Alexa device's address,
- the address in your Google profile.
- Language preference saved per user, for example German, Japanese, or British English.
- Self-hosted on your own AWS account. Deployment uses one Serverless Framework command.
sequenceDiagram
participant U as You
participant A as Alexa
participant L as AWS Lambda
participant G as Google Assistant API
participant S as Amazon S3
U->>A: "Alexa, ask google …"
A->>L: Intent request + linked Google token
L->>G: Text query over gRPC
G-->>L: Audio response (PCM)
L->>L: Encode PCM to MP3
L->>S: Upload MP3
S-->>L: Short-lived signed URL
L-->>A: SSML audio + APL card
A-->>U: Plays Google's answer
User settings (saved location and language) are stored in a DynamoDB table.
- Node.js 24.x and npm 11+
- An AWS account with the AWS CLI configured
- A Google Cloud project with the Google Assistant API enabled
- An Amazon Developer account
The full step-by-step guide is in docs/serverless_install.md. It covers the Alexa interaction model, the Google OAuth setup, and account linking. Short version:
git clone https://github.com/rokmohar/alexa-assistant.git
cd alexa-assistant
npm install
cp .env.example .env # then fill in your values (see Configuration)
npm run deploy:prodServerless creates the Lambda function, the S3 bucket for audio, and the AlexaAssistantSkillSettings DynamoDB table.
Prebuilt release ZIP
Every release includes alexa-assistant-vX.Y.Z.zip. You can upload it to a Lambda function in the AWS Console:
- Runtime: Node.js 24.x
- Handler:
index.handler - Environment variables: see Configuration
With this option you must create the S3 bucket, the DynamoDB table (AlexaAssistantSkillSettings, partition key userId), and the IAM permissions yourself. serverless.yml shows what is needed.
Build the ZIP with Docker
docker build -t alexa-assistant .
docker run --rm --entrypoint cat alexa-assistant ./lambda.zip > lambda.zipSet these in .env. Serverless passes them to the Lambda function.
| Variable | Required | Default | Description |
|---|---|---|---|
ALEXA_SKILL_ID |
Yes | — | Skill ID from the Alexa Developer Console |
GOOGLE_PROJECT_ID |
Yes | — | Google Cloud project ID |
S3_BUCKET |
Yes | — | Bucket name for audio (must be globally unique) |
GOOGLE_API_ENDPOINT |
No | embeddedassistant.googleapis.com |
Google Assistant gRPC endpoint |
Enable the skill in the Alexa app and link your Google account. Then try:
| Say | Result |
|---|---|
| "Alexa, ask google who is the queen of england" | Asks Google Assistant |
| "Alexa, ask google to set my location to Paris" | Saves a location for location-aware answers |
| "Alexa, ask google what location is saved" | Reads back the saved location |
| "Alexa, ask google to clear my location" | Removes the saved location |
| "Alexa, ask google to set my language to German" | Sets the language for Google's answers |
| "Alexa, ask google what language is set" | Reads back the language |
| "Alexa, ask google to reset my language" | Uses the Alexa device's language again |
Supported languages: English (US, UK, Australia, Canada, India), German, French (France, Canada), Spanish, Italian, Japanese, Korean, and Portuguese.
npm install # also installs the Husky pre-commit hook (ESLint + Prettier)
npm run build # bundle to dist/ with webpack + Babel
npm start # run locally with serverless-offline| Script | Description |
|---|---|
npm run typecheck |
Type-check with tsc |
npm run lint |
Lint with ESLint (lint:fix to auto-fix) |
npm run format |
Check formatting (format:fix to apply) |
npm run deploy |
Deploy the default stage |
npm run logs |
Tail the Lambda function's CloudWatch logs |
Project layout:
src/
├── index.ts # Alexa request handlers (intents)
├── config/ # Environment config, validated with zod
├── services/ # Assistant (gRPC), Encoder (MP3), Bucket (S3), Location, …
├── factories/ # Service wiring
├── interfaces/ # Shared types
└── errors/ # Error types and handler
- Troubleshooting guide: account linking loops, the skill's error messages, wrong location or language, and more.
- Check the logs with
npm run logs. - Still stuck? Open a bug report.
-
The audio bucket has versioning turned on, so CloudFormation can't delete it until it's empty. Open the bucket in the S3 console and click Empty. This also deletes old versions.
-
Remove the stack:
npx serverless remove
This removes the Lambda function, the S3 bucket, and the DynamoDB table. Your saved locations and languages are deleted too.
Contributions are welcome. See CONTRIBUTING.md for development setup and the pull request process. This project follows the Code of Conduct.
Found a security issue? Please follow the Security policy instead of opening a public issue.
GPL-3.0 © Rok Mohar
This project is not affiliated with, endorsed by, or sponsored by Google LLC or Amazon.com, Inc. Google Assistant is a trademark of Google LLC. Alexa and Echo are trademarks of Amazon.com, Inc.