Integrating OpenAI API with Google Home using n8n Automation

My Objective: I want to set up a voice command like “Hey Google, talk to AI” and have Google send that request to my self-hosted n8n instance. The n8n workflow will then reach out to the OpenAI API, gather the response, and relay it back to Google so my device can read it out loud.

Current Situation: Nothing is working as intended. Google is failing to connect with my n8n configuration.

Progress So Far:

  • I established a workflow within n8n
  • Obtained my OpenAI API keys
  • Registered for Google Cloud and Actions Console accounts
  • Set up SSL certificates using certbot
  • Ensured ports 80 and 443 are open and n8n is accessible
  • Partially filled out the OAuth2 application for Google (some fields were left blank)
  • Generated OAuth2 ID and secret in n8n but I’m confused about what scopes to apply

Assistance Needed:

  • What OAuth2 scope should I choose for this integration?
  • What specific steps do I need to follow for n8n to handle voice requests from Google Home devices?

Additional Worries:
I’m questioning whether this project is still viable. I come across many guides that reference Dialogflow, but that platform has been inactive since June 2023. I can’t seem to locate any recent guides for setting this up. Any links to functioning tutorials would be extremely helpful!

Thank you for any support you can provide.

oauth2 ruined my last project too man. forget trying to connect google home directly, just use webhooks. get n8n ready to catch POST requests, then connect voice commands via IFTTT or a basic android app. trust me, way easier than dealing with google’s chaotic api rules.

The Actions Console thing everyone keeps pushing is honestly a nightmare. I tried that exact setup 6 months ago and ditched it for something that actually works. Skip OAuth2 completely - just use Google Assistant Relay. It’s a third-party bridge that runs locally and takes commands from Google Home without all the official API BS. Install Assistant Relay on a raspberry pi or spare computer, then set it up to hit your n8n webhooks when it hears your trigger phrase. Your n8n workflow gets the voice text, runs it through OpenAI, and sends the response back to Assistant Relay which speaks it through your Google device. Way more reliable than fighting Google’s constantly changing dev requirements. Takes maybe 2 hours instead of weeks debugging OAuth.

You’re hitting the same wall most of us hit when Dialogflow ES got deprecated. Good news - it’s still doable, just different now. Don’t try making Google Home talk directly to n8n. Instead, use Google Assistant SDK or build a custom Action through Actions Console with fulfillment webhooks pointing to your n8n instance. For OAuth2 scopes, you’ll need https://www.googleapis.com/auth/assistant-sdk-prototype if you go the SDK route. Here’s the catch - Google now puts Actions through a much stricter approval process. I got something similar working by creating a conversational action that triggers a webhook to my automation platform when specific intents match. The trick was setting up the fulfillment URL in Actions Console to point to my n8n webhook endpoint. Make sure your n8n workflow can handle Google Assistant’s JSON format - it’s not like standard webhook payloads.