Back to All
Developer Blog

How to connect Gmail to OpenClaw: GOG skill setup for vibe coders

GOG Skill Setup – A Beginner’s Guide for Vibe Coders

Your AI agent is only as powerful as what you give it access to, right? Commonly, agents answer questions but what if it could actually do things for you? Send an email on your behalf, check what’s on your calendar, pull a file from your Drive, all before your first sip of morning coffee.

This tutorial walks you through how to set up GOG (Google Operations Gateway), the skill that connects OpenClaw to your Google account, turning your agent from a conversationalist into an executor.

If you’re new to OpenClaw or AI agents in general, this guide will help you understand what these agents can do for you, and how to get started by installing and orchestrating them across Snapdragon and Dragonwing devices.

In the example below, I used an ASUS Zenbook with a Snapdragon X Elite and a Samsung Galaxy S24+ powered by a Snapdragon 8 Gen 3. Two devices, one seamless experience.

What You'll Need Before Starting

  • OpenClaw already installed and running
  • A Google account (Gmail)
  • About 20–30 minutes

What You’ll Achieve

  • Sending emails without ever opening Gmail
  • Orchestrating across your phone and your AI PC with a simple message
  • Connect GOG to your Google account and installed the Gmail skill in OpenClaw

    Before you begin:
    This setup requires configuring a Google Cloud project, enabling APIs, and completing OAuth permissions. Make sure you have the appropriate access rights and have added your account as a test user if your app is not yet verified.

Part 1: Set Up a Google Cloud Project

This is the "permission slip" that lets OpenClaw talk to your Google account. It sounds technical but just follow the steps exactly!

Step 1 — Go to Google Cloud Console

Open your browser and go to:

https://console.cloud.google.com

Sign in with your Google account if prompted.

Qualcomm-image

Step 2 — Create a New Project

  1. Click "Select a project" at the top of the page
  2. Click "New Project"
  3. Give it a name — anything works, like OpenClaw or MyBot
  4. Click "Create"

💡  Once created, make sure your new project is selected — you'll see its name in the top bar next to the Google Cloud logo.

Qualcomm-image

Step 3 — Enable the Google APIs

Now we need to turn on access to the Google services OpenClaw will use.

  1. Click the hamburger menu (☰) in the top left
  2. Search for and Enable each of these one by one:
    1. Gmail API
    2. Google Calendar API
    3. Google Drive API
    4. People API (this covers Contacts)
    5. Google Sheets API
    6. Google Docs API

💡 For each one: search the name → click on it → click the blue Enable button. After enabling, hit the back button to go back to the library and search the next one.

Qualcomm-image

Step 4 — Set Up the OAuth Consent Screen

This is what gives your app permission to access your Google account.

  1. Click the hamburger menu (☰)
  2. Go to APIs & Services à Google Auth Platform
  3. Fill in the required fields:
    1. App name: OpenClaw (or anything you like)
    2. User support email: select your email from the dropdown
  4. Click Next through the remaining steps — you don't need to fill anything else in
  5. When asked about Audience, choose External
  6. Click Create
Qualcomm-image

Step 5 — Add Yourself as a Test User

⚠️  This is a step many people miss! If you skip this, Google will block you with an "Access blocked" error later. Don't skip it!

  1. In the left sidebar, click Audience
  2. Scroll down to find Test users
  3. Click + Add users
  4. Type in your Gmail address (the one you want OpenClaw to use)
  5. Click Save
Qualcomm-image

Step 6 — Create Your OAuth Credentials

  1. Click "+ Create client" (or "Create OAuth client")
  2. For Application type, choose Desktop app
  3. Give it a name like OpenClaw
  4. Click Create

You'll see your new client appear in the list.

Qualcomm-image

Step 7 — Download the Credentials File

  1. Click on your newly created client name in the list
  2.  
  3. Click it — this saves a file called something like client_secret_802043...json to your Downloads folder

💡  Keep this file safe — it's your key to connecting OpenClaw to Google. Don't share it with anyone.

Part 2: Set Up GOG in Ubuntu

Now switch back to your Ubuntu terminal — the black window where your prompt shows your username like kiln@LAPTOP... with a $ at the end. This is NOT PowerShell (which starts with PS C:\). If you're unsure which window you have open, look for the $ symbol at the end of the prompt — that's your Ubuntu terminal.

Step 8 — Copy the Credentials File into Ubuntu

First, find your Windows username. Open File Explorer and look at the path in the address bar — it will say something like Users > Ruby > Downloads. Your Windows username is the name shown there.

⚠️  Your Ubuntu username (like kiln) and your Windows username (like Ruby) can be completely different! Always check File Explorer to find your real Windows username before running this command.

Now run this command — replace Ruby with your actual Windows username:

cp /mnt/c/Users/Ruby/Downloads/client_secret*.json ~/client_secret.json

Verify it copied correctly:

ls ~/client_secret.json

You should see your file path printed in green, like /home/yourusername/client_secret.json — that means it worked!

💡  If you see a 'Not a directory' error but still see the file path printed in green underneath — that's fine! It just means the file already existed. As long as you see the green file path, you're good to go.

Qualcomm-image

Step 9 — Register Your Credentials with GOG

gog auth credentials ~/client_secret.json

You should see:

path    /home/yourusername/.config/gogcli/credentials.json
client  default

That means it worked!

Qualcomm-image

Step 10 — Authenticate Your Google Account

Run this command — replace the email address with your own Gmail:

gog auth add [email protected] --services gmail,calendar,drive,contacts,sheets,docs --manual

This will print a very long URL starting with https://accounts.google.com/o/oauth2/auth?...

Qualcomm-image

Step 11 — Complete the Google Authorization

  1. Select and copy the entire long URL from your terminal (click at the start, drag to the end, then Ctrl+C)

  2. Paste it into your browser address bar and press Enter

  3. Sign in with your Google account if prompted

  4. Click Allow to grant OpenClaw access to your Google services

  5. Your browser will then show an error page saying "Hmmm... can't reach this page" or "127.0.0.1 refused to connect" — this is completely normal and expected! Don't panic!

  6. Look at the address bar — it will have a new URL starting with 127.0.0.1:...

  7. Copy that entire URL from the address bar (Ctrl+C)

  8. Go back to your terminal and paste it with Ctrl+Shift+V then press Enter

💡  Why does the browser show an error? OpenClaw is set up to receive the authorization on your local computer. The error page is totally normal — what matters is copying that redirect URL from the address bar!

After pasting the redirect URL, you'll see your email address, a list of services (calendar, contacts, docs, drive, gmail, sheets), and "client default" — that means Google is fully connected!

Qualcomm-image

Step 12 — Verify Authentication

Double-check everything is working:

gog auth list --json

You'll see a long JSON output — don't worry if it looks overwhelming! As long as you can see "gmail", "calendar", "drive" and your other services listed in there, you're good to go.

Qualcomm-image

Part 3: Install the Gmail Skill in OpenClaw

Step 13 — Find and Install the Gmail Skill

First, let's search for the current Gmail skill name — OpenClaw updates frequently and skill names can change:

openclaw skills search gmail

Look through the results for a skill that mentions Gmail integration. Then install it:

openclaw skills install gmail-oauth

💡  If you get a "Skill not found" error, the skill name may have changed since this guide was written. Run openclaw skills search gmail to find the current name, then install whichever one mentions Gmail OAuth or Gmail integration.

Qualcomm-image

  

Step 14 — Restart the Gateway

openclaw gateway restart

You should see: Restarted systemd service: openclaw-gateway.service

That means everything is running and ready to go!

Qualcomm-image

Part 4: Send Your First Email!

You're all set! Open Telegram and message your bot. Try typing something like:

"Send an email to [friend's email] with the subject 'Hello from OpenClaw' and say hi from me!"

Or even simpler to test it out:

"Check my latest emails"

Your bot should respond and take action — powered by AI and your Gmail account!

Troubleshooting

"Access blocked" from Google

"cp: cannot stat ... No such file or directory"

Your Windows username is probably different from what you typed. Open File Explorer and check the path in the address bar — it shows your real Windows username.

"Skill not found" when installing gmail-oauth

The skill name may have changed since this guide was written. Run openclaw skills search gmail to see the current available skills and install the one that mentions Gmail or OAuth.

"gog: command not found"

GOG wasn't installed yet. Make sure you've completed the full OpenClaw setup before starting this guide.

The browser redirect URL step is confusing

Remember: the "can't reach this page" error in your browser is correct and expected. Just copy the URL from the address bar (even though the page won't load) and paste it back into the terminal with Ctrl+Shift+V.

Which terminal should I be using?

All commands in this guide go in your Ubuntu terminal — the one where the prompt shows your username followed by a $ sign, like kiln@LAPTOP-FQFDMCNO:~$. This is NOT PowerShell (which starts with PS C:\).

 

Congrats! You’ve have successfully connected GOG to your Google account and installed the Gmail skill in OpenClaw.

What started as a chat interface can now take real actions like sending messages through Gmail and more, orchestrating across devices with a simple message.

OpenClaw is modeling what the future of AI looks like – check out where it’s headed

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries ("Qualcomm"). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.

Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries.

About the Author
Ruby Hagin
Ruby HaginSenior Marketing Communications Specialist
Qualcomm relentlessly innovates to deliver intelligent computing everywhere, helping the world tackle some of its most important challenges. Our leading-edge AI, high performance, low-power computing, and unrivaled connectivity deliver proven solutions that transform major industries. At Qualcomm, we are engineering human progress.

Stay connected

Get the latest Qualcomm and industry information delivered to your inbox.

Subscribe
Manage your subscription

© Qualcomm Technologies, Inc. and/or its affiliated companies.

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm patented technologies are licensed by Qualcomm Incorporated.

Note: Certain services and materials may require you to accept additional terms and conditions before accessing or using those items.

References to "Qualcomm" may mean Qualcomm Incorporated, or subsidiaries or business units within the Qualcomm corporate structure, as applicable.

Qualcomm Incorporated includes our licensing business, QTL, and the vast majority of our patent portfolio. Qualcomm Technologies, Inc., a subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of our engineering, research and development functions, and substantially all of our products and services businesses, including our QCT semiconductor business.

Materials that are as of a specific date, including but not limited to press releases, presentations, blog posts and webcasts, may have been superseded by subsequent events or disclosures.

Nothing in these materials is an offer to sell or license any of the services or materials referenced herein.