Manage Supabase database records with Telegram bot commands

Manage Supabase database with Telegram commands

How it works

Receive message — Telegram trigger captures incoming bot messages Validate user — Checks if sender's chat ID is in the authorized list Parse command — Extracts command type (/add, /list, etc.) and parameters Route & execute — Performs the appropriate Supabase operation (INSERT, SELECT, UPDATE, DELETE) 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() );

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

  2. Test it Send /help to your bot to verify everything works!

Customization

Adding more authorized users

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

Using a different table

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

Adding more fields

Modify the command parsing logic in "Parse Command and Parameters" Add field mappings in the Supabase Insert node Update the "Prepare Update Data" Set node with new fields 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)

0
Downloads
2
Views
8.11
Quality Score
beginner
Complexity
Author:Diego Alejandro Parrás(View Original →)
Created:2/13/2026
Updated:3/14/2026

🔒 Please log in to import templates to n8n and favorite templates

Workflow Visualization

Loading...

Preparing workflow renderer

Comments (0)

Login to post comments