🗺️ N8N Automation Roadmap - LLM-Enhanced Blog Publishing
Project: Obsidian → N8N → Multilingual Website with
AI Enhancement
Created: 2025-11-06
Status: Phase 1 Complete ✅ | Phase 2+ Planning 🎯
📌 Vision
Build a fully automated blog publishing system that: - Converts Markdown articles to professionally designed HTML - Translates content automatically (EN ↔︎ FR) - Optimizes titles and content with LLM - Applies consistent styling (CSS/JS) - Requires ZERO manual intervention
🎯 Current State (Phase 1 - COMPLETED)
What Works Now ✅
- ✅ Markdown file detection in Obsidian vault
- ✅ YAML frontmatter parsing (title, date, category, status)
- ✅ Markdown to HTML conversion (Pandoc)
- ✅ Professional HTML template with:
- Header with navigation
- Breadcrumb trail
- Article metadata (date, reading time, category, tags)
- Footer with social links
- Mobile-responsive design
- ✅ Static CSS/JS integration (dark cybersecurity theme)
- ✅ File output to
/website/en/[category]/[slug].html
Current Workflow (11 Nodes)
1. Manual/Schedule Trigger
2. Find Markdown Files (find command)
3. Extract File Paths (Code JS)
4. Read Binary Files
5. Decode Binary to Text (Code JS)
6. Extract YAML Frontmatter (Code JS)
7. Validate Metadata (Code JS)
8. IF - Check Validation
9. Determine Output Path (Code JS)
10. Generate HTML with Template (Code JS - WORKFLOW_FINAL_V2.js)
11. Write HTML File (Execute Command)
Limitations 🚧
- ❌ No automatic translation (only EN articles)
- ❌ No LLM content optimization
- ❌ No title enhancement
- ❌ No SEO improvements
- ❌ Manual CSS/JS updates needed
- ❌ No content quality checks
🚀 Phase 2: LLM Translation Integration
Goal: Automatically translate every article to French (EN → FR)
New Nodes to Add (5 nodes)
12. Code: Prepare Translation Request
├─> Extract text content from HTML
├─> Build prompt with technical terms to preserve
└─> Output: Clean text for translation
13. OpenAI/Anthropic Node: Translate to French
├─> Model: GPT-4o or Claude Opus
├─> Input: English article text
├─> Prompt: "Translate to French, keep technical terms unchanged"
└─> Output: French text
14. Code: Generate French HTML
├─> Take translation output
├─> Apply same template as English
├─> Update language metadata (lang="fr")
└─> Update breadcrumbs to French
15. Execute Command: Write French HTML
└─> Output: /website/fr/[category]/[slug].html
16. Code: Update Language Map
├─> Create/update ARTICLE_LANGUAGE_MAP.json
├─> Link EN ↔ FR versions
└─> Enable language switcher in navigation
Translation Strategy
Approach: Text-Only Translation (Safest)
// Pseudo-code for Node 12
const articleText = extractTextFromHTML($json.fullHtmlDocument);
const translationPrompt = `
Translate this technical blog article to French.
IMPORTANT RULES:
1. Keep all code blocks unchanged (bash, python, yaml, etc.)
2. Keep these technical terms in English:
- Proxmox, pfSense, Kali Linux, Docker, N8N, Pandoc
- All command names, file paths, URLs
3. Translate naturally, not word-for-word
4. Maintain the same tone (technical, professional)
Article:
${articleText}
`;
return { prompt: translationPrompt, text: articleText };LLM Model Selection: | Model | Cost/1M tokens | Quality | Speed | Recommendation | |——-|—————-|———|——-|—————-| | GPT-4o | $2.50 | ⭐⭐⭐⭐⭐ | Fast | Best choice | | Claude Opus | $15.00 | ⭐⭐⭐⭐⭐ | Medium | Premium quality | | GPT-4o-mini | $0.15 | ⭐⭐⭐⭐ | Very Fast | Budget option | | Local Mistral 7B | Free | ⭐⭐⭐ | Slow | Privacy-focused |
Recommended: GPT-4o (best balance of cost/quality/speed)
Cost Estimation
- Average article: 2000 words ≈ 3000 tokens
- GPT-4o cost: $0.015 per article
- 100 articles: ~$1.50
- 1000 articles: ~$15
Expected Timeline
- Setup: 2-3 hours
- Testing: 1-2 hours with sample articles
- Full deployment: After testing 5-10 articles successfully
💰 Total Cost Estimation (All Phases)
| Phase | LLM Calls | Cost/Article | Notes |
|---|---|---|---|
| Phase 2: Translation | 1 | $0.015 | Required |
| Phase 3: Title/SEO | 2 | $0.001 | Optional |
| Phase 4: Correction | 1 | $0.008 | Conditional |
| Phase 5: FR→EN | 1 | $0.015 | If needed |
| Phase 6: Related | 1 | $0.002 | Optional |
| Total | 2-6 | $0.02-0.04 | Per article |
For 100 articles: $2-4
For 1000 articles: $20-40
Annual cost (assuming 200 new articles/year): ~$6-8
🎯 Recommended Implementation Order
NOW (Week 1-2): Phase 2 Only
Focus on translation ONLY. Get EN→FR working perfectly. - Add 5 translation nodes - Test with 10 articles - Verify quality - Deploy if satisfied
LATER (Month 2): Phase 3
Add title optimization once translation is stable.
FUTURE (Month 3+): Phase 4-6
Advanced features once core workflow is rock solid.
🚨 Potential Issues & Mitigation
Issue 1: LLM Hallucination (Adding False Info)
Risk: LLM might add technical details that are wrong
Mitigation:
// In correction prompt
"CRITICAL: Do not add any new information.
Only fix grammar and improve existing text.
If unsure, leave text unchanged."Issue 2: Breaking Code Blocks
Risk: LLM might translate code or command names
Mitigation:
// Pre-process: Extract code blocks
const codeBlocks = extractCodeBlocks(markdown);
const textOnly = removeCodeBlocks(markdown);
// Translate text only
const translatedText = await translateWithLLM(textOnly);
// Re-insert code blocks
const finalMarkdown = insertCodeBlocks(translatedText, codeBlocks);Issue 3: High LLM Costs
Risk: Processing 1000 articles = $40
Mitigation: - Use caching (only translate NEW articles) - Use cheaper models for simple tasks (GPT-4o-mini) - Make LLM steps optional (toggle on/off) - Batch process during off-peak hours
📚 Required Resources
N8N Nodes/Integrations
- ✅ Execute Command (already used)
- ✅ Code (JavaScript) (already used)
- ✅ Read/Write Binary Files (already used)
- ⭐ NEW: OpenAI node (for GPT-4)
- ⭐ NEW: Anthropic node (for Claude)
- Optional: HTTP Request (for custom LLM APIs)
External Services
- OpenAI API (GPT-4o, GPT-4o-mini)
- Create account: https://platform.openai.com
- Cost: Pay-as-you-go (~$5 minimum)
- Anthropic API (Claude Opus/Sonnet)
- Create account: https://console.anthropic.com
- Cost: Pay-as-you-go (~$5 minimum)
- Alternative: Local LLM (Ollama)
- Free, but slower and lower quality
- Setup:
ollama pull mistralorollama pull llama3
🎯 Final Thoughts
What’s Most Important NOW?
- Translation (Phase 2) - This unlocks bilingual audience
- Keep workflow SIMPLE initially
- Test extensively before automation
- Measure quality before scaling
What Can Wait?
- Title optimization (nice-to-have)
- Content correction (only if quality issues persist)
- Advanced features (after 100+ articles)
Key Philosophy
“Automate the repetitive, enhance the creative, preserve the authentic.”
- Let LLM handle: Translation, SEO, grammar
- Keep human control: Technical accuracy, content strategy, design decisions
- Maintain quality: Always review LLM output initially
This roadmap is a living document. Update it as the project evolves! 🌱
Created by: OpenCode (Claude)
For: Omar LYAHYAI - N8N Automation Project
Last Updated: 2025-11-06
Status: Ready for Phase 2 Implementation 🚀