π Automated pipeline that transforms emails (press releases) into WordPress articles using AI.
- π§ IMAP Monitoring - Automatic email fetching from any mailbox
- π€ Multi-AI Support - Claude, GPT-4, Gemini, or Ollama (local)
- π Preview Mode - Review articles before publishing
- π WordPress Publishing - Direct draft publishing via REST API
- βοΈ Web Dashboard - Full configuration interface with real-time notifications
- π Auto Mode - Fully automated workflow without manual intervention
- π¨ Custom Prompts - Customize AI instructions for your writing style
βββββββββββββββ
β IMAP Poller β β Fetch emails
ββββββββ¬βββββββ
βΌ
βββββββββββββββββββββββ
β Parser & Converter β β HTML β Markdown
ββββββββ¬βββββββββββββββ
βΌ
βββββββββββββββββββ
β AI Generator β β Generate article (Claude/GPT/Gemini/Ollama)
ββββββββ¬βββββββββββ
βΌ
βββββββββββββββββββ
β WordPress API β β Publish as draft
βββββββββββββββββββ
# Clone the repo
git clone https://github.com/mkarki/wordpress-article-maker.git
cd wordpress-article-maker
# Install dependencies
pip install -r requirements.txt
# Copy and configure
cp config.env.example config.env
# Edit config.env with your credentialsEdit config.env:
# Email IMAP (Gmail requires App Password)
IMAP_HOST=imap.gmail.com
IMAP_EMAIL=your-email@gmail.com
IMAP_PASSWORD=xxxx xxxx xxxx xxxx
# WordPress (create Application Password in WP Admin)
WP_URL=https://your-site.com
WP_USER=your-username
WP_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
# AI Provider (anthropic, openai, gemini, ollama)
AI_PROVIDER=anthropic
# Anthropic
ANTHROPIC_API_KEY=sk-ant-xxx
ANTHROPIC_MODEL=claude-sonnet-4-5-20250929
# OpenAI
OPENAI_API_KEY=sk-xxx
OPENAI_MODEL=gpt-4o
# Google Gemini
GEMINI_API_KEY=xxx
GEMINI_MODEL=gemini-1.5-pro
# Ollama (local)
OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3
# Options
CHECK_INTERVAL=300 # Check interval in seconds
TARGET_LANG=en # Target language
MAX_EMAILS_PER_CYCLE=5 # Max emails per cycle
AUTO_PUBLISH=false # Auto mode
FILTER_SENDER= # Filter by sender (optional)- Enable 2-Step Verification on your Google account
- Go to https://myaccount.google.com/apppasswords
- Create a password for "Mail"
- Copy the generated password (format:
xxxx xxxx xxxx xxxx)
- WordPress Admin β Users β Profile
- Section "Application Passwords"
- Create a new password
python run.py
# Open http://localhost:5050python app/main.pydocker build -t wordpress-article-maker .
docker run -d --env-file config.env -p 5050:5050 wordpress-article-makerThe web dashboard allows you to:
| Tab | Description |
|---|---|
| π§ Emails | View and select emails to process |
| π Pending Articles | Manage generated articles before publishing |
| π History | View articles published to WordPress |
| βοΈ Configuration | Configure IMAP, WordPress, AI provider and prompt |
| Provider | Models |
|---|---|
| Anthropic | Claude Sonnet 4.5, Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku |
| OpenAI | GPT-4o, GPT-4o Mini, GPT-4 Turbo, GPT-3.5 Turbo |
| Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini Pro | |
| Ollama | Any local model (llama3, mistral, etc.) |
- Claude Sonnet 4: ~$0.003 per article
- GPT-4o: ~$0.005 per article
- Gemini 1.5 Pro: ~$0.002 per article
- Ollama: Free (local)
wordpress-article-maker/
βββ app/ # Source code
β βββ __init__.py
β βββ dashboard.py # Flask dashboard
β βββ main.py # CLI mode
β βββ templates/
β βββ dashboard.html # Web interface
βββ data/ # Runtime data (not versioned)
βββ config.env # Configuration (not versioned)
βββ config.env.example # Configuration template
βββ requirements.txt # Python dependencies
βββ run.py # Entry point
βββ Dockerfile # Docker deployment
βββ README.md
βββ LICENSE
MIT License