This repository documents my journey in exploring Metabase, an open-source business intelligence and analytics platform. The project includes:
- Connecting Metabase to a SQL Server instance (Xóm Data)
- Role-based access control via Telegram Bot
- Automatic report distribution via email
- Embedding dashboards into a local Node.js web app
- Docker installed and running
- SQL Server instance accessible
- Node.js and npm installed (for embedding)
docker run -d -p 3000:3000 --name metabase metabase/metabase-
Requesting an account via Telegram Bot

A custom Telegram Bot is used to generate an account creation request.
-
Receiving account credentials via Gmail

The system sends login credentials to the user's email after approval.
-
Connecting to SQL Server from Metabase

Use the credentials to log into Metabase and connect to the SQL Server database.
-
After logging in, this is the main landing interface where you can access databases, dashboards, and queries.
-
Quickly generate summaries and insights from tables using the powerful X-Ray feature.
-
You can parameterize SQL queries to enable dynamic filtering in dashboards.
-
Easily reuse code blocks and query templates with snippets support.
-
Create your first dashboard by combining charts, filters, and saved questions.
- Use Telegram Bot to manage user permissions and broadcast report links.
- Configure alerts and automated report delivery via email from Metabase.
You can embed dashboards securely into a local web server using Node.js and Metabase embedding tokens.
sudo apt update
sudo apt install nodejs
node -v
sudo apt install npmcd path/of/project
mkdir local-web
cd local-web
npm init -y
npm install express
mkdir public
cd public
# Add your embed page and server file here (e.g., server.js)
node metabase-embed.js-
Setting Embed Options in Metabase

Configure embed settings (for static embedding in self-hosted setup).
Use Express to serve the embedded dashboard via a local web server.
The dashboard is now successfully embedded and viewable through your web page.
metabase-self-learning/
├── images/
│ ├── s01_get_account.png
│ ├── s02_receive_account.png
│ ├── s03_import_connection.png
│ ├── s04_home_view.png
│ ├── s05_xray_view.png
│ ├── s06_sql_editor_with_parameters.png
│ ├── s07_sql_editor_with_snippets.png
│ ├── s08_quick_sample_dashboard.png
│ ├── s09_embed_options.png
│ ├── s10_running_nodejs.png
│ └── s11_embed_result.png
├── local-web/
│ └── public/
│ └── metabase-embed.js
├── docker-compose.yml
├── README.md
└── LICENSE
This project is licensed under the MIT License. See the LICENSE file for details.






