- Fork the Repository by clicking on the link below
https://github.com/alirezachali/Telegram-Bot-in-Cloudflare-Worker/fork
- Clone Repository
git clone https://github.com/[GITHUB-USERNAME]/Telegram-Bot-in-Cloudflare-Worker/
- Install wrangler package
cd Telegram-Bot-in-Cloudflare-Worker npm init -y npm install -D wrangler
- Open Cloudflare Dashboard https://dash.cloudflare.com.
- On the left side of the dashboard, select the
Workers & Pagessub-menu from theComputemenu. - In the page that opens. Click on the button, on the top right to
Create application. - Click on the
Start With Hello Word!option. - In this section, you must enter a desired name for your worker. And then click the
Deploybutton.
- On the page that opens, click on the
Settingstab, And click on the+Addbutton in theVariables and secretssection. - Select the
Secretoption in thetypesection. and EnterBOT_TOKENin theVariable namefield. You must also enter yourTelegram bot tokenin theValuesection. Finally, click on the Deploy button.
- In the
Settingstab, refer to theBuildsection. - Click on the
Connectbutton in theGit repositorysection. - In this section, select your GitHub account.
In step
5ofMake Worker in Cloudflare, put the name you chose for your worker in front of the"name":
{
"name": "Worker_name",
"main": "src/index.js",
"compatibility_date": "2026-08-07",
"secrets": {
"required": ["BOT_TOKEN"]
}
}