Skip to main content

Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz")

Workflow preview

Workflow preview
100%
Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz") preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for? 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 Pos...

Best for

  • HR automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.whatsapp, n8n-nodes-base.postgres, n8n-nodes-base.switch, n8n-nodes-base.set, n8n-nodes-base.sort, n8n-nodes-base.if, n8n-nodes-base.summarize

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Andrew.

Original n8n.io source

1.1 Workflow description

Title
Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz")
Workflow name
Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz")

Who is this for?

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.

What problem is this workflow solving?

Managing tests or quizzes manually across platforms can be time-consuming and error-prone. This workflow automates the entire process — from test creation to distribution and result collection — providing an efficient way to manage assessments at scale.

What this workflow does

  • Adds test content (including questions and answers) to a PostgreSQL database.
  • Allows users to take the test directly via WhatsApp.
  • Displays a final ranking to test takers upon completion.

Setup

1. Create tables in PostgreSQL
  • Open the SQL script provided in the workflow.
  • Replace n8n with your actual database schema name.
  • Run the script to set up the required tables.
2. Add required credentials
  • WhatsApp: Set up OAuth and connect your WhatsApp account.
  • PostgreSQL: Add your Postgres DB credentials to n8n.

How to customize this workflow to your needs

  • Update the test questions and answers directly in the database.
  • Modify the bot flow to suit your test structure or messaging preferences.
  • Extend the ranking logic based on specific grading criteria or scoring rules.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Starts

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 4 - Get Bot Status

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 5 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Commands

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 7 - Main Menu

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Define Flow

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Upsert Bot Status on START

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 12 - Initialization

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 13 - Update Bot Status on START

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 14 - Update Bot Status on TEST

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 15 - Randomize questions

Type / Role
n8n-nodes-base.sort - sort
Config choices
Version 1

Block 16 - Any questions?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 17 - Update Answer

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 18 - Get Non-Answered Questions

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 19 - Get Tests

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 20 - Union Number with Question

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 21 - Union list

Type / Role
n8n-nodes-base.summarize - summarize
Config choices
Version 1.1

Block 22 - Calculate answers

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 23 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 24 - List Tests

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1

Showing the first 24 of 39 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz")
Complexity advanced
Nodes 39
Categories HR
Author Andrew
Published 21 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3649/3649.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate WhatsApp tests and rank results with PostgreSQL (Module "Quiz") do?

Who is this for? 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 Pos...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your HR use case.