π Real-time AI-powered Google Forms automation with Flutter web interface, WebSocket communication, and intelligent Gemini LLM integration.
πΉ Watch Demo Video β See the AI form filler in action!
- π§ Smart AI Answers β Gemini 2.5 Flash generates contextual responses
- π Real-time Updates β Live progress via WebSocket communication
- οΏ½ Modern Web UI β Beautiful Flutter web interface
- β‘ Instant Feedback β Approve, reject, or improve AI answers
- π― Auto-submission β One-click approval fills and submits forms
- π Persistent Chrome β Maintains login sessions across runs
graph TB
subgraph "Frontend"
F[Flutter Web App<br/>Real-time UI]
end
subgraph "Backend"
API[FastAPI Server<br/>WebSocket + REST]
WS[WebSocket Manager<br/>Connection Handler]
LLM[Gemini LLM<br/>Answer Generation]
WORK[LangGraph Workflow<br/>State Management]
end
subgraph "Browser Automation"
CHROME[Chrome Browser<br/>Playwright Control]
FORM[Google Form<br/>Auto-fill & Submit]
end
F <==>|WebSocket| WS
WS --> API
API --> LLM
API --> WORK
API --> CHROME
CHROME --> FORM
style F fill:#02569B,stroke:#fff,stroke-width:2px,color:#fff
style API fill:#009688,stroke:#fff,stroke-width:2px,color:#fff
style LLM fill:#4285F4,stroke:#fff,stroke-width:2px,color:#fff
style CHROME fill:#34A853,stroke:#fff,stroke-width:2px,color:#fff
graph TD
A[Start] --> B[Launch Chrome Browser]
B --> C[Navigate to Google Form]
C --> D[Parse Form Questions]
D --> E[Generate AI Answers with Gemini]
E --> F{User Review}
F -->|Approve| G[Fill Form Fields]
F -->|Reject| H[Regenerate with Feedback]
H --> E
G --> I[Auto-Submit Form]
I --> J[Verify Submission]
J --> K[Complete]
style E fill:#4285F4,stroke:#fff,stroke-width:2px,color:#fff
style F fill:#EA4335,stroke:#fff,stroke-width:2px,color:#fff
style G fill:#34A853,stroke:#fff,stroke-width:2px,color:#fff
style I fill:#FBBC04,stroke:#fff,stroke-width:2px,color:#333
# Clone repository
git clone <your-repo-url>
cd google-form
# Install Python dependencies
pip install fastapi uvicorn playwright langchain-google-genai langgraph python-dotenv pydantic websockets
# Install Playwright browser
playwright install chromium
# Setup Flutter (for UI)
cd google_form
flutter pub getCreate .env file:
GEMINI_API_KEY=your_gemini_api_key_here# 1. Start FastAPI server
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000
# 2. Start Flutter web (new terminal)
cd google_form
flutter run -d web-server --web-port 3000π Access: Open http://localhost:3000 in your browser
- π― Start Process β Click "Start AI Form Filling" button
- π Watch Progress β Real-time status updates as Chrome opens and form loads
- π§ AI Generation β Gemini analyzes questions and generates smart answers
- β Review & Approve β Check answers, provide feedback if needed
- π Auto-submit β Single approval fills and submits the entire form
- π Done! β Confirmation of successful submission
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | Flutter Web | Modern reactive UI |
| Backend | FastAPI + WebSocket | Real-time API server |
| AI | Google Gemini 2.5 | Smart answer generation |
| Workflow | LangGraph | State management |
| Automation | Playwright | Browser control |
| Validation | Pydantic | Type safety |
β Text inputs β’ β Email fields β’ β Textareas β’ β Radio buttons β’ β Checkboxes β’ β Dropdowns
google-form/
βββ main.py # FastAPI WebSocket server
βββ fill.py # LangGraph workflow logic
βββ form_utils.py # Reusable form automation
βββ ws_manager.py # WebSocket connection manager
βββ initialize_llm.py # Gemini LLM setup
βββ prompt.py # AI prompts & user data
βββ google_form/ # Flutter web app
βββ lib/ # Flat file structure
βββ main.dart # Flutter entry point
βββ workflow_provider.dart
βββ websocket_service.dart
βββ form_models.dart
βββ *.dart # UI components
π User Details: Edit personal information in prompt.py
π Form URL: Update target form URL in main.py
π¨ UI Styling: Modify Flutter components in google_form/lib/
π§ AI Prompts: Enhance LLM instructions in prompt.py and fill.py
π Built with β€οΈ using Flutter, FastAPI, and Google Gemini AI
Real-time β’ Intelligent β’ Automated