🚀 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