Skip to content

dzakyputra/automatebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

automatebot

Read the full tutorial in my medium

Check the bot in here, type /send command to see the example of image visualization.

This bot will automate your reporting task by querying the data to bigquery, doing visualization, and automatically send the image through Telegram Chat.

Requirements

Steps

Install the libraries.

pip3 install google-cloud-bigquery matplotlib numpy pandas python-telegram-bot

Create a developer account to access Google BigQuery API, you can follow the Getting Started steps in here

Configure the path.

export GOOGLE_APPLICATION_CREDENTIALS='[PATH_TO_CREDS.JSON]'

Run the program.

python3 main.py

Edit

You can customize the query based on your needs.

query = """ 
            YOUR_QUERY_HERE
        """

You can also configure when the bot has to send the image visualization.

updater.job_queue.run_daily(send_image, time=datetime.datetime.strptime('YOUR_TIME', '%I:%M%p').time(), days=(0,1,2,3,4,5,6))

About

This bot will automate your reporting task by querying the data from Google BigQuery, create a visualization, and automatically send the image through Telegram Chat.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages