Skip to content

feat: add Google Docs integration for Addie#685

Merged
bokelley merged 4 commits into
mainfrom
bokelley/addie-google-docs
Jan 10, 2026
Merged

feat: add Google Docs integration for Addie#685
bokelley merged 4 commits into
mainfrom
bokelley/addie-google-docs

Conversation

@bokelley

@bokelley bokelley commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds ability for Addie to read Google Docs, Sheets, and Drive files shared with her Google account
  • When access is denied, Addie asks the user to share the document with addie@agenticadvertising.org
  • Google Docs shared in public channels are now indexed by the content curator

Changes

New files:

  • server/src/addie/mcp/google-docs.ts - Google Docs API integration with OAuth2 token management
  • scripts/google-oauth-setup.ts - One-time OAuth setup script for initial credential configuration
  • scripts/test-google-docs.ts - Test script for local development

Modified files:

  • server/src/addie/bolt-app.ts - Register Google Docs tools with Addie
  • server/src/addie/services/community-articles.ts - Allow Google Docs URLs to be indexed
  • server/src/addie/services/content-curator.ts - Fetch Google Docs content via API

Prerequisites

Requires Google OAuth credentials set in environment:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GOOGLE_REFRESH_TOKEN

Test plan

  • Run OAuth setup script to get credentials
  • Share a Google Doc with addie@agenticadvertising.org
  • Send the doc link to Addie in Slack and verify she can read it
  • Test access-denied flow with an unshared doc
  • Verify Google Docs shared in public channels get indexed

🤖 Generated with Claude Code

bokelley and others added 4 commits January 9, 2026 11:59
Allows Addie to read Google Docs, Sheets, and Drive files shared with her
Google account. When access is denied, Addie asks the user to share the
document with addie@agenticadvertising.org.

Key changes:
- New google-docs.ts module with OAuth2 token management
- read_google_doc tool for Addie to fetch document content
- Content curator now indexes Google Docs shared in public channels
- OAuth setup script for initial credential configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The test script was failing because existing GOOGLE_CLIENT_ID and
GOOGLE_CLIENT_SECRET values in the shell environment were not being
overwritten by dotenv. Using override: true and dynamic import ensures
the correct credentials from .env.local are used.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This change adds Google Docs reading capability to Addie without
affecting the protocol schemas.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Log docId instead of full URL to avoid exposing sensitive document info
- Add document ID validation with regex pattern for better security
- Export error prefix constants for reliable error detection in content-curator
- Use exported constants instead of hardcoded strings for error checking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit d744c53 into main Jan 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant