🧠 About the Project

πŸš€ Inspiration

At Heritage Square, team members rely heavily on Google Drive to manage documents related to marketing, grants, and operations. However, finding specific files and organizing content became a challenge, especially for non-technical staff. We were inspired to build a chatbot-style AI assistant that simplifies document interaction using natural language β€” minimizing manual effort and enabling quick access to the right files.


πŸ› οΈ How We Built It

We developed a full-stack solution where users can interact with their Google Drive through natural language. Here’s how we structured it:

  • Frontend: A minimal React-based chatbot interface running on localhost for user interaction.
  • Backend: Built with FastAPI, it processes user commands and performs the corresponding actions using:

    • πŸ“ Google Drive API for listing, reading, renaming, moving, and uploading files
    • 🧠 Google Gemini API for intelligent document summarization
  • Authentication: Used Google OAuth 2.0 and Service Account credentials for secure file access.

  • Smart Command Handling: Users can give commands like:

  List my grant documents  
  Read the Heritage Proposal  
  Move Budget File to Marketing Folder  

πŸ“š What We Learned

  • How to implement Google OAuth 2.0 securely in a Python environment
  • Structuring modular FastAPI services
  • Building a seamless flow from chatbot UI β†’ backend logic β†’ external APIs
  • Handling Google Drive API edge cases like token expiration and file permissions
  • Using Gemini for contextual, human-like summaries of document content

βš™οΈ Challenges We Faced

  • Expired or revoked OAuth tokens: Solved by regenerating credentials and securely storing them
  • Import issues across modules: Fixed by cleaning up the Python project structure and adjusting import paths
  • File ID confusion for non-technical users: Replaced with filename-based search logic
  • Gemini API key handling: Integrated using environment variables and fallback logic

πŸ’‘ Future Scope

  • Add tagging and auto-categorization of files
  • Enable secure deployment to the cloud
  • Improve chatbot UX with enhanced frontend styling and loading states
  • Expand support for multiple users and multi-folder operations

Built With

Share this project:

Updates