Connecting OpenAI API with Google Home through n8n automation platform

Hey everyone! I’m trying to build a voice automation setup and getting stuck. Here’s what I want to do:

My goal: Say “Hey Google, talk to AI assistant” and have it send my question through my self-hosted n8n server to OpenAI’s API, then speak the answer back through my Google Home device.

Current status: Nothing works yet. Google Home isn’t connecting to my n8n setup at all.

What I’ve completed:

  • Created n8n workflow
  • Got OpenAI API credentials
  • Set up Google Cloud console account
  • Installed SSL certificate via certbot
  • Opened necessary network ports (80, 443)
  • Made n8n accessible from internet
  • Partially filled Google’s OAuth2 application form
  • Generated OAuth2 credentials in n8n

Where I’m stuck: Google wants an OAuth2 scope but I don’t know which one to pick. Also not sure if my approach is correct.

Questions:

  1. Which OAuth2 scope should I use?
  2. What’s the proper way to make n8n respond to Google Home voice commands?
  3. Is this still possible? I see old tutorials mentioning Dialogflow but that service ended in June 2023.

Any help or links to current guides would be amazing! Thanks.

You’re actually on the right track but there’s a fundamental issue with your architecture. Google Home devices can’t directly receive responses from external APIs due to security restrictions - they only work with approved Actions on Google integrations. What you need is to create a proper Google Action using Actions Console (not just OAuth2 credentials). The correct flow would be: Google Home → Actions on Google → your n8n webhook → OpenAI API → back through the same chain. For the OAuth2 scope you mentioned, you don’t actually need one for this setup since you’re building a webhook-based Action, not accessing user data. I’ve successfully built something similar using Actions Console with fulfillment webhooks pointing to my n8n instance. The key is registering your n8n webhook URL as the fulfillment endpoint in Actions Console, then handling the conversation properly with the right response format that Google expects. Skip the OAuth2 complexity entirely and focus on the Actions SDK documentation - it’s much more straightforward than the old Dialogflow approach.

I went through something similar last year and the OAuth2 scope confusion is real. For n8n integration with Google services, you typically need the https://www.googleapis.com/auth/assistant-sdk-prototype scope, but here’s the thing - Google Assistant SDK has pretty strict limitations for custom integrations now. Your approach might be overcomplicating things. Instead of trying to make Google Home directly talk to n8n, consider using IFTTT as a bridge. Set up a webhook trigger in IFTTT that connects to your n8n instance, then create a Google Assistant applet that fires when you say your custom phrase. This bypasses most of the OAuth headaches. Regarding Dialogflow, it’s not completely dead - they migrated it to Dialogflow ES and CX, but the free tier got axed which is probably what those tutorials were using. The webhook approach through IFTTT has been more reliable in my experience anyway. You’ll get your voice command triggering n8n, which calls OpenAI, but the response might need to come back through your phone rather than the Home device due to Google’s restrictions.

honestly the oauth2 stuff is a nightmare with google these days. tried this exact setup 6 months ago and gave up lol. maybe look into using home assistant instead? its way easier to integrate with n8n and you can still get voice commands working thru it. the google assistant integration there is much more str8forward than dealing with googles api directly