Skip to main content

WhatsApp product catalog bot with PostgreSQL database

Workflow preview

Workflow preview
100%
WhatsApp product catalog bot with PostgreSQL database 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 developers who want to integrate product information into a WhatsApp bot and allow users to retrieve details about products from a datab...

Best for

  • Lead Nurturing 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.if, n8n-nodes-base.switch, n8n-nodes-base.set, 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
WhatsApp product catalog bot with PostgreSQL database
Workflow name
WhatsApp product catalog bot with PostgreSQL database

Who is this for?

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.

What problem is this workflow solving?

This workflow automates the process of managing and retrieving product information via WhatsApp, allowing businesses to easily share product details with customers without manual interaction.

What this workflow does

Basis version:

  • It adds product data to a Postgres database.
  • It enables a WhatsApp bot to retrieve a list of products.
  • Users can select a product to receive detailed information about it.

Additional version:

  • All features from Basis Version.
  • Get a list of product categories.
  • Get a list of products in a category.
  • Add product to cart.
  • Go to the cart or select more products.
  • Remove unnecessary items in the cart or clear the entire cart.
  • When all the desired items are in the cart, click Buy.
  • The bot will send you a payment link.

Setup

  1. Create Tables in Postgres DB

    • Modify the SQL script to replace "n8n" with your schema name.
    • Run the provided SQL script in your database (available in the workflow).
  2. Add Credentials

    • Add WhatsApp credentials (OAuth, Account).
    • Add Postgres credentials to connect the bot to your database.

How to customize this workflow to your needs

  • Update the database schema or table structure if you need additional product information.
  • Modify the bot interaction to suit your specific product listing and display preferences.

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 - Upsert Bot Status

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

Block 5 - Get Bot Status

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

Block 6 - Start?

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

Block 7 - Commands

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

Block 8 - Main Menu

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

Block 9 - Initialization

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

Block 10 - Union list

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

Block 11 - Union Number with Question

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

Block 12 - Get Card products

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

Block 13 - List Cards

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

Block 14 - Get Card product

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

Block 15 - Get Card products

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

Block 16 - List?

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

Block 17 - Card

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

Block 18 - Sticky Note7

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

Block 19 - Sticky Note8

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

Block 20 - Sticky Note9

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

Block 21 - Sticky Note6

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

Block 22 - Sticky Note10

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

3. Summary Table

Workflow WhatsApp product catalog bot with PostgreSQL database
Complexity advanced
Nodes 22
Categories Lead Nurturing
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/3652/3652.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 WhatsApp product catalog bot with PostgreSQL database do?

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

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 Lead Nurturing use case.