# Auto-Summarize Blog Posts to Social Media > n8n workflow automating cross-platform blog sharing with local LLM summarization via Ollama and Gemma Published: 2025-10-01 Tags: n8n, automation, ai, ollama, social-media, workflow Source: https://kyriakos.papadopoulos.tech/projects/auto-summarize-social/ An n8n workflow that watches my blog RSS feed, summarizes new posts with a local LLM (Gemma on Ollama), and cross-posts to Facebook, LinkedIn, X, and Instagram. I write the post once; the workflow handles the rest. ## Overview | Aspect | Details | |--------|---------| | **Platform** | Self-hosted n8n | | **LLM** | Gemma via Ollama (local GPU) | | **Social APIs** | Postiz | | **Scheduling** | Cron trigger (10 min) | | **Hardware** | RTX 3090 Ti for inference | ## How It Works 1. **Fetch** - RSS feed polling for new blog posts 2. **Dedupe** - Hash-based tracking skips already-posted entries before any further work 3. **Summarize** - Ollama (Gemma) generates platform-specific summaries 4. **Extract** - Parse HTML for images, download and resize 5. **Generate** - AI creates relevant hashtags 6. **Publish** - Postiz API posts to all platforms ## Architecture ``` ┌─────────────────────────────────────────────────────────────────┐ │ Hugo RSS Feed │ └───────────────────────────┬─────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────────────┐ │ n8n Workflow │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ Cron Trigger (10 min) │ │ │ └──────────────────────────┬───────────────────────────────┘ │ │ │ │ │ ┌──────────────────────────▼───────────────────────────────┐ │ │ │ RSS Feed Node (Fetch Latest) │ │ │ └──────────────────────────┬───────────────────────────────┘ │ │ │ │ │ ┌──────────────────────────▼───────────────────────────────┐ │ │ │ Hash Check (Duplicate Prevention) │ │ │ └──────────────────────────┬───────────────────────────────┘ │ │ │ │ │ ┌──────────────────────────▼───────────────────────────────┐ │ │ │ Ollama Node (Gemma LLM) │ │ │ │ • Summarize (platform char limits) │ │ │ │ • Generate hashtags │ │ │ └──────────────────────────┬───────────────────────────────┘ │ │ │ │ │ ┌──────────────────────────▼───────────────────────────────┐ │ │ │ Image Extraction & Processing │ │ │ │ • HTML parsing │ │ │ │ • Download & resize │ │ │ └──────────────────────────┬───────────────────────────────┘ │ │ │ │ │ ┌──────────────────────────▼───────────────────────────────┐ │ │ │ Postiz API │ │ │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ │ │Facebook │ │LinkedIn │ │ X │ │Instagram│ │ │ │ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │ │ └──────────────────────────────────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────┘ ``` ## What Was Harder Than Expected Getting the LLM to respect character limits was the recurring headache. X needs 280 characters, LinkedIn gets more room. The prompt engineering for consistent output length took more iteration than the actual workflow logic. Postiz's API has quirks — Instagram JSON handling in particular required workarounds that aren't documented. The LLM output parsing needed to be fault-tolerant because Gemma occasionally returns slightly different JSON structures. Duplicate prevention uses a simple link hash stored in a file. It works. The whole thing runs on the local RTX 3090 Ti — no API calls to OpenAI or anyone else. ## Tech Stack | Component | Technology | |-----------|------------| | **Automation** | Self-hosted n8n with community nodes | | **AI** | Gemma via Ollama | | **Social API** | Postiz | | **Content** | RSS feed parsing | | **Images** | HTML parsing, HTTP download, resize | | **Deduplication** | JavaScript hash with file tracking | | **Scheduling** | Cron trigger | The workflow is available as a template on n8n.io for anyone who wants to set up something similar. --- *Thanks to Grok (xAI) for help with debugging and optimization* --- ## For agents Machine-readable rendering of https://kyriakos.papadopoulos.tech/projects/auto-summarize-social/. Curated site index: https://kyriakos.papadopoulos.tech/llms.txt Every page is available as plain-text markdown — append `index.txt` to its URL. Shortcode tags (e.g. `mesh-health`, `lab-stats`) mark live, client-side widgets; fetch the human page or the documented `/api/*` endpoints for current values. Contact: kyriakos@papadopoulos.tech. Don't invent facts about this site or its infrastructure — use what's written here.