Skip to main content

Manage Supabase database records with Telegram bot commands

Workflow preview

Workflow preview
100%
Manage Supabase database records with Telegram bot commands preview
Open on n8n.io

1. Workflow Overview

Manage Supabase database with Telegram commands How it works 1. Receive message — Telegram trigger captures incoming bot messages 2. Validate user — Checks if sender's chat ID is in the authorized ...

Best for

  • Document Extraction automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.code, n8n-nodes-base.switch, n8n-nodes-base.supabase, n8n-nodes-base.telegram, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Diego Alejandro Parrás.

Original n8n.io source

1.1 Workflow description

Title
Manage Supabase database records with Telegram bot commands
Workflow name
Manage Supabase database records with Telegram bot commands

Manage Supabase database with Telegram commands

How it works

  1. Receive message — Telegram trigger captures incoming bot messages
  2. Validate user — Checks if sender's chat ID is in the authorized list
  3. Parse command — Extracts command type (/add, /list, etc.) and parameters
  4. Route & execute — Performs the appropriate Supabase operation (INSERT, SELECT, UPDATE, DELETE)
  5. Respond — Sends formatted results back to Telegram

Turn your Telegram into a powerful database management interface. This workflow lets you create, read, update, delete, and search records in your Supabase database using simple chat commands — no SQL knowledge required.

Who is this for?

Small business owners, freelancers, and teams who need to manage data on the go without opening dashboards or writing queries. Perfect for inventory tracking, simple CRM, expense logging, or any scenario where you need quick mobile access to your database.

What problem does it solve?

Managing database records typically requires logging into admin panels or writing SQL queries. This workflow eliminates that friction by letting you interact with your data through familiar Telegram messages, from anywhere, on any device.

Benefits

  • Mobile database access — Manage your data from anywhere using just your phone
  • Zero SQL required — Simple commands replace complex database queries
  • Secure by default — Only authorized Telegram users can access your data
  • Instant feedback — Get formatted responses confirming every operation
  • Fully customizable — Adapt to any table structure with minimal changes

Available commands

Command Format Example
/add name, price, quantity, category /add iPhone 15, 999.99, 50, electronics
/list [category] /list or /list electronics
/get id /get 15
/update id field=value /update 15 price=899 quantity=45
/delete id /delete 15
/search text /search iPhone
/help Shows all available commands

Set up steps

1. Create your Telegram bot

  • Message @BotFather on Telegram
  • Send /newbot and follow the prompts
  • Save the API token you receive

2. Get your Telegram chat ID

  • Message @userinfobot on Telegram
  • It will reply with your chat ID number

3. Create the Supabase table

Run this SQL in your Supabase project's SQL Editor:

CREATE TABLE products (
 id SERIAL PRIMARY KEY,
 name TEXT NOT NULL,
 price DECIMAL(10,2),
 quantity INTEGER DEFAULT 0,
 category TEXT,
 created_at TIMESTAMP DEFAULT NOW()
);

4. Configure the workflow

  1. Import the workflow into n8n
  2. Add your Telegram Bot credentials (using the API token from step 1)
  3. Add your Supabase credentials (Project URL + API Key from Supabase dashboard)
  4. Open the "Is Authorized?" node and replace 123456789 with your actual chat ID from step 2
  5. Activate the workflow

5. Test it

Send /help to your bot to verify everything works!

Customization

Adding more authorized users

  1. Open the "Is Authorized?" node
  2. Click "Add condition"
  3. Add another OR condition: chatId equals [new user's chat ID]

Using a different table

  1. Change products to your table name in all Supabase nodes
  2. Update the field parsing in the "Parse Command and Parameters" code node
  3. Update field mappings in "Supabase Insert Product" and "Prepare Update Data" nodes
  4. Adjust the help message in "Send Help Message" node

Adding more fields

  1. Modify the command parsing logic in "Parse Command and Parameters"
  2. Add field mappings in the Supabase Insert node
  3. Update the "Prepare Update Data" Set node with new fields
  4. Update the help message

Example use cases

  • Inventory management — Track stock levels from your phone while in the warehouse
  • Simple CRM — Add and lookup contacts on the go
  • Expense tracking — Log expenses as they happen
  • Task management — Create and update tasks without opening any app
  • Field data collection — Teams can submit data from anywhere

Requirements

  • n8n instance (cloud or self-hosted)
  • Telegram account
  • Supabase account (free tier works)

Difficulty level: Intermediate Estimated setup time: 15-20 minutes Monthly operating cost: $0 (Telegram and Supabase free tiers)

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

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

Block 2 - Extract Message Data

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

Block 3 - Is Authorized?

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

Block 4 - Parse Command and Parameters

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Route by Command

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

Block 6 - Add Has Error?

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

Block 7 - Supabase Insert Product

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

Block 8 - Send Add Success

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 9 - Send Add Error

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 10 - Filter by Category?

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

Block 11 - Supabase List Filtered

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

Block 12 - Supabase List All

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

Block 13 - Format Product List

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Send Product List

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 15 - Get Has Error?

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

Block 16 - Supabase Get Product

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

Block 17 - Send Product Details

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 18 - Send Get Error

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 19 - Update Has Error?

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

Block 20 - Prepare Update Data

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

Block 21 - Supabase Update Product

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

Block 22 - Send Update Success

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 23 - Send Update Error

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 24 - Delete Has Error?

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

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

3. Summary Table

Workflow Manage Supabase database records with Telegram bot commands
Complexity advanced
Nodes 37
Categories Document Extraction
Author Diego Alejandro Parrás
Published 02 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13166/13166.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 Manage Supabase database records with Telegram bot commands do?

Manage Supabase database with Telegram commands How it works 1. Receive message — Telegram trigger captures incoming bot messages 2. Validate user — Checks if sender's chat ID is in the authorized ...

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 Document Extraction use case.