How to Create a Telegram Google Drive Upload Bot

Introduction |

Hello guys. Today I will be showing How to Create a Telegram Google Drive Upload Bot. We have seen how to create several types of Telegram bots. We shall be deploying the bot to Heroku. Now let’s learn How to Create a Telegram Google Drive Upload Bot.

Requirements

  1. Heroku Account
  2. Termux apk on Android

How to Create a Telegram Google Drive Upload Bot

Install Heroku CLI in Termux on your Android device. It is best to use the npm package to install Heroku because it offers the complete CLI just like you find on the official website. In addition, we need to install git. If you already have these packages installed on your Termux, you can skip this step.

pkg install nodejs

Then,

npm i -g heroku

Then,

pkg install git

Now run the update and upgrade cmd

apt update && apt upgrade

Then login to Heroku CLI and your Github account using the below codes.

heroku login # This will open a prompt which will ask you to login via browser to authenticate your session in the CLI

Login to your GitHub account

git config --global user.email "email" # Replace email in the quotes with your Github email address

Then,

git config --global user.name "username" # Replace username in quotes with your Github Username

The next step is to clone the repo onto your local storage on your Android phone. Navigate to a location where you wish to clone your repo into and run the following cmd:

How to Create a Telegram Google Drive Upload Bot
aryanvikash/Google-Drive-Uploader
Telegram bot To upload Files To Google Drive Remotely @gdriveupme_bot (outdated) - aryanvikash/Google-Drive-Uploader

git clone https://github.com/aryanvikash/Google-Drive-Uploader

Then,

cd Google-Drive-Uploader

Next Create Your Google Drive api Credential. Select the Other Type option when asked.

If you already have a credentials.json file on your phone, just copy it from where you saved it on your phone to the root directory of the Google Drive Upload Bot.

Now copy your credentials.json file into the root directory of the bot repo and rename it as client_secrets.json by running this code:

mv credentials.json client_secrets.json

Next run this codes to edit the creds.py file

nano creds.py

Input your Bot token obtained from Botfather and also input your Team Drive or Google Drive ID and the folder ID where you want your uploaded files to be saved. This step is essential if you want to use a Team Drive as your upload destination.

Then install the requirements.

pip3 install requirements.txt

Next, run the following codes to deploy your bot to Heroku. Check your list of Heroku apps. If you are using the Heroku free account without a credit card linked to it, you can create a maximum of five apps. If you have reached this limit, you can delete an app on Heroku before you deploy this one.

heroku apps # Lists all your current Heroku apps

If you wish to delete an app on Heroku, you can run this code using the heroku CLI

heroku apps:destroy app_name # This will destroy/delete the app_name specified by you

Create a new heroku app to deploy your Gdrive Upload bot into:

heroku create app_name # Replace app_name with your desired app name. Only lower case letters allowed.

If you already have a Heroku app you wish to use for this bot, you can specify and select the app using the below cmd:

heroku git:remote -a app_name # Replace app-name with your own

Next add your locally cloned repo to your git remote repo:

git add .

Then, commit the changes made:

git commit -m "Commit message" # Specify a commit message of your choice

Next, push the changes to your remote:

git push heroku master

You can add the following commands to your Botfather setCommand option for your Bot:

start - Start Message
auth - Authorise You
revoke - Delete Your Saved credential
help - help Text

Now your bot should respond. If it doesn’t you can restart dynos for the bot using this codes below:

heroku ps:scale worker=0 # Stops dynos running on the app 

Then,

heroku ps:scale worker=1 # Restarts dyno on the app

If you want to see the logs for troubleshooting of your bot in action, run this code in another Termux tab:

heroku logs --tail -a app_name # Replace app_name with yours.

Thereafter go to your bot, click on the /help to seee the introduction to the bot. Click on /auth and follow the link to authorise your bot to upload to your Team Drive. To upload files to your Team Drive, just send a link of the file to your Google Drive Upload Bot

ETTM Video Guide

Conclusion

That’s it guys. Now you can deploy your own Google drive Upload bot using Heroku for FREE. Don’t forget to subscribe to EduTechTainMent to get notified whenever we publish such informative posts and also join us on Telegram. Subcribe to the EduTechTainMent YouTube guide.

How to Create a Telegram Google Drive Upload Bot

EduTechTainMent - Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable
Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable

How to Create a Telegram Google Drive Upload Bot
EduTechTainMent.com Group
This is the Official Telegram Group Chat of EduTechTainMent.com "Over Every Possessor of Knowledge, There is (Some) One (Else) More Knowledgeable".

How to Create a Telegram Google Drive Upload Bot
EduTechTainMent Guides
This channel is dedicated to providing information about education and information technology in a fun way! 😉 Blog: Https://EduTechTainMent.com Over Every P...

Get Free Email Updates from EduTechTainMent!

Signup now and receive an email once I publish new content.

I agree to have my personal information transfered to MailChimp ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Follow/Contact EduTechTainMent:
No Comments

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next