Skip to content

A telegram bot shares the list of ebooks with URL, reader can clicks on the link to read the PDF

Notifications You must be signed in to change notification settings

WingsMaker/ebooks_readerbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

ebooks_readerbot

A telegram bot shares the list of ebooks with URL, reader can clicks on the link to read the ebooks file.

ebooks_bot.mp4

Requirements

Getting Started - Google App Script Project

[1] Goto https://script.google.com/home

Click "New Project"

image

[2] Rename the project

Click on the "Untitled project" to rename the project as something else. Example, "Ebooks bot".

image

[3] Write the scripts, copy paste from below template url :

https://raw.githubusercontent.com/WingsMaker/ebooks_readerbot/main/ebooks_readerbot.txt

image

[4] Deploy as google web app

In the Google App Script project, go to "Publish" in the top navigation bar. Under "Deploy as web app", select "Deploy". This will open a pop-up window. Your web app URL will be listed in the "Current web app URL" field.

Click on the "Deploy - New Deployment"

image

Click "Select type - Web App"

image

Fill in the form and click "Deploy". ( for more see https://www.youtube.com/watch?v=-AlstV1PAaA )

image

Copy the web app url to the clipboard for later use.

[5] Update the values of webhook in the script.

Change the value of statement, paste the url address into here.

var webhook = "_your web app url";

[6] Update the values of token in the script.

Find your Telegram chatbot token by logging into the BotFather in Telegram, selecting your bot, and clicking the "API Token" button. ( see https://www.youtube.com/watch?v=aNmRNjME6mE )

Change the value of statement, paste the bot token into here.

var token = "your telegram bot token__";

[7] Update the values of FOLDER_NAME in the script.

If your ebooks in located at the "eBooks" folder in the google drive, leave it alone. Otherwise, update the value of FOLDER_NAME.

var FOLDER_NAME = "eBooks"; // assuming there is a folder called eBooks in your google drive.

[8] Save the script and REDO the deployment process in step 4

since the code has been changed, need to udpate the value of webhook in [7].

[9] Run the "setWebhook" function for only once to make sure actual telegram bot able to callback this google web app.

image

Your telegram bot is ready !

About

A telegram bot shares the list of ebooks with URL, reader can clicks on the link to read the PDF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published