Skip to main content

Automated customer reservations via Telegram and PostgreSQL (Module "Booking")

Workflow preview

Workflow preview
100%
Automated customer reservations via Telegram and PostgreSQL (Module "Booking") 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 for businesses or services that require managing customer reservations or appointments through a Telegram bot and storing reservation details in a PostgreSQL datab...

Best for

  • Support Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.postgres, n8n-nodes-base.if, n8n-nodes-base.switch, n8n-nodes-base.whatsapp, n8n-nodes-base.whatsapptrigger, 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
Automated customer reservations via Telegram and PostgreSQL (Module "Booking")
Workflow name
Automated customer reservations via Telegram and PostgreSQL (Module "Booking")

Who is this for?

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.

What problem is this workflow solving?

This workflow automates the process of capturing reservation data via a Telegram bot and storing it in a PostgreSQL database. It eliminates the need for manual entry and reduces errors, improving efficiency in managing bookings.

What this workflow does

  • The workflow allows customers to select a day and time for their reservation through a Telegram bot.
  • Customers provide their phone number and name, which are then added to the reservation table in the PostgreSQL database.
  • Successfully added reservations are confirmed via the bot, ensuring both the business and customer are updated.

Setup

  1. Create tables in Postgres DB

    • Replace "n8n" in the provided SQL script with the name of your schema in the database.
    • Execute the SQL script to set up the required tables.
  2. Add Credentials

    • Add your Telegram bot credentials.
    • Add your PostgreSQL database credentials to the workflow for seamless integration.

How to customize this workflow to your needs

  • Modify the available days and times in the Telegram bot according to your business hours or schedule.
  • Adjust the database schema or add additional fields for customer preferences, special requests, or payment information as needed.

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 Note10

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

Block 2 - Sticky Note11

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

Block 3 - Sticky Note6

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

Block 4 - Update Name

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

Block 5 - Update Hour

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

Block 6 - Get Work Hours

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

Block 7 - Get Work Days

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

Block 8 - Update bot status on START

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

Block 9 - Is Date correct?

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

Block 10 - Commands

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

Block 11 - Sticky Note3

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

Block 12 - Starts

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

Block 13 - Get Bot Status

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

Block 14 - Upsert Bot Status on START

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

Block 15 - WhatsApp Trigger

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

Block 16 - Define Flow

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

Block 17 - Initialization

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

Block 18 - Get book

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

Block 19 - Main Menu

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

Block 20 - Request Date

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

Block 21 - Union Number with Question

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

Block 22 - Union list

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

Block 23 - Update bot status on BOOKING

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

Block 24 - First Question?

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

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

3. Summary Table

Workflow Automated customer reservations via Telegram and PostgreSQL (Module "Booking")
Complexity advanced
Nodes 49
Categories Support Chatbot
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/3651/3651.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 Automated customer reservations via Telegram and PostgreSQL (Module "Booking") do?

Who is this for? 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 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 Support Chatbot use case.