---
project:
  pypi: https://pypi.org/project/strands-google/
  github: https://github.com/cagataycali/strands-google
  maintainer: cagataycali
service:
  name: google
  link: https://console.cloud.google.com/
title: strands-google
community: true
description: Google API integration
integrationType: tool
languages: Python
sidebar:
  label: "google"
---


[strands-google](https://github.com/cagataycali/strands-google) is a universal Google API integration tool that provides access to 200+ Google APIs (Gmail, Drive, Calendar, YouTube, Sheets, Docs, and more) directly from your Strands agent.

## Installation

```bash
pip install strands-google
```

## Usage

```python
from strands import Agent
from strands_google import use_google, gmail_send, gmail_reply

agent = Agent(tools=[use_google, gmail_send, gmail_reply])

# Send an email
agent("Send an email to friend@example.com saying hello")

# Search Gmail
agent("Find all unread emails from last week")

# List Google Drive files
agent("Show me my recent Drive files")

# List calendar events
agent("What meetings do I have today?")
```

## Key Features

- **Universal Google API Access**: Gmail, Drive, Calendar, YouTube, Sheets, Docs, and 200+ more via the Discovery API
- **Flexible Authentication**: OAuth 2.0, Service Accounts, and API Keys
- **Gmail Helpers**: Easy email sending and replying with automatic encoding
- **Dynamic Scopes**: Configure OAuth scopes on-the-fly
- **Safety Prompts**: Mutative operations require confirmation by default

## Configuration

```bash
GOOGLE_OAUTH_CREDENTIALS=~/gmail_token.json        # OAuth token path
GOOGLE_APPLICATION_CREDENTIALS=~/service-key.json   # Service account path
GOOGLE_API_KEY=your_api_key                         # API key for public APIs
GOOGLE_API_SCOPES=gmail.readonly,drive.file          # Default OAuth scopes
```

Run the authentication helper to set up OAuth:

```bash
python -m strands_google.google_auth
```

## Resources

- [PyPI Package](https://pypi.org/project/strands-google/)
- [GitHub Repository](https://github.com/cagataycali/strands-google)
- [Google Cloud Console](https://console.cloud.google.com/)
- [Google API Client Library](https://github.com/googleapis/google-api-python-client)
