formify-ai
v1.0.0
Published
AI-powered Google Forms auto-fill tool with realistic contextual responses using Gemini AI
Maintainers
Readme
🤖 Formify
Formify is an intelligent AI-powered tool that automatically fills and submits Google Forms with realistic, contextually consistent responses. Perfect for testing, data generation, and form automation.
✨ Features
- 🧠 AI-Powered Responses - Uses Google's Gemini AI to generate contextually accurate answers
- 🇱🇰 Realistic Data - Pre-configured with authentic Sri Lankan names, cities, and demographic data
- 🔄 Multiple Submissions - Automatically generate and submit multiple unique responses
- 🎯 Smart Form Detection - Intelligently detects all form field types (text, radio, checkbox, dropdown, etc.)
- 🔐 Persistent Authentication - One-time Google sign-in with session persistence
- ⚡ Rate Limiting - Built-in retry logic with exponential backoff for API stability
- 🎨 Beautiful CLI - Colorful terminal interface with progress indicators
- 📊 Detailed Logging - Real-time feedback on form filling progress
🚀 Quick Start
Prerequisites
- Node.js (v18.0.0 or higher)
- Google Chrome browser installed
- Google Gemini API Key - Get one here
Installation
Option 1: Using npx (Recommended - No Installation Required)
npx formify-aiOption 2: Using npm (Global Installation)
npm install -g formify-ai
formify-aiOption 3: Clone and Run
git clone https://github.com/yourusername/formify.git
cd formify
npm install
npm start📖 Usage
Run the tool:
npm startProvide the required information:
- Google Form URL
- Gemini API Key
- Number of responses to generate
First-time setup:
- The browser will open automatically
- Complete Google sign-in once (if required)
- Your session will be saved for future use
Watch the magic:
- Formify will automatically fill and submit each response
- Progress is displayed in real-time
- Results summary is shown at the end
Example Session
📝 Enter Google Form URL: https://docs.google.com/forms/d/e/your-form-id/viewform
🔑 Enter Gemini API Key: AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
🔢 How many responses to generate? 5
🚀 Starting Formify...
✓ Using model: gemini-2.0-flash
✓ Using Chrome with persistent profile
✅ Response 1: Saman Perera, 28yo, Software Engineer, Colombo
✅ Response 2: Nimesha Silva, 35yo, Doctor, Kandy
✅ Response 3: Rohan Fernando, 42yo, Teacher, Galle
✅ Response 4: Sanduni Wickramasinghe, 25yo, Designer, Negombo
✅ Response 5: Chaminda Jayawardena, 51yo, Manager, Jaffna
╔═══════════════════════════════════════╗
║ SUBMISSION COMPLETE ║
╚═══════════════════════════════════════╝
✅ Successful: 5/5
❌ Failed: 0/5🎯 Supported Form Field Types
Formify automatically detects and handles:
- ✅ Text inputs - Short answer fields
- ✅ Text areas - Paragraph/long answer fields
- ✅ Email fields - With validation
- ✅ Phone numbers - Sri Lankan format
- ✅ Numbers - Age, quantity, etc.
- ✅ Radio buttons - Single choice questions
- ✅ Checkboxes - Multiple choice questions
- ✅ Dropdowns - Selection lists
- ✅ Date fields - Calendar inputs
- ✅ Time fields - Time picker inputs
🔧 Configuration
Environment Variables
You can set default values using environment variables:
export GEMINI_API_KEY=your_api_key_here
export FORMIFY_CHROME_PATH=/path/to/chromeCustomizing Data Pools
Edit the data pools in index.js to customize generated names and locations:
const sriLankanNamePool = {
male: {
first: ['Your', 'Custom', 'Names'],
last: ['Your', 'Surnames']
},
// ... add your custom data
};
const cities = ['Your', 'Custom', 'Cities'];🛠️ How It Works
- Form Analysis - Puppeteer loads the form and extracts all questions and field types
- AI Generation - Gemini AI creates a consistent profile with contextually appropriate answers
- Form Filling - Automated browser interaction fills each field accurately
- Submission - Smart detection and clicking of submit buttons
- Verification - Confirms successful submission
- Repeat - Clears session and repeats for next response
🔐 Privacy & Security
- ✅ All data is generated by AI - no real personal information is used
- ✅ Authentication cookies are stored locally on your machine
- ✅ No data is sent to external servers (except Google Forms and Gemini API)
- ✅ Open source - inspect the code yourself!
⚠️ Important Notes
Rate Limiting
- Google Forms may have rate limits on submissions
- Built-in delays between submissions help prevent blocking
- The tool includes exponential backoff for API retries
Form Restrictions
- Some forms allow only one response per account
- Some forms require specific authentication
- The tool will notify you if it encounters these restrictions
API Costs
- Gemini API has free tier limits
- Monitor your usage at Google AI Studio
🐛 Troubleshooting
"Invalid API Key" Error
- Verify your API key starts with
AIzaSy - Generate a new key at https://aistudio.google.com/app/apikey
- Ensure the key has access to Gemini models
Chrome Not Found
- Install Google Chrome browser
- Or set the path manually using
FORMIFY_CHROME_PATH
Submit Button Not Found
- Check if the form has a custom submit button
- Review the debug screenshot in the temp directory
- Some forms may need manual submission
Form Already Submitted
- Clear browser cookies
- Use a different Google account
- Check if the form allows multiple submissions
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
⭐ Star History
If you find this project useful, please consider giving it a star! ⭐
📧 Contact
For questions, suggestions, or issues:
- Open an issue on GitHub
- Email: [email protected]
🙏 Acknowledgments
- Built with Puppeteer for browser automation
- Powered by Google Gemini AI
- CLI styling with Chalk and Ora
🗺️ Roadmap
- [ ] Support for more countries and locales
- [ ] GUI interface option
- [ ] Custom AI prompt templates
- [ ] Export generated data to CSV
- [ ] Form response analytics
- [ ] Multi-language support
- [ ] Cloud deployment option
Disclaimer: This tool is for educational and testing purposes only. Always respect form creators' terms of service and use responsibly. Do not use this tool for spam, abuse, or any malicious purposes.
