An AI-powered RSS-to-LinkedIn auto-posting system using Google Gemini API and official LinkedIn API. Fully legal, cost-free, and production-ready.
- π€ AI Content Generation - Uses Google Gemini (free tier) to transform RSS articles into engaging LinkedIn posts
- π° Multi-Topic RSS Integration - Fetch "AI News" or "Dark Side of AI" from multiple sources
- π’ Company Filtering - Focus on major AI companies (Nvidia, OpenAI, Gemini, Claude, Perplexity, etc.)
- π€ LinkedIn Publishing - Official OAuth2 API integration for posting with image support
- π Queue Management - Queue articles, edit AI-generated content, schedule for later
- πΌοΈ Image Assets - Automatically download and attach images from articles
- π Deduplication - Automatic detection of already-processed articles
- β° Scheduled Posts - Set custom date/time for each post or daily automation
- π Secure Configuration - Environment-based secrets management
- π Structured Logging - Winston-based comprehensive logging
- β¨ Manual Approval Mode - Review and edit before posting
- Runtime: Node.js (latest LTS)
- Server: Express.js
- Database: PostgreSQL with Drizzle ORM
- AI: Google Gemini API (free tier)
- API: Official LinkedIn OAuth2 API
- Scheduling: node-cron
- Frontend: React + Vite + Tailwind CSS
- Forms: React Hook Form + Zod validation
- Logging: Winston
- Node.js 20.x or later
- PostgreSQL database
- Google Gemini API key (free)
- LinkedIn Developer App (OAuth2 credentials)
New to the Queue System? See QUEUE_FEATURES.md for:
- Complete API endpoint documentation
- Multi-topic RSS fetching guide
- Image handling and asset management
- Scheduled publishing workflow
- Troubleshooting and best practices
npm installCopy .env.example to .env and fill in your values:
cp .env.example .envRequired environment variables:
DATABASE_URL- PostgreSQL connection stringGEMINI_API_KEY- Get from Google AI StudioLINKEDIN_ACCESS_TOKEN- OAuth2 bearer tokenLINKEDIN_PERSON_URN- Your LinkedIn URN (urn:li:person:xxxxxxx)
Optional:
MANUAL_APPROVAL- Set totrueto save posts as drafts instead of auto-publishingDEBUG_MODE- Enable verbose logging
Push the schema to your database:
npm run db:pushOr manually apply the migration (see database_migration.sql).
- Create a LinkedIn Developer App
- Get your OAuth2 access token
- Get your LinkedIn Person URN using the LinkedIn API
npm run devServer runs on port 5000 with:
- Hot reload on file changes
- Console logging
- Error diagnostics
npm run build
npm startGET /api/posts
Returns array of all posts with metadata.
Example response:
[
{
"id": 1,
"articleUrl": "https://example.com/article",
"linkedinPostId": "...",
"title": "Article Title",
"contentSnippet": "...",
"generatedContent": "AI-generated post content...",
"published": true,
"createdAt": "2026-02-14T10:00:00Z"
}
]POST /api/posts
Content-Type: application/json
{
"articleUrl": "https://example.com",
"title": "Article Title",
"contentSnippet": "Snippet...",
"generatedContent": "Post content...",
"published": false
}
POST /api/posts/trigger
Manually runs the daily post cycle (fetch RSS β generate β publish).
The queue system allows you to:
- Fetch articles by topic (AI_NEWS or DARK_SIDE_AI)
- Add to queue with one-click auto-drafting
- Edit content before publishing
- Schedule posts for specific date/time
- Publish manually or let the scheduler handle it
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/queue |
View pending/draft posts |
| POST | /api/queue/fetch-articles |
Fetch articles by topic |
| POST | /api/queue/add |
Add article to queue |
| PUT | /api/queue/:id |
Edit draft content |
| POST | /api/queue/:id/schedule |
Schedule for publishing |
| POST | /api/queue/:id/publish |
Publish immediately |
| POST | /api/queue/publish-due |
Batch publish all due posts |
| DELETE | /api/queue/:id |
Cancel post |
π Full documentation: See QUEUE_FEATURES.md for complete endpoint specifications, workflow examples, and usage patterns.
Posts are automatically published daily at 9 AM UTC via the scheduler.
To change the schedule, edit server/routes.ts:
cron.schedule("0 9 * * *", async () => {
// 0 9 * * * = 9 AM every day
// Change the cron expression as needed
await postService.runDailyCycle();
});- RSS Fetch - Fetches latest articles from configured feeds
- Deduplication - Checks if article was already processed
- Content Generation - Sends article to Gemini API for LinkedIn-optimized content
- Storage - Saves draft to database
- Publishing - Posts to LinkedIn (or saves as draft if
MANUAL_APPROVAL=true) - Logging - Records success/failure with detailed logs
Currently configured feeds:
- Google News (AI topic)
- arXiv (Computer Science - AI)
To add more, edit server/services/rssService.ts.
Customize the AI prompt in server/providers/geminiProvider.ts to:
- Change tone (professional, casual, technical, etc.)
- Adjust length (currently 150-250 words)
- Add/remove hashtag requirements
- Specify content structure
Posts table structure:
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
article_url TEXT UNIQUE NOT NULL,
linkedin_post_id TEXT,
title TEXT,
content_snippet TEXT,
generated_content TEXT,
published BOOLEAN DEFAULT FALSE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
error TEXT
);Logs are written to console and files:
combined.log- All logserror.log- Errors only
Rotate logs based on file size in production.
npm run checknpm run db:pushPush schema changes to database.
MIT Β© 2026 Kamatchi Somesh
Contributions welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
For issues or questions:
- Check the logs (
combined.log,error.log) - Verify environment variables in
.env - Ensure database connectivity
- Review API credentials validity
This project uses:
- Official LinkedIn API - Compliant with LinkedIn's terms of service
- Legitimate RSS feeds - No web scraping or automation violations
- Free tier services - No paid APIs required
- Open source dependencies - Respects all licenses
Always ensure your automated posting complies with LinkedIn's automation policies and your target platform's terms of service.
Built with β€οΈ using modern Node.js, AI, and open-source technologies.