AutomationFlowsAI & RAG › Generate English–polish Vocabulary Quizzes with Google Sheets and Groq

Generate English–polish Vocabulary Quizzes with Google Sheets and Groq

ByJanSelga @johnys-pl on n8n.io

Tool useful for any language exams. It is a chat-based workflow that uses Google Sheets in Structure English|your language that using free Groq model (Llama 3.3) generate lists of 10 words that you need to provide answer based on your while model helps Receives a chat message as…

Chat trigger trigger★★★★☆ complexityAI-powered11 nodesGroq ChatGoogle SheetsMemory Buffer WindowAgentChat Trigger
AI & RAG Trigger: Chat trigger Nodes: 11 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #16692 — we link there as the canonical source.

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "FMZXP6LsT4J8RrEI",
  "name": "Quiz generator based on excel defined data - version for sharing",
  "tags": [],
  "nodes": [
    {
      "id": "62ccb040-32f9-400e-a9c1-1c1528df7718",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2336,
        192
      ],
      "parameters": {
        "width": 480,
        "height": 864,
        "content": "## Quiz generator based on excel  defined data\n\n### How it works\n\nThis workflow generates quiz content from data defined in an Excel-like Google Sheet and user input received through chat. A chat message triggers a conditional branch that either fetches and formats spreadsheet rows or sends the message onward, then the AI agent uses the available data to produce the quiz response. The agent is supported by a Groq chat model and simple memory to maintain short conversational context.\n\n### Setup steps\n\n- Configure the chat trigger so users can send quiz-generation requests to the workflow.\n- Connect Google Sheets credentials and select the spreadsheet, sheet, and row range containing the quiz source data.\n- Verify the JavaScript code matches the column names and structure of the sheet data you want to pass to the AI agent.\n- Add Groq credentials and choose the desired chat model for the AI Agent.\n- Review the If node condition so it correctly decides when to fetch sheet data versus using the chat input directly.\n\n### Customization\n\nYou can customize the spreadsheet schema, the JavaScript row extraction logic, the If condition, and the AI Agent instructions to control quiz format, difficulty, number of questions, and output style."
      },
      "typeVersion": 1
    },
    {
      "id": "ac7251a0-b983-4b8b-88c8-9692e8c71771",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2896,
        560
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 336,
        "content": "## Receive and route chat\n\nStarts when a chat message arrives, then evaluates a condition to decide whether to fetch quiz data from the sheet or send the request directly to the AI agent."
      },
      "typeVersion": 1
    },
    {
      "id": "c2557ecf-f566-41d1-ba74-bdc7c926e195",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3408,
        -112
      ],
      "parameters": {
        "color": 7,
        "width": 432,
        "height": 688,
        "content": "## Load quiz data\n\nRetrieves rows from Google Sheets and uses JavaScript to extract or reshape the spreadsheet rows into JSON for downstream quiz generation.\n\nFor safety reasons I delted excel link, hence for workflow to work you need to:\n1. Setup connection to your google drive\n2. Provide url to your data sheets where in column A will be english words and in column B their meaning(for me it's polish)\n3. In from list you need to choose \"from list\" and choose sheet, if you cannot see it you may need to grant bigger permissions to your drive\n4. Define filters:\nSpecify range (A1  Notation) with Ranbe A1:B"
      },
      "typeVersion": 1
    },
    {
      "id": "efdd96d1-d269-41bf-be7d-d42760139a87",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3952,
        480
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 544,
        "content": "## Generate quiz response\n\nUses the prepared sheet data or routed chat input to generate the quiz response with an AI agent, backed by a Groq chat model and simple conversation memory."
      },
      "typeVersion": 1
    },
    {
      "id": "151bca2f-783b-4784-97cd-a506e246a4e4",
      "name": "Groq Chat Model AI1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        4032,
        880
      ],
      "parameters": {
        "model": "llama-3.3-70b-versatile",
        "options": {}
      },
      "credentials": {
        "groqApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "346b8dd9-b316-4fc2-bf0c-e8c3c854564b",
      "name": "Read Data from Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3504,
        400
      ],
      "parameters": {
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": ""
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.7
    },
    {
      "id": "fc4dc5a3-c0e8-4a69-8f5a-20a2f8a3659f",
      "name": "Memory Buffer Management1",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        4176,
        896
      ],
      "parameters": {
        "contextWindowLength": 10
      },
      "typeVersion": 1.4
    },
    {
      "id": "b6d793e7-8aca-4047-92b7-3024db3fc0d4",
      "name": "Define Quiz AI Agent1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        4032,
        688
      ],
      "parameters": {
        "text": "={{ $('When chat message received').item.json.chatInput }} send me list of english words and phrases you get from {{ $input.all().map(item => item.json).toJsonString() }}. Next I will be guessing what is their polish meaning from code you got. Guessing part takes place until new message will get \"Generate\" in the prompt. After correct guess present both english and polish meaning. If I guess wrong try to give me suggestion before giving me an answer. If user ask you for suggestion don't give it the answer but try to explain what the word mean. If user provide inccorect answer don't give correct answer until explicitly asked for. Don't generate new list of words untill I explicitly ask for it.\nDon't mark as answered words I guesd wrongly or those for which correct answer was asked for.\n\nAlways present list of words that were answered with proper information and those that still waits to be answered\n",
        "options": {},
        "promptType": "define"
      },
      "executeOnce": true,
      "typeVersion": 3.1
    },
    {
      "id": "e5e7fffd-3003-4dcd-aed9-82bd3fa0eb95",
      "name": "Extract Rows with JavaScript1",
      "type": "n8n-nodes-base.code",
      "position": [
        3728,
        400
      ],
      "parameters": {
        "jsCode": "// Extract JSON rows\nconst rows = $input.all().map(item => item.json);\n\n// Fisher\u2013Yates shuffle using Math.random()\nfor (let i = rows.length - 1; i > 0; i--) {\n  const j = Math.floor(Math.random() * (i + 1));\n  [rows[i], rows[j]] = [rows[j], rows[i]];\n}\n\n// Take first 10\nconst selected = rows.slice(0, 10);\n\n// Build clean pairs\nconst pairs = selected.map(row => ({\n  english: row[\"English word\"],\n  polish: row[\"Polish word\"]\n}));\n\nreturn [{ json: { random_pairs: pairs } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "c7d66c87-0f2c-4a07-a1c5-7a8cc98c4b1b",
      "name": "Check Chat Command1",
      "type": "n8n-nodes-base.if",
      "position": [
        3152,
        752
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d0fa9432-1034-43ce-ae26-1b65a05f59f0",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $json.chatInput.toLowerCase() }}",
              "rightValue": "generate"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "446d9887-bcf3-46fd-b87e-b61a8a520fd5",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        2928,
        752
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.4
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "83d412ac-2baa-4848-8821-b1c982326c7b",
  "nodeGroups": [],
  "connections": {
    "Check Chat Command1": {
      "main": [
        [
          {
            "node": "Read Data from Sheets1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Define Quiz AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model AI1": {
      "ai_languageModel": [
        [
          {
            "node": "Define Quiz AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Read Data from Sheets1": {
      "main": [
        [
          {
            "node": "Extract Rows with JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Memory Buffer Management1": {
      "ai_memory": [
        [
          {
            "node": "Define Quiz AI Agent1",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Check Chat Command1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Rows with JavaScript1": {
      "main": [
        [
          {
            "node": "Define Quiz AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Tool useful for any language exams. It is a chat-based workflow that uses Google Sheets in Structure English|your language that using free Groq model (Llama 3.3) generate lists of 10 words that you need to provide answer based on your while model helps Receives a chat message as…

Source: https://n8n.io/workflows/16692/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

teste. Uses chatTrigger, agent, lmChatGroq, memoryBufferWindow. Chat trigger; 24 nodes.

Chat Trigger, Agent, Groq Chat +7
AI & RAG

pix-zap. Uses chatTrigger, agent, toolCalculator, toolWikipedia. Chat trigger; 21 nodes.

Chat Trigger, Agent, Tool Calculator +7
AI & RAG

curso-orig. Uses chatTrigger, agent, lmChatGroq, memoryBufferWindow. Chat trigger; 21 nodes.

Chat Trigger, Agent, Groq Chat +5
AI & RAG

📌 Overview This workflow automates end-to-end appointment scheduling for your business using an AI-powered chatbot. Clients can book, reschedule, or cancel meetings through a simple chat interface — n

Chat Trigger, Agent, Groq Chat +6
AI & RAG

Case 1. Uses chatTrigger, googleSheets, agent, lmChatGroq. Chat trigger; 9 nodes.

Chat Trigger, Google Sheets, Agent +4