Google Workspace Setupのロゴ

Google Workspace Setup

コミュニティ
adityahimaone
google-workspace-setup

Properly set up Google Workspace OAuth2 authentication for Hermes agent, handling Python environment and module dependencies.

概要

公開者adityahimaone
リポジトリhermes-agent-rtk-caveman
スキル名google-workspace-setup
スター
84
フォーク
4
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    adityahimaoneがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルGoogle Workspace SetupをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/adityahimaone/hermes-agent-rtk-caveman/tree/main/skills/productivity/google-workspace-setup
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adityahimaone/hermes-agent-rtk-caveman.git /tmp/hermes-agent-rtk-caveman
mkdir -p .claude/skills
cp -r /tmp/hermes-agent-rtk-caveman/skills/productivity/google-workspace-setup .claude/skills/google-workspace-setup
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGoogle Workspace Setupを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にGoogle Workspace Setupを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Google Workspace Setupは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Google Workspace Setup Skill

This skill provides a reliable method to set up Google Workspace OAuth2 authentication for the Hermes agent, addressing common issues with Python module imports and environment configuration.

Problem

The standard Google Workspace setup script (setup.py) fails with ModuleNotFoundError: No module named 'hermes_constants' when run directly because:

  1. The script depends on Hermes internal modules
  2. It needs to be run from the Hermes agent directory with proper Python path
  3. Virtual environment activation is required for dependencies

Solution

Always activate the Hermes virtual environment and run the setup script from the hermes-agent directory.

Prerequisites

  • Google OAuth2 client secret JSON file (from Google Cloud Console)
  • Hermes agent installed and accessible

Steps

Step 1: Prepare OAuth Credentials

  1. Go to https://console.cloud.google.com/apis/credentials
  2. Create/select a project
  3. Enable required APIs: Gmail, Calendar, Drive, Sheets, Docs, People API
  4. Create OAuth 2.0 Client ID (Desktop app type)
  5. Download the JSON file

Step 2: Copy Credentials to Hermes Directory

bash
# Copy your downloaded client secret to Hermes Google Workspace skill directory
cp /path/to/downloaded/client_secret_*.json ~/.hermes/skills/productivity/google-workspace/google_client_secret.json

Step 3: Run Setup with Proper Environment

bash
# Change to Hermes agent directory and activate virtual environment
cd ~/.hermes/hermes-agent
source venv/bin/activate

# Run the setup script with your client secret
python ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --client-secret ~/.hermes/skills/productivity/google-workspace/google_client_secret.json

# You should see: "OK: Client secret saved to /Users/yourname/.hermes/google_client_secret.json"

Step 4: Get Authorization URL

bash
# Still in the same terminal session (venv activated, in hermes-agent directory)
python ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --auth-url

# Copy the entire URL output and open it in your browser

Step 5: Complete Authorization

  1. Open the URL from Step 4 in your browser
  2. Sign in with your Google account
  3. Grant the requested permissions
  4. After redirection (may show an error page - this is normal), copy the ENTIRE URL from the browser's address bar

Step 6: Exchange Authorization Code

bash
# Still in the same terminal session
python ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --auth-code "PASTE_THE_ENTIRE_URL_FROM_STEP_5_HERE"

# You should see: "OK: Token saved to /Users/yourname/.hermes/google_token.json"

Step 7: Verify Authentication

bash
# Still in the same terminal session
python ~/.hermes/skills/productivity/google-workspace/scripts/setup.py --check

# Should output: "AUTHENTICATED"

Verification

After successful setup, you can test Google Workspace access:

bash
# Test Gmail access
python ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail search "is:unread" --max 5

# Test Calendar access
python ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py calendar list

Notes

  • Must maintain same terminal session: Steps 3-7 need to be run in the same terminal session where the venv is activated and you're in the hermes-agent directory
  • Token storage: The OAuth token is saved automatically to ~/.hermes/google_token.json and refreshes automatically
  • Re-authentication: To revoke and restart, use --revoke flag then repeat from Step 3
  • Troubleshooting:
    • If you get ModuleNotFoundError again, you likely left the hermes-agent directory or deactivated the venv
    • If you get permission errors, ensure you enabled all required APIs in Google Cloud Console
    • For Advanced Protection accounts, your Workspace admin needs to allowlist the OAuth client ID

Integration with Market Alpha Scout

Once Google Workspace is authenticated, the market_alpha_scout skill can successfully:

  1. Authenticate to stockbro.id via Google Workspace
  2. Scrape Daily Hot Stocks and Broker Summary data
  3. Combine with Google-based sentiment analysis for stock picks

Error Handling

Common errors and solutions:

  • ModuleNotFoundError: No module named 'hermes_constants' → Not in hermes-agent directory or venv not activated
  • FileNotFoundError for client secret → Check file path and permissions
  • invalid_grant → Token expired, redo authorization flow
  • 403: Insufficient Permission → Missing API scopes, redo OAuth flow with all required APIs enabled

よくある質問

AIスキル「Google Workspace Setup」では何ができますか?

Properly set up Google Workspace OAuth2 authentication for Hermes agent, handling Python environment and module dependencies.

TypingMindでGoogle Workspace Setupを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Google Workspace Setupはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGoogle Workspace Setupをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/adityahimaone/hermes-agent-rtk-caveman/tree/main/skills/productivity/google-workspace-setupを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Google Workspace Setupを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Google Workspace Setupは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGoogle Workspace Setupを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Google Workspace Setup」は無料ですか?

adityahimaoneがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇