Automated LinkedIn posting system with AI-generated content, Todoist approval workflow, and Playwright browser automation.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ GitHub Action │────▶│ Groq (Llama) │────▶│ Todoist │
│ (Daily) │ │ (Generate) │ │ (Draft Queue) │
└─────────────────┘ └─────────────────┘ └────────┬────────┘
│
User reviews
& approves
│
┌─────────────────┐ ┌─────────────────┐ ┌────────▼────────┐
│ LinkedIn │◀────│ Playwright │◀────│ GitHub Action │
│ (Post Live) │ │ (Automate) │ │ (2-3x weekly) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
- Daily Draft Generation: GitHub Action runs daily, uses Llama 3.1 70B (via Groq) to generate LinkedIn posts
- Todoist Queue: Drafts appear as tasks in a "LinkedIn Drafts" project
- Human Approval: Review drafts in Todoist, add the
linkedin-approvedlabel to posts you want to publish - Automated Posting: Mon/Wed/Fri, Playwright automates posting approved content to LinkedIn
- Node.js 20+
- pnpm
- Groq API key (free at https://console.groq.com)
- Todoist API token
- LinkedIn account
pnpm installCopy .env.example to .env and fill in:
GROQ_API_KEY=gsk_...
TODOIST_API_TOKEN=your_todoist_api_token
LINKEDIN_EMAIL=your_email@example.com
LINKEDIN_PASSWORD=your_passwordAdd these secrets to your repository:
GROQ_API_KEYTODOIST_API_TOKENLINKEDIN_EMAILLINKEDIN_PASSWORD
pnpm generate# Dry run (preview only)
pnpm post:dry-run
# Actually post
pnpm postWorkflows run automatically:
generate-drafts.yml: Daily at 8:00 AM UTCpost-approved.yml: Mon/Wed/Fri at 7:30 AM UTC
- Drafts are created with the
linkedin-draftlabel - Review the draft content in the task description
- Add the
linkedin-approvedlabel to approve - The bot posts and marks the task complete with
linkedin-postedlabel
The AI generates posts based on:
- SSI/Web3 Identity (1x/week)
- Building in Public (1x/week)
- Young Founder Reality (1x/week)
- Tech Career (1x/2 weeks)
- Project Showcase (1x/2 weeks)
Posts follow LinkedIn algorithm best practices:
- Strong hooks in first 2 lines
- Short paragraphs (1-2 lines)
- 800-1500 characters
- French language
- No external links (put in comments)
src/
├── config/
│ ├── profile.ts # Professional context for AI
│ └── prompts.ts # System prompts for content
├── services/
│ ├── content-generator.ts # Groq/Llama integration
│ ├── todoist.ts # Draft queue management
│ └── linkedin.ts # Playwright automation
├── scripts/
│ ├── generate-drafts.ts # Entry point: create drafts
│ └── post-approved.ts # Entry point: publish content
└── utils/
├── env.ts # Environment config
├── logger.ts # Logging utility
└── random-delay.ts # Human-like delays
- LinkedIn credentials stored in GitHub Secrets
- Session cookies cached to reduce logins
- Human-like delays to avoid detection
- Never push
.envor.playwright-state/
Groq offers a free tier with Llama 3.1 70B - a powerful open-source model that works great for content generation. No credit card required.