A Telegram bot that extracts content from Twitter/X and websites, analyzes it with AI, and saves it to your Notion database.
- Extract and analyze tweets from Twitter/X
- Extract and analyze content from websites
- AI-powered categorization and insights
- Save entries to your Notion database
- Enhanced summaries with key points and action items
You need to set the following environment variables in Heroku:
TELEGRAM_BOT_TOKEN
: Your Telegram bot tokenOPENAI_API_KEY
: Your OpenAI API keyNOTION_API_KEY
: Your Notion API keyNOTION_DATABASE_ID
: Your Notion database ID
-
Install the Heroku CLI and login:
# Install Heroku CLI (if not already installed) # Login to Heroku heroku login
-
Create a new Heroku app:
heroku create your-app-name
-
Set up environment variables:
heroku config:set TELEGRAM_BOT_TOKEN=your_telegram_bot_token heroku config:set OPENAI_API_KEY=your_openai_api_key heroku config:set NOTION_API_KEY=your_notion_api_key heroku config:set NOTION_DATABASE_ID=your_notion_database_id
-
Deploy your code:
git add . git commit -m "Initial deployment" git push heroku main
-
Start the worker dyno:
heroku ps:scale worker=1
-
Check the logs:
heroku logs --tail
-
If you encounter issues with Playwright, you may need to install the browser dependencies:
heroku run python -m playwright install
-
If the bot is not responding, check the logs for errors:
heroku logs --tail
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file with your API keys - Run the bot:
python main.py --bot
MIT