Generate academic assignments with Google Gemini & deliver via Telegram/PDF
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (11)
- Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent - Telegram Trigger
n8n-nodes-base.telegramTrigger - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Wait
n8n-nodes-base.wait - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - Telegram
n8n-nodes-base.telegram - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets
What it does
AI-Powered Academic Assignment Generator This n8n workflow template automates the complete academic assignment generation process from student queries to professional document delivery. Students submit assignment requests via Telegram, and the workflow generates comprehensive, plagiarism-free academic content using Google Gemini AI, formats it into professional PDF documents, and delivers downloadable links while maintaining complete records. What does this workflow do? - 📱 Telegram Integration: Receives structured assignment requests from students - 🤖 AI Content Generation: Creates comprehensive academic answers (500+ words per question) - 📄 Professional Formatting: Generates university-standard HTML/PDF documents - ☁️ Cloud Storage: Automatically stores files in organized Google Drive folders - 📊 Record Keeping: Maintains complete assignment database in Google Sheets - 🔄 End-to-End Automation: Complete pipeline from query to document delivery How it works The workflow processes student assignment requests through 16 interconnected nodes, handling everything from input parsing to final document delivery: Input → AI Processing → Document Generation → Storage & Delivery Setup Requirements Credentials needed: - Telegram Bot Token (for receiving/sending messages) - Google Gemini API Key (for AI content generation) - Google Sheets API (for record keeping) - Google Drive API (for file storage) - PDFCrowd API (for PDF conversion) Pre-setup steps: 1. Create a Telegram bot and obtain the bot token 2. Set up Google Drive folder structure for file organization 3. Create Google Sheets template with proper column headers 4. Configure API rate limits and usage quotas Workflow Breakdown 🔌 Input Processing Nodes Student Query Intake Bot (Telegram Trigger) Student Query Intake Bot (Telegram Trigger) - Listens for incoming student messages with assignment details - Monitors specific chat ID for authorized users - Triggers workflow when structured assignment requests are received Structured Data Parser (Code Node) - Extracts student information using regex patterns - Parses: Name, Faculty, Department, Level, Course, Registration Number - Automatically sets current date and handles missing data - Outputs clean JSON structure for AI processing 🤖 AI Processing Nodes Student Assignment Auto-Composer (LangChain Agent) - Main AI orchestrator for assignment generation - Uses structured prompts for consistent academic formatting - Generates 500-word answers per question with APA citations - Ensures plagiarism-free, original academic content Generator Model (Google Gemini Chat) - Primary AI model for high-quality content generation - Handles complex academic writing and formatting requirements Fallback Model Generator (Google Gemini - Gemma) - Backup AI model ensuring workflow reliability - Activates when primary model encounters issues Structured Output Parser (LangChain) - Validates AI-generated content against JSON schema - Enforces required field compliance and format consistency - Auto-fixes common formatting issues 🔧 Processing & Error Handling Error Handler (Code Node) - Handles text processing errors and data type issues - Converts non-string values and provides error recovery - Ensures workflow continuity even with problematic data Wait Node - Introduces strategic 2-second delay for processing stability - Allows AI processing to complete before next steps 📊 Data Management Nodes Edit Fields (Set Node) - Maps AI output to Google Sheets column structure - Ensures data consistency for database storage Long Essay Record Sheet (Google Sheets) - Stores complete assignment records with metadata - Maintains comprehensive student assignment database - Uses Name field as unique identifier for record updates 📄 Document Generation Nodes Static HTML Builder (LangChain Agent) - Converts structured data into professional HTML documents - Applies academic formatting: Times New Roman, 12pt, double-spaced - Creates university-standard document structur