This workflow corresponds to n8n.io template #3649 — we link there as the canonical source.
This workflow follows the WhatsApp → WhatsApp 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 →
{
"id": "QTuJfyY6vm7iEIH6",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "WA-Bot-Module-Quiz-v1-db-sell-full",
"tags": [
{
"id": "XPad0ERjSdqfxG52",
"name": "module",
"createdAt": "2025-03-31T08:11:00.151Z",
"updatedAt": "2025-03-31T08:11:00.151Z"
},
{
"id": "NeRMkUNq0sRVlL99",
"name": "whatsapp",
"createdAt": "2025-03-10T18:20:40.864Z",
"updatedAt": "2025-03-10T18:20:40.864Z"
},
{
"id": "2ocrWSzdKoCOU2AC",
"name": "sell",
"createdAt": "2025-04-19T15:39:51.859Z",
"updatedAt": "2025-04-19T15:39:51.859Z"
}
],
"nodes": [
{
"id": "6eb96949-f6bc-4044-b0cf-7bac329ce722",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
420,
520
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "42f5adf9-8663-44f7-a2da-20631d01dc0f",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
520
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2e406d54-a333-4767-a1bb-e2c61d60c5b6",
"name": "Starts",
"type": "n8n-nodes-base.whatsApp",
"position": [
480,
560
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7d6e48cb-6154-48a5-97c5-aef2bfcffc58",
"name": "Get Bot Status",
"type": "n8n-nodes-base.postgres",
"position": [
480,
760
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5,
"alwaysOutputData": true
},
{
"id": "a998e1fe-c919-4b61-a051-17afa7f14c0e",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
1400
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2ed48b30-5737-4d84-bceb-a8046c950fe6",
"name": "Commands",
"type": "n8n-nodes-base.switch",
"position": [
980,
760
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "0039047d-110f-4726-a29d-2d1035e924ec",
"name": "Main Menu",
"type": "n8n-nodes-base.whatsApp",
"position": [
1260,
560
],
"parameters": {},
"typeVersion": 1
},
{
"id": "53c8427c-a23d-4818-a2d5-f8ad3cd78816",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
2960,
940
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "743ef248-8f5c-444b-91c9-07249ae98540",
"name": "Define Flow",
"type": "n8n-nodes-base.switch",
"position": [
700,
760
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "68ae7054-369d-4b61-ad76-eeba27d8fc98",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1220,
740
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "988f33f4-a8d9-44d9-ac2c-3ad00c64217f",
"name": "Upsert Bot Status on START",
"type": "n8n-nodes-base.postgres",
"position": [
700,
560
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "719d9e1d-61e1-44de-8cfc-bc28b8e5f53c",
"name": "Initialization",
"type": "n8n-nodes-base.set",
"position": [
240,
760
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "2908320f-4f14-4d9a-9896-72b4187f8217",
"name": "Update Bot Status on START ",
"type": "n8n-nodes-base.postgres",
"position": [
1480,
560
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "ef1d9288-56f0-41ce-81a3-c3452e6ac86a",
"name": "Update Bot Status on TEST",
"type": "n8n-nodes-base.postgres",
"position": [
3020,
960
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "a42629ec-0966-4e63-b863-a0f541003171",
"name": "Randomize questions",
"type": "n8n-nodes-base.sort",
"position": [
2360,
960
],
"parameters": {},
"executeOnce": false,
"typeVersion": 1
},
{
"id": "08429844-5483-44d7-8a5c-4e9e0f6f120e",
"name": "Any questions?",
"type": "n8n-nodes-base.if",
"position": [
2140,
1160
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "c2fe1635-6536-4895-9842-a815eb7902aa",
"name": "Update Answer",
"type": "n8n-nodes-base.postgres",
"position": [
1700,
1160
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "ea2fe4f7-1cd3-41a8-a1b1-1fe94e416a5f",
"name": "Get Non-Answered Questions",
"type": "n8n-nodes-base.postgres",
"position": [
1920,
1160
],
"parameters": {},
"typeVersion": 2.5,
"alwaysOutputData": true
},
{
"id": "3000d5c8-a99c-4d1d-b6ff-a49ec1ea73c2",
"name": "Get Tests",
"type": "n8n-nodes-base.postgres",
"position": [
1480,
760
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "118fe642-e11f-4f1d-ab38-34f9b4b3e329",
"name": "Union Number with Question",
"type": "n8n-nodes-base.set",
"position": [
1700,
760
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "aa592693-5434-44e8-8e90-00887b261b1f",
"name": "Union list",
"type": "n8n-nodes-base.summarize",
"position": [
1920,
760
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "fcac55cc-3ce0-4f2c-8d36-605927fce0fb",
"name": "Calculate answers",
"type": "n8n-nodes-base.postgres",
"position": [
2360,
1160
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "c03e0632-74ea-471a-a0d4-7f754d062db4",
"name": "WhatsApp Trigger",
"type": "n8n-nodes-base.whatsAppTrigger",
"position": [
20,
760
],
"parameters": {},
"typeVersion": 1
},
{
"id": "726f6b67-542f-4a11-aa48-e1427be1074e",
"name": "List Tests",
"type": "n8n-nodes-base.whatsApp",
"position": [
2140,
760
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c365a231-8572-4a40-8c07-21000690e9af",
"name": "List?",
"type": "n8n-nodes-base.if",
"position": [
1260,
760
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "94d08401-dc68-4979-b94e-600e79000679",
"name": "Get Test",
"type": "n8n-nodes-base.postgres",
"position": [
1700,
960
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "ff451553-cae3-450d-8f0c-ae4a89f146d8",
"name": "Get Tests ",
"type": "n8n-nodes-base.postgres",
"position": [
1480,
960
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "66608e4e-2771-4210-aee8-f1fcb3453cef",
"name": "Test",
"type": "n8n-nodes-base.whatsApp",
"position": [
1920,
960
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3e36fbcd-fbe7-4343-8eb7-2ee0c2bac223",
"name": "Get Questions AND Answers",
"type": "n8n-nodes-base.postgres",
"position": [
2140,
960
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "78efdb33-a094-4a36-98f8-30de68292d4c",
"name": "Upsert pred Answer",
"type": "n8n-nodes-base.postgres",
"position": [
2580,
960
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "6ff36dd2-b8b0-4f45-997a-7d098f9eb56f",
"name": "Request Answer",
"type": "n8n-nodes-base.whatsApp",
"position": [
2800,
960
],
"parameters": {},
"typeVersion": 1
},
{
"id": "75937466-26c4-424b-ae46-54890d044c12",
"name": "Get Answer",
"type": "n8n-nodes-base.postgres",
"position": [
1260,
1160
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "9638190f-351e-40ee-8708-20231701c650",
"name": "Result",
"type": "n8n-nodes-base.whatsApp",
"position": [
2580,
1160
],
"parameters": {},
"typeVersion": 1
},
{
"id": "65c40000-24b8-4317-a3f8-99cf8618b508",
"name": "Get Question variants",
"type": "n8n-nodes-base.postgres",
"position": [
1480,
1160
],
"parameters": {},
"executeOnce": true,
"typeVersion": 2.5
},
{
"id": "a082da78-ab1a-4e61-8d6b-cb24ffb3ed9d",
"name": "Update Bot Status on START",
"type": "n8n-nodes-base.postgres",
"position": [
2800,
1160
],
"parameters": {},
"typeVersion": 2.5
},
{
"id": "1ea5577a-5ac6-4884-9ec3-f20bc17c33e4",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
760
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0cc3c717-85c3-4cb0-8526-4f4e6b6a54dd",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
520
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "08ed150c-151c-42f9-9f72-cf46b2791011",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
1080
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "f31fa5b3-0c9d-4479-8026-70fc779ed579",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
1080
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ddae069a-aa64-4421-9090-01171c60d0d0",
"connections": {
"Test": {
"main": [
[
{
"node": "Get Questions AND Answers",
"type": "main",
"index": 0
}
]
]
},
"List?": {
"main": [
[
{
"node": "Get Tests",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Tests ",
"type": "main",
"index": 0
}
]
]
},
"Result": {
"main": [
[
{
"node": "Update Bot Status on START",
"type": "main",
"index": 0
}
]
]
},
"Starts": {
"main": [
[
{
"node": "Upsert Bot Status on START",
"type": "main",
"index": 0
}
]
]
},
"Commands": {
"main": [
[
{
"node": "Main Menu",
"type": "main",
"index": 0
}
],
[
{
"node": "List?",
"type": "main",
"index": 0
}
]
]
},
"Get Test": {
"main": [
[
{
"node": "Test",
"type": "main",
"index": 0
}
]
]
},
"Get Tests": {
"main": [
[
{
"node": "Union Number with Question",
"type": "main",
"index": 0
}
]
]
},
"Main Menu": {
"main": [
[
{
"node": "Update Bot Status on START ",
"type": "main",
"index": 0
}
]
]
},
"Get Answer": {
"main": [
[
{
"node": "Get Question variants",
"type": "main",
"index": 0
}
]
]
},
"Get Tests ": {
"main": [
[
{
"node": "Get Test",
"type": "main",
"index": 0
}
]
]
},
"Union list": {
"main": [
[
{
"node": "List Tests",
"type": "main",
"index": 0
}
]
]
},
"Define Flow": {
"main": [
[
{
"node": "Starts",
"type": "main",
"index": 0
}
],
[
{
"node": "Commands",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Answer",
"type": "main",
"index": 0
}
]
]
},
"Update Answer": {
"main": [
[
{
"node": "Get Non-Answered Questions",
"type": "main",
"index": 0
}
]
]
},
"Any questions?": {
"main": [
[
{
"node": "Randomize questions",
"type": "main",
"index": 0
}
],
[
{
"node": "Calculate answers",
"type": "main",
"index": 0
}
]
]
},
"Get Bot Status": {
"main": [
[
{
"node": "Define Flow",
"type": "main",
"index": 0
}
]
]
},
"Initialization": {
"main": [
[
{
"node": "Get Bot Status",
"type": "main",
"index": 0
}
]
]
},
"Request Answer": {
"main": [
[
{
"node": "Update Bot Status on TEST",
"type": "main",
"index": 0
}
]
]
},
"WhatsApp Trigger": {
"main": [
[
{
"node": "Initialization",
"type": "main",
"index": 0
}
]
]
},
"Calculate answers": {
"main": [
[
{
"node": "Result",
"type": "main",
"index": 0
}
]
]
},
"Upsert pred Answer": {
"main": [
[
{
"node": "Request Answer",
"type": "main",
"index": 0
}
]
]
},
"Randomize questions": {
"main": [
[
{
"node": "Upsert pred Answer",
"type": "main",
"index": 0
}
]
]
},
"Get Question variants": {
"main": [
[
{
"node": "Update Answer",
"type": "main",
"index": 0
}
]
]
},
"Get Questions AND Answers": {
"main": [
[
{
"node": "Randomize questions",
"type": "main",
"index": 0
}
]
]
},
"Get Non-Answered Questions": {
"main": [
[
{
"node": "Any questions?",
"type": "main",
"index": 0
}
]
]
},
"Union Number with Question": {
"main": [
[
{
"node": "Union list",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is designed for educators, HR teams, or anyone who needs to create and distribute quizzes or tests via WhatsApp and automatically store and analyze responses in a PostgreSQL database.
Source: https://n8n.io/workflows/3649/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is for businesses or services that require managing customer reservations or appointments through a Telegram bot and storing reservation details in a PostgreSQL database.
This workflow is designed for businesses or individuals who want to automate responses to frequently asked questions via WhatsApp, while managing their question-and-answer database using Postgres.
This workflow is designed for businesses or developers who want to integrate product information into a WhatsApp bot and allow users to retrieve details about products from a database.
This comprehensive N8N automation template revolutionizes content creation by delivering a complete end-to-end solution for AI-powered blog generation. Transform simple ideas into fully SEO-optimized,
This template is ideal for users managing Telegram channels who want to automate the process of posting messages, including text and images, directly from an bot.