Skip to main content

Collect WhatsApp questionnaire responses in Postgres (Module "Anketa")

Workflow preview

Workflow preview
100%
Collect WhatsApp questionnaire responses in Postgres (Module "Anketa") 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 businesses or organizations looking to collect and store user responses from questionnaires via a WhatsApp bot, with data saved in a Postgres database...

Best for

  • Market Research automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

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

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
Collect WhatsApp questionnaire responses in Postgres (Module "Anketa")
Workflow name
Collect WhatsApp questionnaire responses in Postgres (Module "Anketa")

Who is this for?

This workflow is designed for businesses or organizations looking to collect and store user responses from questionnaires via a WhatsApp bot, with data saved in a Postgres database.

What problem is this workflow solving?

This workflow streamlines the process of collecting and managing user responses to questionnaires. It helps automate data collection from multiple users and stores the responses in a centralized database for easy access and analysis.

What this workflow does

Basis version:

  • Add questions to the anketa_question table.
  • Save the responses of users who complete the questionnaire in whatsapp into the database.

Additional version:

  • All features from basis version.
  • The bot sends a lead magnet from Google Drive after filling out the form.
  • If the user has not answered all the questions, the bot sends a reminder after a certain time (configurable).

Setup

  1. Create Tables in Postgres DB

    • Replace "n8n" in the provided SQL script with your database schema name.
    • Run the SQL script in your Postgres database (this is available within the workflow).
  2. Add Credentials

    • Set up WhatsApp OAuth credentials and account details.
    • Set up Postgres credentials to connect the workflow to your database.

How to customize this workflow to your needs

  • Modify the questions in the anketa_question table to suit your specific survey or data collection requirements.
  • Adjust the WhatsApp link and communication flow to align with your branding or messaging needs.
  • Customize the database table schema if you need to capture additional fields or change the format of the data stored.

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 - WhatsApp Trigger

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

Block 2 - Sticky Note3

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 - Initialization

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

Block 9 - Starts Test

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

Block 10 - Get First Question

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

Block 11 - Update Bot Status on ANKETA

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

Block 12 - Sticky Note

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

Block 13 - Define Flow

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

Block 14 - Update Bot Status on START

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

Block 15 - Get Available Questions

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

Block 16 - Is Questions available?

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

Block 17 - Is Question found?

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

Block 18 - First Question

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

Block 19 - Question

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

Block 20 - Add prev Answer

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

Block 21 - Add Answer

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

Block 22 - Finish Anketa

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

Block 23 - Get prev Answer

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

Block 24 - Sticky Note1

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

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

3. Summary Table

Workflow Collect WhatsApp questionnaire responses in Postgres (Module "Anketa")
Complexity advanced
Nodes 32
Categories Market Research
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/3653/3653.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 Collect WhatsApp questionnaire responses in Postgres (Module "Anketa") do?

Who is this for? This workflow is designed for businesses or organizations looking to collect and store user responses from questionnaires via a WhatsApp bot, with data saved in a Postgres database...

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 Market Research use case.