An intelligent cryptocurrency news aggregator that automatically scrapes, summarizes, and delivers breaking crypto news to your Slack workspace using AI-powered analysis.
- 🔍 Smart News Scraping: Automatically scrapes content from top crypto news sources
- 🤖 AI-Powered Summaries: Uses OpenAI GPT-4 to generate concise, impactful news summaries
- 📅 Scheduled Updates: Daily digest at 9 AM + periodic updates throughout the day
- 🔄 Change Detection: Intelligent content comparison to avoid spam notifications
- 💬 Slack Integration: Seamless delivery to your Slack workspace via webhooks
- 🧠 Caching System: Efficient content caching to minimize API calls
- CoinDesk - Leading cryptocurrency news and analysis
- Decrypt - Blockchain and crypto technology coverage
- Cointelegraph - Comprehensive crypto market news
- Node.js 18+
- npm or yarn
- Slack workspace with webhook access
- OpenAI API account
- Hyperbrowser API account
-
Clone the repository
git clone <repository-url> cd crypto-news-bot
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:HYPERBROWSER_API_KEY=your_hyperbrowser_api_key_here OPENAI_API_KEY=your_openai_api_key_here SLACK_WEBHOOK_URL=your_slack_webhook_url_here
Get your Hyperbrowser API key at hyperbrowser.ai
- Sign up for a Hyperbrowser account
- Navigate to your dashboard
- Generate an API key
- Add it to your
.envfile
- Visit OpenAI Platform
- Create an account and navigate to API keys
- Generate a new API key
- Add it to your
.envfile
- Go to your Slack workspace settings
- Navigate to Apps → Custom Integrations → Incoming Webhooks
- Create a new webhook for your desired channel
- Copy the webhook URL to your
.envfile
npm run start
# or
npx tsx crypto-news-bot.tsnpm run devnpm run build
npm run start:prodThe bot runs automatically on the following schedule:
- 📊 Daily Digest: Every day at 9:00 AM
- 🔄 News Updates: At 1:00 PM, 5:00 PM, and 9:00 PM (only when significant changes detected)
- Scraping: Uses Hyperbrowser to scrape content from crypto news websites
- Processing: Extracts relevant articles and content in markdown format
- Analysis: OpenAI analyzes the content for significant changes and generates summaries
- Delivery: Posts formatted summaries to your Slack channel
- Caching: Stores content locally to enable intelligent change detection
🚨 Daily Crypto Digest
• Bitcoin Surges Past $45K: Major institutional adoption drives price momentum
• Ethereum 2.0 Staking Rewards: New mechanism increases validator participation
• SEC Crypto Regulations: Latest guidance impacts DeFi protocol compliance
• Altcoin Season Indicators: Market analysis shows potential rotation incoming
Edit the sources array in crypto-news-bot.ts:
const sources = [
"https://www.coindesk.com",
"https://decrypt.co",
"https://cointelegraph.com",
// Add your preferred crypto news sources
];Modify the cron expressions:
// Daily digest at 9 AM
cron.schedule("0 9 * * *", () => main(true));
// Updates at 1 PM, 5 PM, 9 PM
cron.schedule("0 13,17,21 * * *", () => main());Update the SYSTEM_PROMPT variable to change how news is summarized:
const SYSTEM_PROMPT = `Your custom summarization instructions here...`;crypto-news-bot/
├── crypto-news-bot.ts # Main application logic
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── .env # Environment variables (create this)
├── crypto_news_cache.json # Auto-generated cache file
└── README.md # This file
Import Errors: Make sure all dependencies are installed:
npm install
npm install --save-dev @types/nodeAPI Rate Limits: The bot includes intelligent caching to minimize API calls
Slack Delivery Issues: Verify your webhook URL is correct and the channel permissions allow bot posts
Add console logs or set environment variables for debugging:
DEBUG=true npm start- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the ISC License.
- Hyperbrowser for web scraping capabilities
- OpenAI for AI-powered summarization
- Slack for communication platform
- The crypto community for inspiration
⚡ Ready to stay ahead of crypto news? Get started in minutes! 🚀