feat: add Google Docs integration for Addie#685
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
New files:
server/src/addie/mcp/google-docs.ts- Google Docs API integration with OAuth2 token managementscripts/google-oauth-setup.ts- One-time OAuth setup script for initial credential configurationscripts/test-google-docs.ts- Test script for local developmentModified files:
server/src/addie/bolt-app.ts- Register Google Docs tools with Addieserver/src/addie/services/community-articles.ts- Allow Google Docs URLs to be indexedserver/src/addie/services/content-curator.ts- Fetch Google Docs content via APIPrerequisites
Requires Google OAuth credentials set in environment:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETGOOGLE_REFRESH_TOKENTest plan
🤖 Generated with Claude Code