This application automatically submits data to multiple Google Forms at scheduled intervals. It runs in a Docker container and can be configured to submit different data to different forms at regular intervals (default: every 5 hours).
- 🕒 Automatically submits to Google Forms at specified intervals
- 📝 Supports multiple forms with different data
- 🔄 Configurable submission schedule (using cron syntax)
- 🎲 Optional randomization of submission times
- 📊 Logs all submission attempts
- 🔍 Includes a form inspector tool to help identify form field IDs
- 🐳 Runs in a Docker container for easy deployment
- Docker and Docker Compose
- Google Form URLs that you want to submit to
- Clone or download this repository
- Configure your form URLs and submission data in the
.envfile - Build and run the Docker container
Edit the .env file with your Google Form URLs and the data you want to submit:
# Google Form URLs (comma-separated list of form URLs)
GOOGLE_FORM_URLS=https://docs.google.com/forms/d/e/YOUR_FORM_ID_1/formResponse,https://docs.google.com/forms/d/e/YOUR_FORM_ID_2/formResponse
# Schedule (in cron format, default is every 5 hours)
SCHEDULE="0 */5 * * *"
# Submission Data (JSON format)
FORM_1_DATA={"entry.123456":"John Doe","entry.789012":"johndoe@example.com"}
FORM_2_DATA={"entry.345678":"Jane Smith","entry.901234":"janesmith@example.com"}
# Randomize submissions slightly (true/false)
RANDOMIZE_SUBMISSIONS=true
# Log submissions to file (true/false)
LOG_SUBMISSIONS=trueTo find the correct field IDs for your Google Form:
- Run the form inspector tool:
npm run inspect
- Enter your Google Form URL when prompted
- The tool will display all form field IDs and provide an example configuration
Alternatively, you can:
- Open your Google Form in a browser
- Right-click and select "View Page Source"
- Search for "entry." in the page source
- Note the entry IDs (e.g., "entry.123456")
# Build and start the container
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the container
docker-compose down# Build the Docker image
docker build -t googleform-auto-submitter .
# Run the container
docker run -d --name googleform-submitter -v $(pwd)/logs:/usr/src/app/logs -v $(pwd)/.env:/usr/src/app/.env googleform-auto-submitter
# Submit forms immediately (for testing)
docker run --rm -v $(pwd)/.env:/usr/src/app/.env googleform-auto-submitter npm run submit# Install dependencies
npm install
# Start the scheduler
npm start
# Submit forms immediately (for testing)
npm run submit
# Run the form inspector
npm run inspectSubmission logs are stored in the logs directory, with one file per day. Each log entry includes:
- Timestamp
- Form number
- Success/failure status
- HTTP status code
- Any error messages
The default schedule is every 5 hours. You can customize it using cron syntax:
0 */5 * * *- Every 5 hours0 8,12,17 * * *- At 8am, 12pm, and 5pm every day0 9 * * 1-5- At 9am on weekdays
All configuration is done via environment variables in the .env file.
- Form submission fails: Check if the form URLs are correct and end with
/formResponse - Wrong form data: Use the form inspector to verify the correct field IDs
- Container exits unexpectedly: Check the logs for error messages
This tool is intended for legitimate use cases. Please ensure you have permission to submit data to the forms in question and comply with all applicable laws and terms of service.
ISC