Google Docs Import
Import Google Docs from Drive into google-in/ with manifest tracking.
⚠️ AskUserQuestion Guard
CRITICAL: After EVERY AskUserQuestion call, check if answers are empty/blank. Known Claude Code bug: outside Plan Mode, AskUserQuestion silently returns empty answers without showing UI.
If answers are empty: DO NOT proceed with assumptions. Instead:
- Output: "⚠️ Questions didn't display (known Claude Code bug outside Plan Mode)."
- Present the options as a numbered text list and ask user to reply with their choice number.
- WAIT for user reply before continuing.
Steps
- Get user email (required for MCP auth): AskUserQuestion
- Determine search:
$ARGUMENTSas query, or interactive if empty - Search docs: Use MCP tools, present numbered results, let user select
- Setup:
mkdir -p google-in - Import each doc:
- Fetch via
mcp__google-docs__get_doc_content - Sanitize filename (lowercase, hyphens, max 100 chars,
.md) - Handle duplicates (same ID → update, different ID → suffix)
- Write to
google-in/<name>.md
- Fetch via
- Update manifest:
google-in/README.mdwith table (Name, Last Import, Drive Link, File ID) - Report: file count, paths, suggest re-run for updates
See reference.md for manifest format, duplicate handling, error handling, and edge cases.
