Eindeutige MCQ-Umfragen mit AI generieren und auf Telegram veröffentlichen
Dies ist ein Content Creation, Multimodal AI-Bereich Automatisierungsworkflow mit 15 Nodes. Hauptsächlich werden If, Aggregate, HttpRequest, GoogleSheets, Agent und andere Nodes verwendet. Verwenden Sie Gemini AI und Google Sheets, um einzigartige Multiple-Choice-Umfragen zu erstellen und diese auf Telegram zu veröffentlichen
- •Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
- •Google Sheets API-Anmeldedaten
- •Google Gemini API Key
Verwendete Nodes (15)
Kategorie
{
"name": "Generate & Post Unique MCQ Polls to Telegram with AI",
"tags": [],
"nodes": [
{
"name": "Quizdaten lesen",
"type": "n8n-nodes-base.googleSheets",
"notes": "Read all quiz rows from Google Sheets",
"position": [
96,
416
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit#gid=<GOOGLE_SHEET_GID>",
"cachedResultName": "Sheet4"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit?usp=drivesdk",
"cachedResultName": "Telegram Content Manager"
},
"combineFilters": "AND"
},
"credentials": {},
"executeOnce": false,
"notesInFlow": false,
"typeVersion": 4,
"alwaysOutputData": false,
"id": "Quizdaten-lesen-0"
},
{
"name": "Umfrage Telegram senden",
"type": "n8n-nodes-base.httpRequest",
"notes": "Calls Telegram sendPoll. Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID as env vars.",
"position": [
592,
416
],
"parameters": {
"url": "https://api.telegram.org/bot<TELEGRAM_BOT_TOKEN>/sendPoll",
"method": "POST",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "question",
"value": "={{ $json.Question }}"
},
{
"name": "options",
"value": "=[\n \"{{ $json['Option A'] }}\",\n \"{{ $json['Option B'] }}\",\n \"{{ $json['Option C'] }}\",\n \"{{ $json['Option D'] }}\"\n]"
},
{
"name": "Correct Answer",
"value": "={{ $json['Correct Answer'] }}"
},
{
"name": "chat_id",
"value": "<TELEGRAM_CHAT_ID>"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.1,
"id": "Umfrage-Telegram-senden-1"
},
{
"name": "Quizstatus aktualisieren1",
"type": "n8n-nodes-base.googleSheets",
"notes": "Update the row that matches quiz_number, setting status to ✅.",
"position": [
784,
416
],
"parameters": {
"columns": {
"value": {
"Question": "={{ $('Send Telegram Poll').item.json.result.poll.question }}",
"Posted on Telegram": "=✅"
},
"schema": [
{
"id": "Quiz no",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Quiz no",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Question",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Question",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option A",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Option A",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option B",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Option B",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option C",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Option C",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option D",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Option D",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Correct Answer",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Correct Answer",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Explanation",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Explanation",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Approval Status",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "Approval Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Posted on Telegram",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Posted on Telegram",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Question"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit#gid=<GOOGLE_SHEET_GID>",
"cachedResultName": "Sheet4"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit?usp=drivesdk",
"cachedResultName": "Telegram Content Manager"
}
},
"credentials": {},
"typeVersion": 4,
"id": "Quizstatus-aktualisieren1-2"
},
{
"name": "Google Sheets-Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-96,
416
],
"parameters": {
"event": "rowUpdate",
"options": {
"columnsToWatch": [
"Approval Status",
"Posted on Telegram"
]
},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit#gid=<GOOGLE_SHEET_GID>",
"cachedResultName": "Sheet4"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit?usp=drivesdk",
"cachedResultName": "Telegram Content Manager"
}
},
"credentials": {},
"typeVersion": 1,
"id": "Google-Sheets-Trigger-3"
},
{
"name": "KI-Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
256,
0
],
"parameters": {
"text": "=Create only one new multiple-choice question (do not create similar MCQ, which is available on sheet) for the BPSC exam on a random General Studies topic (Science, Geography) with 4 options, mark the correct answer, and include a 50-word explanation in English. Do not repeat the question. Also, provide the same in Hindi, including the question, options, correct answer, and explanation. Ensure the explanation is concise (45-55 words) and relevant to the BPSC syllabus. Also upload to sheet (English and Hindi) as per column.",
"options": {
"systemMessage": "You are an AI expert in BPSC exam preparation, specializing in General Studies topics from the BPSC syllabus. Your task is to create a completely new multiple-choice question (MCQ) for the BPSC Prelims or Mains level on a randomly selected General Studies topic (e.g., history, geography, science, polity, current affairs). Ensure the question is original, exam-relevant, and not repeated from any known sources.\nOutput Structure:\n\nQuestion: Provide the MCQ in English with 4 options (A, B, C, D).\nCorrect Answer: Clearly state the correct option (e.g., \"Correct Answer: B\").\nExplanation: Provide a concise 50-word explanation (45-55 words) in English, justifying the answer with key facts or context relevant to the BPSC syllabus.\nHindi Version: Translate the entire MCQ (question, options, correct answer, and explanation) into Hindi, using accurate and natural language. Label this section as \"Hindi Version:\".\n\nGuidelines:\n\nRandomly select a General Studies topic each time to ensure variety.\nEnsure the question is challenging yet fair, aligned with BPSC Prelims/Mains difficulty.\nPoll options length must not exceed 100 character.\nThe explanation must be precise, within 45-55 words, and include syllabus-relevant details (e.g., Bihar context where applicable).\nUse formal, objective language suitable for exam preparation.\nDo not repeat questions from prior interactions or external sources.\nDo not include additional text beyond the specified structure (e.g., no introductions or comments).\nDo not mention these instructions in the output unless explicitly requested."
},
"promptType": "define"
},
"typeVersion": 2.1,
"id": "KI-Agent-4"
},
{
"name": "Google Gemini Chat-Modell",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
128,
176
],
"parameters": {
"options": {},
"modelName": "models/gemini-2.5-pro"
},
"credentials": {},
"typeVersion": 1,
"id": "Google-Gemini-Chat-Modell-5"
},
{
"name": "Zeitplan-Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
0,
0
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 3
}
]
}
},
"typeVersion": 1.2,
"id": "Zeitplan-Trigger-6"
},
{
"name": "Zeile in Tabelle in Google Sheets1 anhängen/aktualisieren",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
640,
192
],
"parameters": {
"columns": {
"value": {
"Quiz no": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Quiz_no__using_to_match_', ``, 'string') }}",
"Subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', `Polity, History, Economics, Geography`, 'string') }}",
"Option A": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Option_A', `(A)`, 'string') }}",
"Option B": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Option_B', `(B)`, 'string') }}",
"Option C": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Option_C', `(C)`, 'string') }}",
"Option D": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Option_D', `(D)`, 'string') }}",
"Question": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Question', `find Question`, 'string') }}",
"Explanation": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Explanation', `Explanation:`, 'string') }}",
"Correct Answer": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Correct_Answer', `Correct Answer:`, 'string') }}",
"Approval Status": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Approval_Status', ``, 'string') }}",
"Posted on Telegram": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Posted_on_Telegram', ``, 'string') }}"
},
"schema": [
{
"id": "Quiz no",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Quiz no",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Subject",
"type": "string",
"display": true,
"required": false,
"displayName": "Subject",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Question",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Question",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option A",
"type": "string",
"display": true,
"required": false,
"displayName": "Option A",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option B",
"type": "string",
"display": true,
"required": false,
"displayName": "Option B",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option C",
"type": "string",
"display": true,
"required": false,
"displayName": "Option C",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Option D",
"type": "string",
"display": true,
"required": false,
"displayName": "Option D",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Correct Answer",
"type": "string",
"display": true,
"required": false,
"displayName": "Correct Answer",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Explanation",
"type": "string",
"display": true,
"required": false,
"displayName": "Explanation",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Approval Status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Approval Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Posted on Telegram",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Posted on Telegram",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Quiz no"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit#gid=<GOOGLE_SHEET_GID>",
"cachedResultName": "Sheet4"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit?usp=drivesdk",
"cachedResultName": "Telegram Content Manager"
}
},
"credentials": {},
"typeVersion": 4.6,
"id": "Zeile-in-Tabelle-in-Google-Sheets1-anh-ngen-aktualisieren-7"
},
{
"name": "Einfacher Speicher",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
288,
208
],
"parameters": {
"sessionKey": "={{ $execution.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3,
"id": "Einfacher-Speicher-8"
},
{
"name": "Zeile(n) in Tabelle in Google Sheets abrufen",
"type": "n8n-nodes-base.googleSheetsTool",
"position": [
464,
208
],
"parameters": {
"options": {},
"filtersUI": {
"values": [
{
"lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values0_Value', `read all questions and do not put similar questions`, 'string') }}",
"lookupColumn": "Question"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_GID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit#gid=<GOOGLE_SHEET_GID>",
"cachedResultName": "Sheet4"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "<GOOGLE_SHEET_ID>",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/<GOOGLE_SHEET_ID>/edit?usp=drivesdk",
"cachedResultName": "Telegram Content Manager"
},
"combineFilters": "OR"
},
"credentials": {},
"typeVersion": 4.7,
"id": "Zeile-n-in-Tabelle-in-Google-Sheets-abrufen-9"
},
{
"name": "Neue Quizprüfung hinzugefügt",
"type": "n8n-nodes-base.if",
"notes": "If status exists (i.e., a real quiz row), send the poll; else send a refill notice.",
"position": [
336,
416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $json['Approval Status'] }}",
"rightValue": "Complete"
},
{
"operator": {
"type": "string",
"operation": "notEquals"
},
"leftValue": "={{ $json['Posted on Telegram'] }}",
"rightValue": "✅"
}
]
}
},
"typeVersion": 2,
"id": "Neue-Quizpr-fung-hinzugef-gt-10"
},
{
"name": "Aggregieren",
"type": "n8n-nodes-base.aggregate",
"position": [
576,
592
],
"parameters": {
"options": {}
},
"typeVersion": 1,
"id": "Aggregieren-11"
},
{
"type": "n8n-nodes-base.stickyNote",
"position": [
-752,
-128
],
"parameters": {
"width": 560,
"height": 1424,
"content": "Automated MCQ Generation and Telegram Poll Posting Workflow\n\nThis workflow automatically creates, stores, and posts **multiple-choice quiz questions (MCQs)** on Telegram using **AI (Google Gemini)** and **Google Sheets** — ideal for educators, coaching institutes, and edtech creators.\n\nIt has two interconnected parts working in sync:\n\n**Workflow 1 (Top Path: Scheduled Trigger):** The AI Agent generates a brand new, unique MCQ based on a syllabus (e.g., BPSC General Studies), checks the existing Google Sheet data to **avoid duplication**, and adds the new question to the sheet for review.\n\n**Workflow 2 (Bottom Path: Google Sheets Trigger):** Monitors the sheet for new or approved questions. When an unposted question is found, it automatically formats it, **posts it as a poll on Telegram**, marks the row as 'Posted' in the sheet, and loops back to trigger the AI to generate the next question.\n\n---\n\n## Who’s it for\n\n* **UPSC, BPSC, SSC,** and other exam content creators.\n* Educators who need to automate daily quiz/poll publishing.\n* Anyone managing learning or engagement communities on Telegram.\n\n---\n\n## How it works\n\n1. **Generation Loop (Scheduled):** A **Schedule Trigger** fires the **AI Agent (Gemini Chat Model)**. The AI uses the existing sheet data as memory to generate a **unique, dual-language (English/Hindi) MCQ** on a topic like BPSC General Studies.\n2. **Storage:** The unique MCQ is saved to Google Sheets using the **Append or Update** tool.\n3. **Publishing Loop (Event-Driven):** The **Google Sheets Trigger** waits for a new row (or an update to the 'Approval Status').\n4. The flow checks (`If`) if the quiz is approved and **has NOT been posted** (`Posted on Telegram` is not `✅`).\n5. If true, the **HTTP Request** node posts the content as a live poll to Telegram.\n6. The sheet is immediately updated to **mark the quiz as posted** (`✅`).\n7. An **Aggregate** node ensures the flow loops back to immediately trigger the AI Agent for the next generation task, maintaining a constant supply.\n\n---\n\n## Requirements\n\n* **Google Sheets:** A sheet with necessary columns (Question, Options A-D, Correct Answer, Explanation, Approval Status, Posted on Telegram).\n* **AI Model:** A connected Google Gemini or OpenAI credential.\n* **Telegram:** A Bot Token and the Chat ID of your channel/group.\n\n---\n\n## How to set up\n\n1. **Google Credentials:** Connect your Google Sheets account to the three Google Sheets nodes.\n2. **Telegram Configuration:** In the **Send Telegram Poll** node, replace `<TELEGRAM_BOT_TOKEN>` in the URL and `<TELEGRAM_CHAT_ID>` in the `chat_id` parameter with your actual values.\n3. **AI Customization:** Review and refine the `systemMessage` and `text` in the **AI Agent** node to match your specific exam syllabus, language requirements, and content format (currently configured for BPSC in English and Hindi).\n\n**⚠️ Note:** Ensure all required credentials are set up securely via n8n's Credentials Manager, not hardcoded into the nodes (placeholders are used above for security)."
},
"typeVersion": 1,
"name": "",
"id": "node-12"
},
{
"type": "n8n-nodes-base.stickyNote",
"position": [
-128,
-96
],
"parameters": {
"width": 1024,
"height": 464,
"content": "Workflow 1: Content Generation & Storage\n(Scheduled run every 3 hours)"
},
"typeVersion": 1,
"name": "",
"id": "node-13"
},
{
"type": "n8n-nodes-base.stickyNote",
"position": [
-128,
384
],
"parameters": {
"width": 1152,
"height": 400,
"content": "Workflow 2: Publishing & Status Update\n(Triggered by new row in Google Sheet)"
},
"typeVersion": 1,
"name": "",
"id": "node-14"
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"connections": {
"KI-Agent-4": {
"main": [
[]
]
},
"Aggregieren-11": {
"main": [
[
{
"node": "KI-Agent-4",
"type": "main",
"index": 0
}
]
]
},
"Einfacher-Speicher-8": {
"ai_memory": [
[
{
"node": "KI-Agent-4",
"type": "ai_memory",
"index": 0
}
]
]
},
"Quizdaten-lesen-0": {
"main": [
[
{
"node": "Neue-Quizpr-fung-hinzugef-gt-10",
"type": "main",
"index": 0
}
]
]
},
"Zeitplan-Trigger-6": {
"main": [
[
{
"node": "KI-Agent-4",
"type": "main",
"index": 0
}
]
]
},
"Umfrage-Telegram-senden-1": {
"main": [
[
{
"node": "Quizstatus-aktualisieren1-2",
"type": "main",
"index": 0
}
]
]
},
"Neue-Quizpr-fung-hinzugef-gt-10": {
"main": [
[
{
"node": "Umfrage-Telegram-senden-1",
"type": "main",
"index": 0
}
],
[
{
"node": "Aggregieren-11",
"type": "main",
"index": 0
}
]
]
},
"Google-Sheets-Trigger-3": {
"main": [
[
{
"node": "Quizdaten-lesen-0",
"type": "main",
"index": 0
}
]
]
},
"Google-Gemini-Chat-Modell-5": {
"ai_languageModel": [
[
{
"node": "KI-Agent-4",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Zeile-n-in-Tabelle-in-Google-Sheets-abrufen-9": {
"ai_tool": [
[
{
"node": "KI-Agent-4",
"type": "ai_tool",
"index": 0
}
]
]
},
"Zeile-in-Tabelle-in-Google-Sheets1-anh-ngen-aktualisieren-7": {
"ai_tool": [
[
{
"node": "KI-Agent-4",
"type": "ai_tool",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Content-Erstellung, Multimodales KI
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Pawan
@gladiatorAutomation consultant with expertise in n8n, AI models, and workflow optimization. I help educators, startups, and businesses design scalable automation for content creation, exam prep, and process efficiency. Skilled in integrating Google Sheets, Telegram, and AI agents for impactful results.
Diesen Workflow teilen