gemini-sheet-orchestrator
v1.0.0
Published
Parallel AI prompting system using Google Sheets + Gemini API
Readme
Gemini Sheet Orchestrator
Parallel AI prompting system using Google Sheets + Gemini API.
Quick Setup (5 minutes)
1. Get Gemini API Key
- Go to Google AI Studio
- Click "Create API Key"
- Copy the key
2. Create Google Sheet
- Go to Google Sheets
- Name it "Gemini Orchestrator" (or whatever you want)
3. Add the Script
- Click Extensions > Apps Script
- Delete any existing code
- Copy/paste the contents of
Code.gs - Click Save (Ctrl+S)
4. Add API Key
- In Apps Script, click Project Settings (gear icon)
- Scroll to Script Properties
- Click Add Script Property
- Property:
GEMINI_API_KEY - Value: (paste your API key)
- Property:
- Click Save
5. Initialize
- Go back to your spreadsheet
- Refresh the page
- Click Gemini Orchestrator > Setup Sheet
- Authorize when prompted
Usage
Add Tasks
Simply type prompts in column B (Prompt). The system auto-assigns IDs and sets status to "pending".
Run Tasks
- Run All Pending: Processes all pending tasks in parallel batches
- Run Selected Rows: Only runs highlighted rows
Status Values
| Status | Meaning | |--------|---------| | pending | Ready to run | | running | Currently processing | | done | Completed successfully | | error | Failed (check Error column) | | cancelled | Manually cancelled |
Configuration
Edit the Config sheet to adjust:
- Model:
gemini-2.0-flash(fast) orgemini-1.5-pro(complex) - Max Parallel: How many requests run simultaneously (default: 5)
- Temperature: Creativity level 0-1 (default: 0.7)
- Max Tokens: Response length limit (default: 2048)
Auto-Run Mode
To automatically process new tasks:
- In Apps Script, run
setupAutoRun() - Tasks will process every 5 minutes automatically
Advanced: Task Dependencies
Add a 10th column called "Depends On" with comma-separated task IDs:
| ID | Prompt | Depends On | |----|--------|------------| | abc123 | Design the database schema | | | def456 | Write the API endpoints | abc123 | | ghi789 | Create the frontend | def456 |
Then use Gemini Orchestrator > Run With Dependencies to process in order.
Example Workflows
Code Generation Pipeline
Row 1: "Design a REST API for a todo app"
Row 2: "Write Python Flask routes for: [output from row 1]"
Row 3: "Create unit tests for: [output from row 2]"
Row 4: "Write documentation for: [output from row 2]"Content Creation
Row 1: "Generate 5 blog post ideas about AI"
Row 2: "Write outline for: [idea 1]"
Row 3: "Write outline for: [idea 2]"
Row 4: "Write full draft from: [outline 1]"Research & Analysis
Row 1: "Summarize key trends in renewable energy 2024"
Row 2: "Compare solar vs wind energy costs"
Row 3: "List top 10 companies in each sector"
Row 4: "Create investment thesis from above"Troubleshooting
"GEMINI_API_KEY not set"
- Check Project Settings > Script Properties
"Quota exceeded"
- Free tier: 60 requests/minute
- Reduce Max Parallel or add delays
"No response generated"
- Check if prompt triggered safety filters
- Try rephrasing the prompt
Cost
- Gemini Flash: Free tier generous, then ~$0.075/1M tokens
- Gemini Pro: ~$1.25/1M input, $5/1M output
For most projects, you'll stay well within free tier.
