AI News Bot
๐ค Your AI-Powered News Assistant โ Stay informed with automated, personalized AI news digests delivered daily
๐ Quick Navigation
| โจ Features | ๐ Quick Start | โ๏ธ Configuration | ๐ค LLM Providers |
|---|---|---|---|
| ๐ Languages | ๐ง Email Setup | ๐ Webhooks | ๐ง Troubleshooting |
Features
- Multi-Provider LLM Support: Choose between Claude, DeepSeek, Gemini, Grok, or OpenAI for news generation
- Real-Time News Fetching: Fetches actual news from RSS feeds for accurate, up-to-date content
- AI-Powered News Generation: Generate comprehensive AI news digests using your preferred LLM provider
- Web Search Integration: Optional DuckDuckGo web search for additional news sources
- Beautiful Email Formatting: Automatically converts AI content to stunning HTML emails - no markdown, just clean professional design
- Customizable Prompts: 9 pre-built templates (comprehensive, research, business, technical, etc.) or create your own
- Multilingual Support: Generate news in 13+ languages including English, Chinese, Spanish, French, Japanese, and more
- Chinese News Sources: Built-in support for Chinese AI news sources (36Kr, JiQiZhiXin, etc.)
- Multiple Notification Channels: Supports email (Gmail SMTP), webhook, Slack, Telegram, and Discord notifications
- Flexible Configuration: Easy-to-customize topics and notification settings via YAML config
- Automated Scheduling: GitHub Actions workflow for daily automated execution
- Robust Error Handling: Comprehensive logging and retry logic
- Email Client Compatible: Works perfectly in Gmail, Outlook, Apple Mail, and mobile email apps
- Simple Email Setup: Just use your Gmail account with App Password - no third-party email service needed
๐ธ Example Screenshots
| Chinese Email | English Email |
|---|---|
![]() |
![]() |
| Chinese language digest example | English language digest example |
๐ Deployment Options
Choose your deployment method:
| Method | Configuration | When to Use |
|---|---|---|
| GitHub Actions | Repository Secrets | Automated daily runs (recommended) |
| Local Development | .env file |
Testing locally or manual runs on your computer |
๐ก Recommended: Use GitHub Actions for automated daily news delivery. Use local development for testing or customization.
Quick Start (GitHub Actions - Recommended)
GitHub Actions provides automated daily news delivery without any server setup. Configure once and receive news digests automatically.
Step 1: Fork or Clone the Repository
Fork this repository to your GitHub account, or clone it:
git clone <your-repo-url>
cd ai-news-bot
Step 2: Add GitHub Repository Secrets
Navigate to your GitHub repository:
Repository โ Settings โ Secrets and variables โ Actions โ Repository secrets โ New repository secret
Add the following secrets:
โ Required Secrets
| Secret Name | Example Value | Description |
|---|---|---|
LLM_PROVIDER |
claude, deepseek, gemini, grok, or openai |
LLM provider to use (default: claude) |
ANTHROPIC_API_KEY |
sk-ant-api03-xxx... |
Your Anthropic API key (if using Claude) |
DEEPSEEK_API_KEY |
sk-xxx... |
Your DeepSeek API key (if using DeepSeek) |
GOOGLE_API_KEY |
AIza... |
Your Google API key (if using Gemini) |
XAI_API_KEY |
xai-... |
Your xAI API key (if using Grok) |
OPENAI_API_KEY |
sk-... |
Your OpenAI API key (if using OpenAI) |
NOTIFICATION_METHODS |
email |
Notification channels (comma-separated) |
๐ง Email Secrets (if using email notifications)
| Secret Name | Example Value | Description |
|---|---|---|
GMAIL_ADDRESS |
[email protected] |
Your Gmail address |
GMAIL_APP_PASSWORD |
xxxx xxxx xxxx xxxx |
Gmail App Password (Get one here) |
EMAIL_TO |
[email protected] |
Recipient email address |
See Email Setup Guide for detailed Gmail configuration instructions.
๐ Optional Secrets
| Secret Name | Example Value | Description |
|---|---|---|
AI_RESPONSE_LANGUAGE |
zh or es or en,zh,ja |
Language code(s) (defaults to en). Use commas for multiple languages |
ENABLE_WEB_SEARCH |
true or false |
Enable web search for news (defaults to false) |
For other notification channels (Webhook, Slack, Telegram, Discord), see the full configuration table.
Step 3: Enable GitHub Actions
Ensure GitHub Actions are enabled:
Repository โ Settings โ Actions โ General โ Allow all actions and reusable workflows
Step 4: Test Your Setup
Manually trigger the workflow to verify everything works:
Repository โ Actions tab โ Daily AI News Digest โ Run workflow button
Step 5: Automated Daily Delivery
The workflow runs automatically every day at midnight UTC (8:00 AM Beijing time). To customize the schedule, edit .github/workflows/daily-news.yml:
schedule:
- cron: "0 0 * * *" # Midnight UTC (current)
- cron: "0 9 * * *" # 9:00 AM UTC
- cron: "0 */12 * * *" # Every 12 hours
๐ Done! You'll now receive automated AI news digests daily.
Local Development (Optional)
For testing or running manually on your computer:
1. Clone the Repository
git clone <your-repo-url>
cd ai-news-bot
2. Install Dependencies
pip install -r requirements.txt
3. Configure Environment Variables
Copy the example file and fill in your credentials:
cp .env.example .env
Edit .env with your actual values:
# LLM Provider Configuration
LLM_PROVIDER=claude # Options: 'claude' or 'deepseek'
# API Keys (provide the one you're using)
ANTHROPIC_API_KEY=your_api_key_here # For Claude
DEEPSEEK_API_KEY=your_deepseek_api_key # For DeepSeek
# Gmail Configuration (easy setup!)
[email protected]
GMAIL_APP_PASSWORD=xxxx xxxx xxxx xxxx # 16-char App Password (NOT your Gmail password)
[email protected]
# Optional: Webhook Configuration
WEBHOOK_URL=https://your-webhook-url.com/endpoint
# Notification Methods (comma-separated)
# Available: email, webhook, slack, telegram, discord
NOTIFICATION_METHODS=email,webhook
# Language Settings (optional, defaults to 'en')
# Single language:
AI_RESPONSE_LANGUAGE=zh
# Multiple languages (comma-separated):
# AI_RESPONSE_LANGUAGE=en,zh,ja
# Web Search (optional, defaults to false)
ENABLE_WEB_SEARCH=false
Note: The
.envfile is only for local development. For GitHub Actions automation, you'll configure these as GitHub Secrets (see GitHub Actions Setup below).
4. Customize News Prompt (Optional)
The bot uses an optimized, concise prompt (15 lines vs 50+ in typical systems) that generates high-quality news digests.
Default Prompt (in config.yaml):
Summarize 10 recent AI news items (5 international + 5 domestic) covering: {topics}
Format:
International News:
1. [Headline]
[2-3 sentence summary]
Source: [Name]
Domestic News:
1. [Headline]
...
Rules: Recent news, no markdown, clear language
Why it's concise:
- โ Faster processing
- โ Lower cost
- โ Easier to maintain
- โ No redundancy
Multi-Language Support:
Prompts are in English (best for Claude), but output can be in 13+ languages:
# In .env file - Single language
AI_RESPONSE_LANGUAGE=zh # Chinese output only
AI_RESPONSE_LANGUAGE=es # Spanish output only
AI_RESPONSE_LANGUAGE=ja # Japanese output only
# Multiple languages (comma-separated)
AI_RESPONSE_LANGUAGE=en,zh,ja # English, Chinese, and Japanese
AI_RESPONSE_LANGUAGE=en,es,fr # English, Spanish, and French
# Supports: en, zh, es, fr, ja, de, ko, pt, ru, ar, hi, it, nl
Pre-built Templates (config.examples.yaml):
- Comprehensive (default) - Balanced coverage
- Research - Academic focus
- Business - Industry & funding
- Technical - Engineering depth
- Startup - Early-stage companies
- Policy - Regulations
- Weekly - Top stories
- Concise - Ultra-brief
- Chinese - ไธญๆ็คบไพ
๐ Full Guide: See config.examples.yaml for customization and multi-language details.
5. Run Locally
python main.py
Configuration
Configuration Variables
The bot requires the following configuration. How you set them depends on your deployment:
- Local Development: Use
.envfile (see Quick Start) - GitHub Actions: Use GitHub Repository Secrets (see GitHub Actions Setup)
| Variable | Required | Description |
|---|---|---|
LLM_PROVIDER |
Optional | LLM provider: claude, deepseek, gemini, grok, or openai (default: claude) |
ANTHROPIC_API_KEY |
If using Claude | Your Anthropic API key (Get it here) |
DEEPSEEK_API_KEY |
If using DeepSeek | Your DeepSeek API key (Get it here) |
GOOGLE_API_KEY |
If using Gemini | Your Google API key (Get it here) |
XAI_API_KEY |
If using Grok | Your xAI API key (Get it here) |
OPENAI_API_KEY |
If using OpenAI | Your OpenAI API key (Get it here) |
NOTIFICATION_METHODS |
โ Required | Comma-separated list: email, webhook, slack, telegram, discord, or any combination (e.g., email,slack,telegram) |
AI_RESPONSE_LANGUAGE |
Optional | Language code(s) for AI responses (default: en). Use commas for multiple (e.g., en,zh,ja). Supports: zh, es, fr, ja, de, ko, pt, ru, ar, hi, it, nl |
ENABLE_WEB_SEARCH |
Optional | Enable web search for news (default: false) |
GMAIL_ADDRESS |
If using Gmail | Your Gmail address |
GMAIL_APP_PASSWORD |
If using Gmail | Gmail App Password (16 characters, NOT regular password) |
EMAIL_TO |
If using email | Recipient email address |
WEBHOOK_URL |
If using webhook | Webhook endpoint URL |
SLACK_WEBHOOK_URL |
If using Slack | Slack Incoming Webhook URL |
SLACK_CHANNEL |
Optional | Override default Slack channel (e.g., #general) |
SLACK_USERNAME |
Optional | Override bot username for Slack (default: AI News Bot) |
TELEGRAM_BOT_TOKEN |
If using Telegram | Telegram Bot API token from @BotFather |
TELEGRAM_CHAT_ID |
If using Telegram | Telegram chat ID (user, group, or channel ID) |
DISCORD_WEBHOOK_URL |
If using Discord | Discord Webhook URL |
DISCORD_USERNAME |
Optional | Override bot username for Discord (default: AI News Bot) |
DISCORD_AVATAR_URL |
Optional | Custom avatar URL for Discord bot |
Configuration File (config.yaml)
The config.yaml file allows you to customize the news digest behavior:
LLM Configuration:
- Provider: Choose between
claude,deepseek,gemini,grok, oropenai - Model: Optionally specify a specific model version
News Configuration:
- use_real_sources: Enable fetching news from RSS feeds (recommended, default: true)
- enable_web_search: Enable DuckDuckGo web search (default: false)
- max_items_per_source: Maximum news items per source (default: 10)
- Topics: Focus areas for news selection (optional, guides the AI)
- Prompt Template: The instruction template for the LLM
- Default: Comprehensive 15-20 item digest with category headers
- Fully customizable with your own prompts
- See
config.examples.yamlfor 9 pre-built templates
Logging Settings: Control log verbosity and format
Example Structure:
llm:
provider: claude # options: 'claude', 'deepseek', 'gemini', 'grok', 'openai'
# model: claude-sonnet-4-5-20250929 # optional
news:
use_real_sources: true
enable_web_search: false
max_items_per_source: 10
topics:
- "Large Language Models (LLM)"
- "AI Agents and Autonomous Systems"
- "Product launches"
prompt_template: |
Your custom prompt...
Focus: {topics}
logging:
level: INFO
format: "%(asctime)s - %(levelname)s - %(message)s"
LLM Provider Configuration
The bot supports 5 LLM providers. Configure in config.yaml or via environment variables:
Claude (Anthropic) - Latest Sonnet 4.5
llm:
provider: claude
model: claude-sonnet-4-5-20250929 # optional, uses default if not set
Available Models:
claude-sonnet-4-5-20250929- Claude Sonnet 4.5 (default) - Most capable model with advanced reasoningclaude-3-5-sonnet-20241022- Previous Sonnet 3.5 version
Pricing: $3 input / $15 output per million tokens
DeepSeek - Advanced Reasoning Model
llm:
provider: deepseek
model: deepseek-reasoner # optional, uses default if not set
Available Models:
deepseek-reasoner- DeepSeek-R1 reasoning model (default) - Extended thinking capabilitiesdeepseek-chat- General chat model
Pricing: Extremely cost-effective with reasoning capabilities
Google Gemini - Gemini 3 Pro
llm:
provider: gemini
model: gemini-3-pro-preview # optional, uses default if not set
Available Models:
gemini-3-pro-preview- Latest Gemini 3 Pro (default) - Next-gen multimodal AIgemini-2.0-flash-thinking-exp-01-21- Gemini 2.0 with thinking mode
Pricing: Free tier available, very cost-effective for production
xAI Grok - Fast Reasoning Model
llm:
provider: grok
model: grok-4-1-fast-reasoning # optional, uses default if not set
Available Models:
grok-4-1-fast-reasoning- Grok 4.1 with fast reasoning (default) - Real-time updates & deep thinkinggrok-2-latest- Previous Grok 2 version
Pricing: Competitive pricing with real-time data access
OpenAI - GPT-5.1
llm:
provider: openai
model: gpt-5.1 # optional, uses default if not set
Available Models:
gpt-5.1- GPT-5.1 (default) - Latest flagship model with enhanced capabilitieso1- O1 reasoning modelgpt-4o- GPT-4 Optimized
Pricing: Premium pricing for state-of-the-art performance
Choosing a Provider
| Provider | Pros | Best For |
|---|---|---|
| Claude | Sonnet 4.5 - Top reasoning & quality | Production, complex analysis |
| DeepSeek | R1 reasoning model - Ultra low cost | Budget-conscious, extended reasoning |
| Gemini | Gemini 3 Pro - Fast & multimodal | High-volume, multimodal tasks |
| Grok | 4.1 Fast Reasoning - Real-time data | Up-to-date info, quick reasoning |
| OpenAI | GPT-5.1 - Latest flagship model | Cutting-edge performance, general use |
Language Configuration
How It Works:
- Prompts are always in English (best for Claude understanding)
- Output can be in 13+ languages (automatic translation)
- Set
AI_RESPONSE_LANGUAGEin.envor GitHub Secrets
Supported Languages:
en (English) โข zh (ไธญๆ) โข es (Espaรฑol) โข fr (Franรงais) โข ja (ๆฅๆฌ่ช) โข de (Deutsch) โข ko (ํ๊ตญ์ด) โข pt (Portuguรชs) โข ru (ะ ัััะบะธะน) โข ar (ุงูุนุฑุจูุฉ) โข hi (เคนเคฟเคจเฅเคฆเฅ) โข it (Italiano) โข nl (Nederlands)
Usage:
# .env file - Single language
AI_RESPONSE_LANGUAGE=zh # Full Chinese output
# .env file - Multiple languages (comma-separated)
AI_RESPONSE_LANGUAGE=en,zh,ja # Generate news in English, Chinese, and Japanese
# GitHub Secret
# Add: AI_RESPONSE_LANGUAGE = zh
# Or for multiple: AI_RESPONSE_LANGUAGE = en,zh,ja
Multi-Language Support:
When you specify multiple languages (e.g., en,zh,ja), the bot will:
- Generate separate news digests for each language
- Send individual notifications for each language
- Include the language code in the notification title (e.g., "AI News Digest - 2024-12-03 [ZH]")
Example Output (Chinese):
ๅฝ้
ๆฐ้ป๏ผ
1. OpenAIๅๅธGPT-5ๅขๅผบๆจ็่ฝๅ
OpenAIๅๅธไบGPT-5...
ๆฅๆบ๏ผOpenAIๅฎๆนๅๅฎข
The system automatically adds: "IMPORTANT: Please respond entirely in Chinese (ไธญๆ)" to the prompt.
GitHub Actions Setup
The project includes a GitHub Actions workflow that runs daily at midnight UTC (00:00).
Important: GitHub Actions uses Repository Secrets for configuration (NOT environment variables). All settings must be added as secrets.
Step 1: Add GitHub Repository Secrets
Navigate to your GitHub repository:
Repository โ Settings โ Secrets and variables โ Actions โ Repository secrets โ New repository secret
Add the following secrets one by one:
โ Required Secrets
| Secret Name | Example Value | Description |
|---|---|---|
LLM_PROVIDER |
claude or deepseek |
LLM provider to use (default: claude) |
ANTHROPIC_API_KEY |
sk-ant-api03-xxx... |
Your Anthropic API key (if using Claude) |
DEEPSEEK_API_KEY |
sk-xxx... |
Your DeepSeek API key (if using DeepSeek) |
NOTIFICATION_METHODS |
email,slack,telegram |
Notification channels (comma-separated) |
๐ง Email Secrets (if using email notifications)
| Secret Name | Example Value | Description |
|---|---|---|
GMAIL_ADDRESS |
[email protected] |
Your Gmail address |
GMAIL_APP_PASSWORD |
xxxx xxxx xxxx xxxx |
Gmail App Password (Get one here) |
EMAIL_TO |
[email protected] |
Recipient email address |
๐ Webhook Secrets (if using webhook notifications)
| Secret Name | Example Value | Description |
|---|---|---|
WEBHOOK_URL |
https://example.com/webhook |
Your webhook endpoint URL |
๐ฌ Slack Secrets (if using Slack notifications)
| Secret Name | Example Value | Description |
|---|---|---|
SLACK_WEBHOOK_URL |
https://hooks.slack.com/services/... |
Slack Incoming Webhook URL |
SLACK_CHANNEL |
#ai-news |
(Optional) Override default channel |
SLACK_USERNAME |
AI News Bot |
(Optional) Override bot username |
๐ฑ Telegram Secrets (if using Telegram notifications)
| Secret Name | Example Value | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
123456:ABC-DEF... |
Telegram Bot API token from @BotFather |
TELEGRAM_CHAT_ID |
123456789 |
Chat ID (use @userinfobot to get your ID) |
๐ฎ Discord Secrets (if using Discord notifications)
| Secret Name | Example Value | Description |
|---|---|---|
DISCORD_WEBHOOK_URL |
https://discord.com/api/webhooks/... |
Discord Webhook URL |
DISCORD_USERNAME |
AI News Bot |
(Optional) Override bot username |
DISCORD_AVATAR_URL |
https://example.com/avatar.png |
(Optional) Custom avatar URL |
๐ Optional Secrets
| Secret Name | Example Value | Description |
|---|---|---|
AI_RESPONSE_LANGUAGE |
zh or es or ja |
Language code (defaults to en if not set) |
ENABLE_WEB_SEARCH |
true or false |
Enable web search for news (defaults to false) |
Step 2: Enable GitHub Actions
Ensure GitHub Actions are enabled in your repository settings:
Repository โ Settings โ Actions โ General โ Allow all actions and reusable workflows
Step 3: Manual Trigger (Test Your Setup)
Once secrets are configured, test your setup:
Repository โ Actions tab โ Daily AI News Digest โ Run workflow button
This will run the workflow immediately so you can verify everything is working.
Step 4: Customize Schedule (Optional)
The workflow runs daily at midnight UTC by default. To change the schedule, edit .github/workflows/daily-news.yml:
schedule:
- cron: "0 0 * * *" # Midnight UTC daily (current)
- cron: "0 9 * * *" # 9:00 AM UTC daily
- cron: "0 */6 * * *" # Every 6 hours
Use crontab.guru to create custom schedules.
Project Structure
ai-news-bot/
โโโ .github/
โ โโโ workflows/
โ โโโ daily-news.yml # GitHub Actions workflow
โโโ src/
โ โโโ __init__.py
โ โโโ config.py # Configuration management
โ โโโ logger.py # Logging utilities
โ โโโ news_generator.py # News generation orchestration
โ โโโ news_fetcher.py # RSS feed news fetching
โ โโโ web_search.py # DuckDuckGo web search integration
โ โโโ llm_providers/
โ โ โโโ __init__.py
โ โ โโโ base_provider.py # Base LLM provider interface
โ โ โโโ claude_provider.py # Anthropic Claude provider
โ โ โโโ deepseek_provider.py # DeepSeek provider
โ โโโ notifiers/
โ โโโ __init__.py
โ โโโ email_notifier.py # Email notification
โ โโโ webhook_notifier.py # Webhook notification
โโโ main.py # Main application entry point
โโโ config.yaml # Active configuration file
โโโ requirements.txt # Python dependencies
โโโ .env.example # Example environment variables
โโโ .gitignore
โโโ README.md
โโโ README.zh.md # Chinese documentation
Usage Examples
Email Only
NOTIFICATION_METHODS=email
Slack Only
NOTIFICATION_METHODS=slack
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
Telegram Only
NOTIFICATION_METHODS=telegram
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
Discord Only
NOTIFICATION_METHODS=discord
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR/WEBHOOK/URL
Multiple Channels
NOTIFICATION_METHODS=email,slack,telegram,discord
Email Format
Beautiful, Email-Friendly Design
The bot generates email-optimized content that looks stunning across all email clients:
Features:
- โ No markdown formatting (clean, professional appearance)
- โ Automatic HTML conversion with beautiful styling
- โ Numbered news cards with visual badges
- โ Color-coded sections and headers
- โ Mobile-responsive layout
- โ Works in Gmail, Outlook, Apple Mail, and all mobile apps
What recipients see:
- Clean white container with professional styling
- Blue section headers with subtle borders
- Numbered news items in styled cards
- Italicized source citations
- Comfortable reading experience on any device
Example Email Screenshots:
| Chinese Email | English Email |
|---|---|
![]() |
![]() |
| Chinese language digest | English language digest |
Preview your emails: Run the bot locally and check the generated HTML email content.
Email Setup Guide
Gmail SMTP is the easiest way to send emails - just use your existing Gmail account!
Step 1: Enable 2-Step Verification
- Go to your Google Account Security
- Click on 2-Step Verification
- Follow the prompts to enable it (required for App Passwords)
Step 2: Create an App Password
- Go to Google App Passwords
- Or: Google Account โ Security โ 2-Step Verification โ App passwords
- Select app: Mail
- Select device: Other (enter "AI News Bot")
- Click Generate
- Copy the 16-character password (looks like:
xxxx xxxx xxxx xxxx)
โ ๏ธ Important: This is NOT your regular Gmail password. Keep this App Password safe!
Step 3: Configure Environment
# Gmail Configuration
[email protected]
GMAIL_APP_PASSWORD=xxxx xxxx xxxx xxxx
[email protected]
NOTIFICATION_METHODS=email
That's it! Your Gmail is ready to send news digests.
Troubleshooting Gmail
- "Authentication failed": Make sure you're using the App Password, not your regular password
- "Less secure apps": This is outdated. Use App Passwords instead
- Can't find App Passwords: You must enable 2-Step Verification first
Notification Channels Setup
Webhook Integration
The webhook sends a JSON payload:
{
"title": "AI News Digest - 2025-10-25",
"content": "... news digest content ...",
"timestamp": "2025-10-25T09:00:00",
"source": "AI News Bot"
}
Compatible with:
- Microsoft Teams
- Custom webhook endpoints
- Any service that accepts JSON webhooks
Slack Setup
-
Create a Slack App
- Go to https://api.slack.com/apps
- Click "Create New App" โ "From scratch"
- Name your app (e.g., "AI News Bot") and select your workspace
-
Enable Incoming Webhooks
- In your app settings, go to "Incoming Webhooks"
- Toggle "Activate Incoming Webhooks" to On
- Click "Add New Webhook to Workspace"
- Select the channel where you want to receive news
- Copy the webhook URL
-
Configure in .env
NOTIFICATION_METHODS=slack SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL SLACK_CHANNEL=#ai-news # Optional: override default channel
Features:
- Rich message formatting with blocks
- Color-coded attachments
- Mobile-friendly notifications
- Channel and username customization
Telegram Setup
-
Create a Telegram Bot
- Open Telegram and search for @BotFather
- Send
/newbotcommand - Follow the prompts to name your bot
- Copy the API token provided
-
Get Your Chat ID
- Start a chat with your new bot
- Send any message to the bot
- Search for @userinfobot and send it any message
- It will reply with your user ID (this is your chat_id)
- Alternatively, for groups: add your bot to a group and use @getidsbot
-
Configure in .env
NOTIFICATION_METHODS=telegram TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz TELEGRAM_CHAT_ID=123456789
Features:
- HTML and Markdown formatting support
- Automatic message splitting for long content
- Works with users, groups, and channels
- Mobile and desktop notifications
For Channel/Group:
- Add your bot to the channel/group as an administrator
- Use the channel/group ID as TELEGRAM_CHAT_ID
- Channel IDs start with
-100(e.g.,-1001234567890)
Discord Setup
-
Create a Webhook
- Open your Discord server
- Go to Server Settings โ Integrations โ Webhooks
- Click "New Webhook"
- Name it (e.g., "AI News Bot")
- Select the channel for news
- Copy the webhook URL
-
Configure in .env
NOTIFICATION_METHODS=discord DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR/WEBHOOK/URL DISCORD_USERNAME=AI News Bot # Optional
Features:
- Rich embed formatting with colors
- Automatic content splitting for long messages
- Custom bot name and avatar
- Works on desktop and mobile
Advanced Options:
- Set custom avatar:
DISCORD_AVATAR_URL=https://example.com/avatar.png - Multiple embeds for better organization
- Color-coded sections (default: blue #0366d6)
Error Handling
- Automatic Retries: The news generator retries up to 3 times on failure
- Graceful Degradation: If one notification method fails, others still execute
- Comprehensive Logging: All operations are logged with timestamps and context
- GitHub Actions Artifacts: Error logs are uploaded for debugging
Troubleshooting
"Config file not found" Error
Ensure config.yaml exists in the project root.
Email Not Sending
- Make sure you're using an App Password, not your regular Gmail password
- Verify 2-Step Verification is enabled on your Google account
- Check that
GMAIL_ADDRESSandGMAIL_APP_PASSWORDare set correctly - App Password should be 16 characters (with or without spaces)
Webhook Failing
- Verify webhook URL is accessible
- Check webhook endpoint accepts JSON POST requests
- Review webhook service logs
API Errors
- Verify
ANTHROPIC_API_KEYis valid - Check API quota/rate limits
- Review Anthropic API status
Development
Running Tests (when available)
pytest
Local Development
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the bot
python main.py
License
GPL-3.0 License - See LICENSE file for details
Support
- Discord Community: Join our Discord server for discussions, support, and updates
- GitHub Issues: For bug reports and feature requests, use the GitHub issue tracker
Credits
Powered by:
โญ Star History
Made with โค๏ธ by the open source community

