🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

WhatsApp + Postgres: instant product menu replies

Lisa Granqvist Partner Workflow Automation Expert

Your WhatsApp inbox turns into a product catalog the moment you get busy. People ask for “price?”, “sizes?”, “what’s included?”, and you end up scrolling old messages, copying links, and still sending the wrong version.

This WhatsApp Postgres automation hits sales reps and marketing managers first, honestly. But store owners feel it too when pricing updates happen and nobody remembers which message template is the latest. The outcome is simple: instant, consistent product replies that don’t depend on who’s online.

Below is how this workflow turns messages into a self-serve menu, how the logic works, and what you’ll need to run it reliably in n8n.

How This Automation Works

See how this solves the problem:

n8n Workflow Template: WhatsApp + Postgres: instant product menu replies

The Challenge: Answering product questions manually (and inconsistently)

When product questions come in through WhatsApp, the “quick reply” approach feels fine… until it isn’t. One person shares last month’s price. Another forgets to include what’s in the bundle. Someone sends a list that’s missing two items because the catalog changed and nobody updated the notes. And the real cost isn’t just time. It’s momentum. A buyer who wanted a simple list now waits, asks again, or disappears.

It adds up fast. Here’s where it breaks down in day-to-day work.

  • Copying product details out of spreadsheets or old chats creates little mistakes that look unprofessional.
  • Pricing changes don’t propagate, so you end up negotiating off the wrong number.
  • Your best performers become human search engines instead of doing follow-ups and closing.
  • There’s no clean way to guide a customer from “show me options” to “pick this one.”

The Fix: A WhatsApp menu backed by Postgres

This workflow connects WhatsApp to a Postgres product database so customers can pull product info without waiting on your team. A WhatsApp message triggers the automation, n8n reads the message context, then checks where the user is in the conversation (new session vs. selecting from a list). If they ask for the catalog, the workflow fetches products from Postgres, formats them into a clean numbered menu, and replies in WhatsApp. When they reply with a number, the workflow validates the choice, retrieves the exact product record (and any related “catalog detail” data), then sends a single, consistent product detail message. No rummaging. No guessing.

The flow starts on an incoming WhatsApp message. From there, Postgres is used twice: first to track bot “status,” then to pull the right catalog data. Finally, the “Respond” nodes send either the main menu, a product list, or the specific product details back to the customer.

What Changes: Before vs. After

Real-World Impact

Say you get 30 WhatsApp product inquiries a day. Manually, even a “fast” response is maybe 3 minutes to find the right info, format it, and double-check pricing. That’s about 90 minutes daily, and it’s usually your most valuable person doing it. With this automation: the customer texts “menu,” gets the list instantly, then replies with a number. You mostly step in only for edge cases and real objections, not basic catalog retrieval.

Requirements

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • WhatsApp Business integration to receive and send messages.
  • Postgres database to store catalog data and bot state.
  • Postgres credentials (create a DB user with table access).

Skill level: Intermediate. You’ll paste SQL to create tables, connect credentials, and tweak a few message fields.

Need help implementing this? Talk to an automation expert (free 15-minute consultation).

The Workflow Flow

A WhatsApp message triggers the workflow. When someone messages your number, the automation captures the text and basic sender details, then sets a few internal variables so the workflow can respond consistently.

The bot checks conversation status in Postgres. A small database lookup determines if the user is “starting fresh” or already in a selection flow, which prevents the bot from repeating itself or losing context.

Commands are routed to the right response. The workflow uses a decision plus a switch to send the main menu, fetch a product list, or validate a numeric choice. If the user wants the catalog, Postgres returns the items, and n8n formats them into a numbered list that’s easy to reply to.

Details are fetched and sent back to WhatsApp. When the customer chooses an item, the workflow pulls the exact product record (and any catalog detail data) and sends a clean, readable product message automatically.

You can easily modify the menu options to match your product structure (for example, categories first, then products). See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the WhatsApp Trigger

Set up the entry point so incoming WhatsApp messages start the workflow and pass data into the processing chain.

  1. Add and open WhatsApp Entry Trigger.
  2. Connect your WhatsApp trigger to Setup Variables as shown in the workflow flow.
  3. Save the node to generate the webhook URL if required by your WhatsApp provider.

Credential Required: Connect your WhatsApp credentials in WhatsApp Entry Trigger.

Step 2: Connect Postgres Data Sources

Configure the database queries that retrieve bot status and catalog information. This workflow uses multiple Postgres nodes to manage state and card data.

  1. Open Fetch Bot Status and configure your query to load the user’s current status.
  2. Open Update Bot Status and set the update query that writes the new bot state after onboarding.
  3. Configure the catalog queries across Fetch Card Catalog, Fetch Catalog Detail, and Fetch Single Card to return list data and a single card’s details.
  4. Keep Fetch Bot Status and Fetch Single Card set to execute once if you want to reduce repeated lookups.

Credential Required: Connect your Postgres credentials to all Postgres nodes (5 nodes handle bot status and catalog data).

Step 3: Set Up Processing and Routing Logic

Prepare input variables, check bot state, and route user commands to the correct menu or catalog flows.

  1. In Setup Variables, map incoming WhatsApp fields into standardized variables used by downstream nodes.
  2. In Start Decision, define the condition that determines whether to send the onboarding message or route to commands.
  3. In Route Commands, configure switch cases for menu requests vs. list selection messages.
  4. In List Choice Check, define the condition that determines whether to fetch the list or fetch a specific catalog detail.

⚠️ Common Pitfall: If Route Commands cases don’t match the exact incoming message format, users will never reach Send Main Menu or the catalog flow.

Step 4: Configure Catalog Assembly and Outputs

Assemble the card list and deliver WhatsApp responses for the menu, catalog list, and card details.

  1. In Merge Number Prompt, add the text that asks users to pick a number from the list.
  2. In Combine Listing, format the list returned by Fetch Card Catalog into a single message.
  3. In Send Start Reply, craft the onboarding response for new users.
  4. In Send Main Menu, configure the menu response for returning users.
  5. In Deliver Card List, send the combined catalog list to the user.
  6. In Send Card Details, build the message using the output of Fetch Single Card.

Credential Required: Connect your WhatsApp credentials to Send Start Reply, Send Main Menu, Deliver Card List, and Send Card Details.

Step 5: Test and Activate Your Workflow

Validate the full WhatsApp conversation flow and turn the automation on.

  1. Click Execute Workflow and send a test message to the WhatsApp number connected to WhatsApp Entry Trigger.
  2. Confirm that new users receive Send Start Reply and that Update Bot Status updates the database.
  3. Send a menu command and verify Send Main Menu fires via Route Commands.
  4. Request the catalog list and confirm Deliver Card List sends a formatted list, then respond with a number and ensure Send Card Details returns a single card detail.
  5. When everything works, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Watch Out For

  • WhatsApp credentials can expire or need specific permissions. If things break, check your WhatsApp provider dashboard (connected apps, tokens, webhooks) first.
  • If you’re relying on database “status” to manage the conversation, stale rows in Postgres can confuse the flow. Clearing test users or adding a simple timeout rule keeps the menu from looping.
  • Numbered selections fail when the list output changes but the validation doesn’t. If you add or remove products, make sure the “choice check” still matches the returned catalog length.

Common Questions

How quickly can I implement this WhatsApp Postgres automation?

About 60–90 minutes if your WhatsApp and Postgres accounts are ready.

Can non-technical teams implement this product menu automation?

Yes, but someone still has to run the SQL once and connect credentials. After that, updating products is just updating database rows.

Is n8n free to use for this WhatsApp Postgres automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in WhatsApp provider fees and your database hosting costs.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

How do I adapt this WhatsApp Postgres automation solution to my specific challenges?

You can swap the “Send Main Menu” and “Deliver Card List” messages to match your wording and product structure, then adjust the Postgres queries in “Fetch Card Catalog” and “Fetch Catalog Detail” to pull the fields you care about. Common customizations include adding categories, showing inventory status, and including a short “best for” line in each product description. If you already track products in Google Sheets, you can also add a sync step so Sheets updates push into Postgres automatically.

Why is my WhatsApp connection failing in this workflow?

Usually it’s expired or mismatched credentials in your WhatsApp node. Reconnect the WhatsApp account in n8n, then confirm your WhatsApp provider still has the webhook URL enabled and pointing to the right workflow. If messages arrive but replies fail, check template rules and sending limits on the provider side. Rate limits can also show up as random failures when you test repeatedly.

What’s the capacity of this WhatsApp Postgres automation solution?

On n8n Cloud Starter, you can handle a typical small-business message volume comfortably, and upgrading increases execution limits. If you self-host, capacity mainly depends on your server and Postgres performance. This workflow is lightweight because it’s mostly “read a row, format a reply,” so it scales well for menus and catalogs.

Is this WhatsApp Postgres automation better than using Zapier or Make?

Often, yes, for anything that looks like a real menu with state. Zapier and Make can send WhatsApp messages, but storing conversation status, validating a numeric choice, and branching into different Postgres queries gets clunky fast (and can get expensive as volume grows). n8n handles the branching cleanly, and self-hosting means you’re not paying more just because customers are interacting more. If you only need a single “auto-reply with a link” message, those tools are fine. If you want the catalog to feel interactive, n8n is the safer bet. Talk to an automation expert if you want help choosing.

Once this is live, your WhatsApp replies stop being a fragile manual process and start acting like a real product channel. Set it up, keep the catalog accurate in Postgres, and let the workflow do the repeating.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal