How to Connect Your Google Account to Hermes: Email, Calendar & Drive Setup Guide
AI Automation

How to Connect Your Google Account to Hermes: Email, Calendar & Drive Setup Guide

Jay
By Jay
CTO
Updated: ·· 12 min read

Let's be honest. Nobody wakes up thinking "I want to spend 40 minutes switching between Gmail, Google Calendar, and Google Drive just to keep my day organized." You wake up thinking "I have 47 unread emails, a meeting in 20 minutes, and a document I can't find." The cognitive tax of context-switching between Google services is real, and it's the kind of thing AI agents were built to solve.

Hermes Agent, the open-source AI agent framework from Nous Research, can manage your Gmail, Google Calendar, and Google Drive directly from a terminal, Telegram, Discord, or any other connected platform. But before it can sort your inbox or schedule your meetings, you need to wire it up. This guide walks you through the entire process: from creating a Google Cloud project to sending your first email with nothing but a sentence of natural language.

What You'll Be Able to Do

Once connected, Hermes can:

  • Search and read emails: "Show me unread emails from my boss in the last 2 days"
  • Send and reply to messages: "Reply to that thread and say I'll have the report by Friday"
  • List and create calendar events: "What's on my calendar tomorrow?" or "Schedule a 30-minute standup at 10am"
  • Search, upload, and download Drive files: "Find the Q4 budget spreadsheet and download it"
  • Share files and manage folders: "Share this report with alice@company.com as read-only"

And all of it from a single chat interface. No browser tabs. No app-switching. Just plain English (or whatever language you prefer).

Prerequisites

Before diving in, make sure you have:

  • Hermes installed. If not, run the installer from the Hermes Agent docs:

    curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

    Or on Windows: pip install hermes-agent

  • A Google account. Personal or Workspace (Workspace admins may need to allowlist the OAuth client; we'll cover that too)

  • About 10 minutes. Most of this is one-time setup. You'll never need to do it again.

Step 1: Create a Google Cloud Project

First, you need a Google Cloud project to host the OAuth credentials Hermes will use.

  1. Go to Google Cloud Console
  2. Click Create Project (or select an existing one)
  3. Give it a name; something like "Hermes Agent" works fine
  4. Note the project ID; you'll need it later

Workspace users: If your organization restricts project creation, ask your admin to create one for you. The project doesn't need billing enabled; all the APIs we're using are free.

Step 2: Enable the Required APIs

Hermes needs specific Google APIs enabled on your project. Think of this as flipping switches. Until they're on, Hermes can't talk to those services.

Head to the API Library and enable each of these:

APIWhat It Powers
Gmail APIReading, sending, replying to emails; managing labels
Google Calendar APIListing, creating, and deleting calendar events
Google Drive APISearching, uploading, downloading, and sharing files
People APIAccessing contacts (used for autocomplete when sending emails)

Optional but useful:

APIWhat It Powers
Google Sheets APIReading and writing spreadsheet data
Google Docs APIReading, creating, and editing documents

To enable each one: search for the API name, click into it, and hit the Enable button. Takes about 10 seconds per API. If you see a "Billing required" prompt for any of these, don't worry; they're still free for personal use within generous quotas.

Step 3: Create OAuth 2.0 Credentials

Now for the credentials that Hermes will use to authenticate.

  1. Go to Credentials in your project
  2. Click Create CredentialsOAuth 2.0 Client ID
  3. If prompted to configure a consent screen first, do that:
    • Choose External (or Internal if you're on Workspace and only want org users)
    • Fill in the app name ("Hermes Agent"), your email, and the developer contact
    • On the Scopes page, just click Save and Continue; Hermes handles scopes automatically
  4. Back at the OAuth client creation screen:
    • Application type: Desktop app
    • Name: "Hermes Agent CLI" (or anything descriptive)
    • Click Create
  5. Download the JSON file; it'll be named something like client_secret_XXXXX.json

If your app is still in "Testing" mode (not yet published), you'll need to add your Google account as a test user. Go to Audience → Test users → Add Users. This is the most common "403 access_denied" fix; bookmark it.

Keep that JSON file somewhere you can find it. You'll need it for the next step.

Step 4: Connect Hermes to Your Google Account

Here's the part that surprises most people: you don't need to touch a terminal or memorize any commands. You just talk to Hermes like you'd talk to a colleague.

Open Hermes (in your terminal, Discord, Telegram, or wherever you use it) and say:

"Connect my Google account for Gmail, Calendar, and Google Drive."

Hermes will respond by asking a couple of quick questions:

  • Which services do you need? Tell it "email, calendar, and drive" (or whatever combination you want).
  • Where is your OAuth credentials file? Point it to the JSON file you downloaded in Step 3.

Once you provide the file path, Hermes generates an authorization link and sends it to you. Click it. Here's what happens:

  1. Google asks which account you want to use; pick yours
  2. You'll see a consent screen listing the permissions Hermes is requesting; approve them
  3. Your browser tries to redirect to http://localhost:1. This will fail, and that's expected.

Don't worry about the error page. Copy the entire URL from your browser's address bar and paste it back to Hermes:

"Here's the URL after approving: http://localhost:1/?code=4/0Aan..."

Hermes handles the rest. Within seconds you'll get:

"Done. Your Google account is connected and the token will auto-refresh."

That's it. No environment variables. No config files. Behind the scenes Hermes runs the OAuth PKCE flow, exchanges the authorization code, and saves an auto-refreshing token at ~/.hermes/google_token.json. You never have to log in again unless you explicitly revoke access.

Troubleshooting the Auth Flow

ProblemLikely Fix
403: access_deniedYou're not a test user. Go to Audience and add your email
"Token expired" or code already usedJust tell Hermes "the auth code expired" and it'll generate a fresh link for you
"API not enabled"You skipped Step 2. Head back to the API Library
Advanced Protection usersYour Workspace admin must allowlist the OAuth client ID under Security → API Controls

Step 5: Start Using Google Services Through Natural Language

With the connection established, you control your Google services by simply telling Hermes what you need. No CLI flags, no API syntax, no JSON. Here's what that looks like in practice.

Gmail: Email, Handled Conversationally

You say...Hermes does...
"Show me my unread emails"Searches Gmail, returns a list with sender, subject, and snippet
"Find emails from Priya about the Q3 report"Filters by sender and keyword, returns matching threads
"Read the latest email from the design team"Retrieves the full message body and displays it
"Reply and say the mockups look great, I'll send feedback by Friday"Replies to the thread with your message, confirms it was sent
"Send an email to jay@company.com saying the deployment is live"Composes and sends the email, returns a confirmation

The key insight: Hermes understands context. After you ask it to "show unread emails," you can follow up with "reply to the second one" without restating the thread. It remembers.

Google Calendar: Your Schedule, in Plain English

You say...Hermes does...
"What's on my calendar tomorrow?"Lists all tomorrow's events with times and links
"Schedule a 30-minute standup at 10am with the dev team"Creates the event, sets the timezone, adds attendees, confirms
"Do I have any meetings this afternoon?"Checks your calendar for the afternoon window and reports
"Cancel my 3pm meeting on Thursday"Finds and deletes the event, asks for confirmation first
"Move my 2pm to 4pm"Updates the event time, keeps everything else intact

Google Drive: Files Without the File Manager

You say...Hermes does...
"Find the Q4 budget spreadsheet"Searches Drive, returns matching files with links
"Upload my presentation to the Client Deliverables folder"Uploads the file to the right folder, confirms the location
"Download the latest invoice from the Finance folder"Finds and downloads the file to your local machine
"Share the proposal PDF with alice@company.com as read-only"Sets the sharing permission and notifies Alice
"Create a folder called 2026 Project Files"Creates the folder in Drive and returns the link

Chain It Together

Here's what makes this genuinely powerful: Hermes can string multiple operations into one flow. Try something like:

"Check my email for any messages from the client about the contract. If there's one, download the latest draft from Drive, update the dates, and send it back as a reply."

Hermes searches Gmail, finds the thread, pulls the attachment from Drive, applies your changes, and replies to the email. All in one conversation. No tab-switching, no copy-pasting, no "wait, which folder was that in?"

Step 6 (Bonus): Google Search Console Integration

If you publish content online (blog posts, landing pages, documentation), you'll want to know how it's performing in search results. Hermes can connect to Google Search Console and bring that data to you.

One-Time Setup

First, enable the Search Console API:

  1. Go to the API Library
  2. Search for Google Search Console API and click Enable

Then tell Hermes:

"Add Search Console access to my Google connection."

If your existing OAuth token doesn't include the Search Console scope, Hermes will revoke the old token and walk you through re-authorization with the expanded permissions. Same flow as Step 4: click the link, approve, paste the redirect URL.

What You Can Ask

Once connected, try prompts like:

You say...Hermes does...
"How is my blog performing in search?"Pulls clicks, impressions, CTR, and average position for your top pages
"Which queries are driving the most traffic?"Lists the search terms sending visitors to your site
"Show me pages that dropped in rankings this week"Identifies pages with declining positions, flags potential issues
"Compare this month's search traffic to last month"Generates a trend comparison with percentage changes

Step 7: Automate Everything with Cron Jobs

Here's where the whole setup graduates from "convenient" to "transformative." Hermes has a built-in cron scheduler that can run tasks on any schedule you define, using the exact same natural language prompts you'd type yourself.

In practice, this means your Google services start working for you while you sleep. No coding required. Just tell Hermes what you want and when.

Real-World Cron Job Use Cases

Morning Briefing (daily at 8am)

"Every weekday at 8am, check my unread emails from overnight, summarize them in 3 bullet points, list my calendar events for the day, and send it all to me on Telegram."

Hermes sets up a cron job. Every morning you wake up to a single message: the emails that matter, the meetings you have, and nothing else. No inbox scrolling before coffee.

Weekly Search Performance Report (every Monday at 9am)

"Every Monday morning, pull my Search Console data for the last 7 days, show me which blog posts gained and lost the most traffic, and recommend one page that needs a content update based on declining rankings."

Instead of remembering to check Search Console (which you won't), you get a prioritized action item delivered on schedule. One page to fix. One concrete recommendation.

File Cleanup Reminder (every Friday at 4pm)

"Every Friday afternoon, check my Drive for files that haven't been modified in 6 months and ask me if I want to archive them."

Your Drive stays lean without you ever thinking about it.

Invoice Watcher (every 2 hours)

"Check my email every 2 hours for messages with 'invoice' in the subject from vendors. If any arrive, download the attachment to my Invoices folder and reply acknowledging receipt."

An accounts-payable workflow that runs itself. The email arrives, the file gets saved, the vendor gets a confirmation. You don't lift a finger.

Calendar Conflict Guard (instant, on event creation)

"When I try to schedule a meeting that overlaps with an existing event, warn me and suggest the closest available slot."

Hermes checks your calendar in real time and prevents double-booking before it happens.

How to Set One Up

Just describe the job and the schedule. Hermes handles the cron expression, the delivery channel, and the retry logic:

"Set up a daily job at 9am that checks my calendar for the day and sends me a summary on Discord."

That's it. The job runs on schedule, every day, until you tell it to stop. You can ask Hermes to list your active cron jobs, pause one, tweak its schedule, or remove it entirely. All through conversation.

The difference between "I should automate that someday" and "it's been running for three months" is about 30 seconds and one sentence.

A Note on Permissions and Security

You might be wondering: "Am I giving an AI agent unrestricted access to my entire Google account?"

No. Hermes uses OAuth 2.0, which means:

  • Granular scopes. You choose which services to authorize. If you only want Gmail access, only authorize Gmail. The token can't touch your Drive or Calendar.
  • Desktop app OAuth. The credentials stay on your machine. No server-side proxy, no third party seeing your tokens.
  • Auto-refresh, revocable anytime. Tokens refresh automatically, and you can revoke access instantly from your Google Account permissions page.
  • Confirmation gates. Hermes won't send emails, delete files, or create calendar events without asking you first. Destructive actions require explicit approval.

The google_token.json file lives on your local machine at ~/.hermes/. It never leaves your filesystem.

What If Something Goes Wrong?

Google OAuth has a few sharp edges. Here's a quick reference for the most common issues:

  • "API not enabled." You skipped Step 2. Go enable the specific API that's failing.
  • "Insufficient Permission." You authorized with fewer services than what you're trying to use. Tell Hermes "reconnect my Google account with full access" and re-authorize.
  • Token stopped refreshing. Delete ~/.hermes/google_token.json and re-do Step 4.
  • Workspace admin blocks it. Your organization may restrict third-party OAuth apps. Talk to your admin about allowlisting the client ID.

The Bigger Picture

Connecting Google services to Hermes isn't just about saving a few clicks. It's about collapsing the distance between thinking about a task and executing it. When you can say "Forward the latest invoice to accounting and cc my manager" and have it happen in seconds, the friction of email goes away. When you can ask "Do I have any meetings tomorrow afternoon?" without opening a calendar, scheduling becomes ambient.

And that's before you start chaining these together with Hermes's cron scheduler, multi-agent delegation, and cross-platform delivery. Imagine a morning briefing that arrives on Telegram at 9am: unread emails summarized, today's calendar events listed, and yesterday's Search Console data parsed, all generated by a single scheduled job.

That's not science fiction. That's a cron expression.


Ready to stop context-switching between a dozen browser tabs? Whether you need Gmail automation, calendar management, or a full Google Workspace integration with your existing workflows, talk to our team. We build AI agents that handle the busywork so you can focus on the work that actually moves the needle.

So here's the question worth sitting with: what would you build if checking email felt like talking to a colleague instead of managing a queue?


Remain Ahead of the Curve

Stay upto date with the latest Technologies, Trends, Artificial Intelligence, Productivity Tips and more.

No spam. You can unsubscribe at any time.

Share

Ready to accelerate
your growth?

Discover how Vistaran's tailored solutions can streamline your operations and scale your business. Talk to our experts for a personalized technical consultation.

Contact Sales