📑 Daftar Isi
- What Is This System? An Everyday Analogy
- Preparation: 2 Things You Need
- Setup: Installing the Bot on Your Server
- Step 1: Set the Token on Your Server
- Step 2: Upload the Webhook File to Your Server
- Step 3: Activate the Telegram Webhook
- Step 4: Test Your Bot
- How to Use the Bot to Request Articles
- Troubleshooting: Bot Not Responding
- 1. Check if the webhook is active
- 2. Check if the webhook file is accessible
- 3. Check error logs
- 4. Check if the token is correct
- 5. Make sure HTTPS is active
- Security — Things to Keep in Mind
- Comparison: Old Way vs New Way
- FAQ
- 1. Is this bot free?
- 2. How long does an article take after requesting?
- 3. Can I request articles in English only?
- 4. How do I delete the bot?
- 5. What AI does this bot use?
- 6. Can I request more than one article at a time?
- Related Articles
- Conclusion
Have you ever been on the road, at a café, or just lounging around — when suddenly a great article topic pops into your head? But you’d need to open your laptop, login to WordPress, write at length… ugh, too much effort. By the time you get home, the idea has already flown away to who-knows-where.
I experience this all the time. The best article ideas always strike at the worst times — while driving, waiting in line at the doctor, or right before sleep. And those great ideas end up as orphaned notes in a Notes app, never to be executed.
Until I built this simple system: a Telegram Bot for article requests. You just send a chat to the bot: “/artikel [topic]” — boom, the article enters a queue, gets processed, and the URL gets sent back to your Telegram as soon as it’s published. No need to open a laptop. No need to login to WordPress. You can do it from your phone.
In this article, I’ll explain how to set up this Telegram bot from zero to fully functional — including how to get your bot token, how to get your chat ID, and how to configure the webhook. Everything step by step, suitable even if you’ve never created a Telegram bot before.
Difficulty: Beginner
Last Updated: July 2026
Tested On: Telegram Bot API v7.x, PHP 8.x, cPanel/WHM, Nginx/Apache
What Is This System? An Everyday Analogy
Imagine you have a personal assistant on standby 24/7, ready to take instructions via chat. You just send a message: “Please create an article about fixing website downtime.”
Your assistant:
- Logs your request in a notebook (queue)
- Replies: “Got it, I’ll process this” (auto-reply)
- Writes the article (system generates + publishes)
- Sends you the result: “Done! Here’s the URL…” (notification)
That “assistant” is the Telegram Bot I built. You can build your own by following this guide.
Preparation: 2 Things You Need
Before starting, you need 2 pieces of data. Don’t worry — getting them is dead simple, just a few chats away.
1. Bot Token — “Your Bot’s House Key”
Analogy: A token is like a house key. Without the key, you can’t enter and control the house. Without the token, the system can’t send/receive messages from your bot.
How to get a Bot Token:
- Open Telegram, search for @BotFather (make sure it’s verified with the blue checkmark)
- Send the command:
/newbot - BotFather will ask: “Alright, a new bot. How are we going to call it?” → enter your bot’s display name, e.g.: Syslog Article Bot
- BotFather will then ask: “Good. Now let’s choose a username for your bot.” → enter a username ending in
bot, e.g.: syslog_article_bot - BotFather will respond with something like:
Done! Congratulations on your new bot. You will find it at t.me/syslog_article_bot.
Use this token to access the HTTP API:
8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn
Keep your token secure and store it safely, it can be used by anyone to control your bot.
Your token is: 8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn
⚠️ This token is SECRET. Never share it with anyone. Anyone with this token can fully control your bot.
2. Chat ID — “Your Room Number on Telegram”
Analogy: Chat ID is like your apartment number. The bot needs to know your apartment number so it can send replies to the right place.
How to get your Chat ID:
- Find the bot @userinfobot on Telegram
- Send any message to it (e.g., “hello”)
- The bot will reply with your data:
Id: 987654321
First: Denny
Last: R
Username: @dennyrw3
Language: en
Your Chat ID is: 987654321 (the number shown next to Id)
Write down both of these:
- ✅ Bot Token:
8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn - ✅ Chat ID:
987654321
Setup: Installing the Bot on Your Server
Now let’s connect your Telegram bot to your website server. Here are the steps:
Step 1: Set the Token on Your Server
The token must be stored in a server environment variable (not directly in the PHP file, for security reasons).
Via SSH (if you have root/VPS access):
# Open .bashrc
nano ~/.bashrc
# Add this at the bottom:
export TELEGRAM_BOT_TOKEN="8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn"
# Save (Ctrl+O, Enter, Ctrl+X)
# Reload
source ~/.bashrc
Via cPanel / Shared Hosting:
- Login to cPanel
- Find “Select PHP Version” or “MultiPHP INI Editor”
- Look for the option to add an environment variable
- Add:
TELEGRAM_BOT_TOKEN = 8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn - Save
Alternative — set directly in the file (development/testing only):
# Open telegram-bot.php
# Find the line:
define('BOT_TOKEN', getenv('TELEGRAM_BOT_TOKEN') ?: 'YOUR_BOT_TOKEN_HERE');
# Replace 'YOUR_BOT_TOKEN_HERE' with your actual token:
define('BOT_TOKEN', getenv('TELEGRAM_BOT_TOKEN') ?: '8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn');
Step 2: Upload the Webhook File to Your Server
The telegram-bot.php file must be uploaded to your website’s public root folder (usually /public_html/).
Via cPanel File Manager:
- Login to cPanel → File Manager
- Open the
/public_html/folder - Click “Upload” in the toolbar
- Select the
telegram-bot.phpfile from your computer - Wait for the upload to complete
Step 3: Activate the Telegram Webhook
A webhook is how Telegram “calls” your server every time a message arrives at your bot. You only need to do this once.
How to activate the webhook:
# Via terminal (SSH) or browser:
# Replace [TOKEN] with your bot token
# Replace [DOMAIN] with your website domain
curl "https://api.telegram.org/bot[TOKEN]/setWebhook?url=https://[DOMAIN]/telegram-bot.php"
Example:
curl "https://api.telegram.org/bot8123456789:AAHqXxYyZzAaBbCcDdEeFfGgHhIiJjKkLlMmNn/setWebhook?url=https://syslogsolutions.net/telegram-bot.php"
Expected response:
{"ok":true,"result":true,"description":"Webhook was set"}
If you see ok: true — success! Telegram will now forward all bot messages to https://yourdomain.com/telegram-bot.php.
Step 4: Test Your Bot
Open your bot on Telegram (search the username you created, e.g., @syslog_article_bot).
Send the message: help
Your bot should reply with the list of available commands. If it does — the setup was successful!
How to Use the Bot to Request Articles
Once your bot is active, you can request articles from anywhere — phone, tablet, laptop — via Telegram chat.
Article Request Format
Use the /artikel prefix before your topic. Without the prefix, the message won’t be processed as an article request.
Type a message in free format, for example:
/artikel fixing slow websites on cPanel/artikel troubleshooting MariaDB database/artikel blocking WordPress brute force attacks
Prefixes like “create”, “make”, “write”, “article” are automatically stripped. Just make sure the topic is clear.
Complete Command List
| Command | Function | Example |
|---|---|---|
/artikel [topic] |
Request a new article | /artikel installing SSL on cPanel |
/status or status |
Check your request status | status |
/list or list |
View all article queues | list |
/cancel [id] |
Cancel a specific request | /cancel req-20260725120000-abc123 |
/help or help |
Show full help | help |
Article Request Flow (from Chat to Publish)
- You send:
/artikel backing up MySQL databases - Bot immediately replies:
✅ Article request received! 📌 ID: req-20260725143022-a1b2c3 📝 Topic: backing up MySQL databases ⏳ Status: Awaiting processing - Article enters the queue and is processed (usually 5-30 minutes)
- Once published, the bot sends a notification:
✅ Article published! 📝 Topic: backing up MySQL databases 🇬🇧 EN: https://domain.com/en/noc-article/...
Troubleshooting: Bot Not Responding
If your bot isn’t responding, check the following:
1. Check if the webhook is active
curl "https://api.telegram.org/bot[TOKEN]/getWebhookInfo"
Expected result:
{
"ok": true,
"result": {
"url": "https://yourdomain.com/telegram-bot.php",
"has_custom_certificate": false,
"pending_update_count": 0
}
}
If url is empty — the webhook hasn’t been set. Re-run Step 3.
If pending_update_count is more than 0 — there are messages received but not yet processed.
2. Check if the webhook file is accessible
# Open in your browser:
https://yourdomain.com/telegram-bot.php?action=list
If you see JSON output — the webhook file is working. If you see a PHP error — there’s an issue in the code.
3. Check error logs
# Via cPanel → Errors
# Or via SSH:
tail -50 /home/username/logs/domain.com.error.log
4. Check if the token is correct
curl "https://api.telegram.org/bot[TOKEN]/getMe"
If the response shows “Unauthorized” — the token is wrong. Double-check with @BotFather.
5. Make sure HTTPS is active
Telegram only sends webhooks to HTTPS URLs. If your website doesn’t have HTTPS yet, install SSL first (via cPanel → SSL/TLS or Let’s Encrypt).
Security — Things to Keep in Mind
- Never share your bot token — the token gives full control over your bot. Store it in an environment variable, not in a public file.
- Restrict users — the
telegram-bot.phpfile has anALLOWED_USERSvariable. Fill it with an array of allowed Telegram usernames:define('ALLOWED_USERS', ['your_username', 'admin_user']);If left as an empty array, all users can request articles.
- Rate limiting — this system currently has no rate limiting. If many people use your bot, consider adding a daily request limit.
- HTTPS is mandatory — Telegram only sends webhooks to HTTPS URLs. Make sure your SSL certificate is active and valid.
Comparison: Old Way vs New Way
| Aspect | Old Way (Manual) | New Way (Telegram Bot) |
|---|---|---|
| Requesting an article | Must be at your laptop, open WordPress | From your phone, on the road, anywhere |
| Wait time | Must write it yourself (1-3 hours) | Send a chat, wait for notification (5-30 min) |
| Languages | Must write ID + EN separately | Auto-generated in both ID + EN |
| SEO | Must set meta manually | Auto meta title, desc, keyword, OG image |
| Notification | Must check manually | Auto notification to Telegram |
| Tracking | Manually log in a spreadsheet | All requests recorded in JSON queue |
FAQ
1. Is this bot free?
Yes. The Telegram Bot API is completely free — no fees. You only need a server to host the telegram-bot.php file — which is already included in your hosting package.
2. How long does an article take after requesting?
It depends on the queue. Typically 5-30 minutes. If the queue is empty, it can be faster. You can check the status anytime by sending /status to the bot.
3. Can I request articles in English only?
The system currently auto-generates articles in both languages (ID + EN). Single-language requests can be added later as a feature upgrade.
4. How do I delete the bot?
Send /deletebot to @BotFather, then select the bot to delete. Don’t forget to also remove the telegram-bot.php file from your server.
5. What AI does this bot use?
Articles are written by an experienced NOC Engineer (not generative AI). The bot serves only as a “chat interface” for receiving requests and sending notifications. Articles are manually crafted following strict PRD guidelines — not automated templates.
6. Can I request more than one article at a time?
Yes. Send multiple chats in sequence — each chat becomes a separate request in the queue. There’s no limit on the number of requests per chat.
Related Articles
- How to Use OpenCode (AI CLI) to Protect Your Own Server
- How to Install OpenCode on VPS: AI Coding from Terminal Anytime
- How to Fix Slow & Unreachable Websites: Complete Guide for Junior NOC
- How to Fix WordPress Malware Infection: Complete Guide for Beginners
Conclusion
This Telegram Bot for article requests is simple, free, and powerful. You no longer need to open a laptop to request articles — just chat from your phone, and within minutes your article is live with full SEO, Polylang support, and IndexNow notification.
Once you’ve set up your bot and it’s functioning, send your first chat: /artikel [your chosen topic] — and watch the magic happen.
Have questions or need help with the setup? Contact your NOC Engineer — we’re ready to assist.
Author: NOC Engineer — Syslog Solutions
Credentials: 5+ years building server automation and Telegram bots for technical writing workflows and WordPress content management.