Auto-Summarize Blog Posts to Social Media with Gemma and Postiz

Overview

This workflow automatically monitors an RSS feed (e.g., a blog), fetches the latest post, generates a concise summary and relevant hashtags using a local LLM (Ollama with Gemma), extracts an image from the post, and publishes the content to multiple social media platforms (Facebook, LinkedIn, X/Twitter, Instagram) via the Postiz API. It includes duplicate detection to avoid reposting the same content and runs on a schedule (every 10 minutes).

This is ideal for bloggers, content creators, or marketers who want to maintain an active social media presence without manual effort. By leveraging a local LLM, you keep your data private and avoid API costs, while Postiz centralizes posting to multiple platforms from a single workflow.

Node-by-Node Breakdown

  1. Schedule: Check RSS Every 10 Minutes (No auth) — Triggers the workflow every 10 minutes. Configured with an interval rule: every 10 minutes.

  2. Set RSS Feed URLs (No auth) — Sets the RSS feed URL as a string variable. Configured with a single assignment: Blog's Name = https://blogsname.blogspot.com/feeds/posts/default.

  3. Split RSS Feed URLs into Items (No auth) — Splits the incoming data by the field Blog's Name to create individual items for each feed URL.

  4. Fetch Latest RSS Feed Content (No auth) — Reads the RSS feed from the configured URL. Configured with url = https://blogsname.blogspot.com/feeds/posts/default.

  5. Loop Over RSS Items for Processing (No auth) — Iterates over each RSS item in batches. Configured with default options.

  6. Merge Processed Data Streams (No auth) — Combines data from two branches (RSS fetching and image processing) by position, including unpaired items.

  7. Select Latest RSS Item by Date (No auth) — JavaScript code node that sorts all items by pubDate descending and returns only the most recent one.

  8. Calculate Link Hash for Duplication Check (No auth) — JavaScript code node that computes a simple hash of the post link to use for duplicate detection.

  9. Read Last Posted Hash from File (No auth) — JavaScript code node that reads the previously posted link hash from a file at /.n8n/rss_last_posted.txt.

  10. Compare Hashes for Duplicate Check (No auth) — JavaScript code node that compares the current link hash with the last posted hash and sets shouldProceed flag. Also logs to a debug file.

  11. Conditional Check for New Post (No auth) — JavaScript code node that filters out items where shouldProceed is false, effectively stopping the workflow for already-posted content.

  12. Normalize RSS Fields (Content & Link) (No auth) — Set node that extracts and normalizes contentSnippet and link fields from the RSS item.

  13. Calculate Summary Character Limit (No auth) — JavaScript code node that calculates the maximum characters available for the summary (280 minus link length, buffer, and hashtag reserve).

  14. Generate Summary and Hashtags with LLM (No auth) — LangChain LLM chain node that sends a prompt to the local Ollama model. The prompt instructs the model to summarize the content in under maxChars characters, append 3 hashtags and the link.

  15. Configure Local LLM Model (Ollama) (No auth) — Configures the Ollama language model with model gemma3:12b. Requires a local Ollama instance running.

  16. Process LLM Output for Postiz (Extract Text/Hashtags/Link) (No auth) — JavaScript code node that parses the LLM output, extracting the text, hashtags, and link. Falls back to default hashtags if parsing fails.

  17. Save Temporary Link Hash to File (No auth) — JavaScript code node that writes the current link hash to a temporary file (/.n8n/rss_temp_url.txt) for later use.

  18. Validate Inputs for Postiz API (No auth) — JavaScript code node that validates that text, link, image ID, and image path are all present before posting.

  19. Create and Post Content via Postiz API (Postiz API auth) — HTTP Request node that sends a POST request to the Postiz API (https://postiz.selfhosteddomain.net/api/public/v1/posts) with the content, image, and platform settings for Facebook, LinkedIn, X/Twitter, and Instagram. Uses postizApi credential type.

  20. Save Posted Hash to File (No auth) — JavaScript code node that writes the successfully posted link hash to /.n8n/rss_last_posted.txt to prevent future duplicates.

  21. Fetch Blog Post HTML Content (No auth) — HTTP Request node that fetches the full HTML of the blog post to extract an image. Configured to return response as text.

  22. Extract Image URL from Post HTML (No auth) — JavaScript code node that parses the HTML to find the first image URL using regex.

  23. Filter Latest Item for Image Processing (No auth) — JavaScript code node that filters items with valid image URLs and takes only the latest one.

  24. Download Post Image (No auth) — HTTP Request node that downloads the image from the extracted URL. Configured to return response as a file.

  25. Transform/Resize Image for Upload (No auth) — Edit Image node that resizes the image to 1080x1080 pixels and converts to JPEG format.

  26. Upload Image to Postiz (Postiz API auth) — Postiz node that uploads the resized image to Postiz using the binary data from the previous node.

Setup Instructions

Prerequisites

  • n8n instance (self-hosted or cloud)
  • Ollama running locally with the gemma3:12b model (or another compatible model)
  • Postiz account (self-hosted or cloud) with API access
  • Blog RSS feed URL (e.g., Blogger, WordPress, Medium)

Credentials Needed

  1. Postiz API — Create an API key in your Postiz dashboard under Settings > API. Add as a credential in n8n.
  2. Ollama — No credentials needed if running locally; just ensure the Ollama service is accessible from n8n.

Configuration Steps

  1. Replace the RSS feed URL in the Set RSS Feed URLs node with your blog's RSS feed URL.
  2. Update the Configure Local LLM Model (Ollama) node with your Ollama endpoint if not running on the default.
  3. In the Create and Post Content via Postiz API node, replace the integration IDs with your actual Postiz integration IDs for each platform (Facebook, LinkedIn, X, Instagram).
  4. Update the Postiz API URL if self-hosted.
  5. Ensure the file paths (/.n8n/rss_last_posted.txt, /.n8n/rss_temp_url.txt, /.n8n/debug_log.txt) are writable by n8n.
  6. Activate the workflow.

Use Cases and Variations

Primary Use Case

Automatically repurpose blog content to social media with AI-generated summaries, ensuring consistent posting without manual effort.

Variations

  • Different LLM: Swap gemma3:12b for other Ollama models like llama3, mistral, or phi.
  • Different Platforms: Add or remove platform integrations in the Postiz API payload.
  • Custom Prompt: Modify the LLM prompt for different tones (professional, humorous, etc.) or different hashtag counts.
  • Image Handling: Change image resize dimensions or format, or skip image entirely.
  • Scheduling: Adjust the trigger interval (e.g., hourly, daily) or add time-based conditions.
  • Multiple Blogs: Extend the Set RSS Feed URLs node to include multiple feeds and loop over them.
  • Error Handling: Add error handling nodes (e.g., Slack notification on failure).
35 nodesschedule triggerSocial Media
PostizSticky NoteSplit OutRss Feed ReadSetCodeChain LlmLm Ollama

Workflow JSON

{
  "id": "5qiiLNNCnMfa0ACi",
  "meta": {
    "instanceId": "0dd3ae188cfd2b96467338af7f80668f3761b218fde5df5eff29cb57f9644576"
  },
  "name": "Auto-Summarize Blog Posts to Social Media with Gemma and Postiz",
  "tags": [],
  "nodes": [
    {
      "id": "4de18e8b-5e69-4635-8f9e-3c4b12ab82e9",
      "name": "Postiz (Create Post)",
      "type": "n8n-nodes-postiz.postiz",
      "disabled": true,
      "position": [
        4656,
        640
      ],
      "parameters": {
        "date": "2025-08-06T14:45:00",
        "posts": {
          "post": [
            {
              "value": {
                "contentItem": [
                  {
                    "image": {
                      "imageItem": [
                        {
                          "id": "={{ $('Upload Image to Postiz').item.json.id }}",
                          "path": "={{ $('Upload Image to Postiz').item.json.path }}"
                        }
                      ]
                    },
                    "content": "={{ $json.text ? $json.text : 'NO_TEXT' }} {{ $json.link ? $json.link : 'NO_LINK' }}"
                  }
                ]
              },
              "integrationId": "cmdt7mm7c0001uq6yoangez5f"
            },
            {
              "value": {
                "contentItem": [
                  {
                    "image": {
                      "imageItem": [
                        {
                          "id": "={{ $('Upload Image to Postiz').item.json.id }}",
                          "path": "={{ $('Upload Image to Postiz').item.json.path }}"
                        }
                      ]
// ... truncated (copy to see full JSON)

How to Import This Workflow

  1. 1Copy the workflow JSON above using the Copy Workflow JSON button.
  2. 2Open your n8n instance and go to Workflows.
  3. 3Click Import from JSON and paste the copied workflow.

Don't have an n8n instance? Start your free trial at n8nautomation.cloud

Related Templates

AI Viral Video Creator from Telegram with Voice & Multi-Platform Posting

🚀 Automatically Generate and Publish Viral TikTok-Style Videos from a Simple Telegram Message This workflow transforms a single Telegram message containing a photo and a theme (caption) into a fully-produced, AI-generated talking-head video optimized for viral social media content. It leverages Perplexity for trend research, OpenAI GPT-4 for script and caption generation, ElevenLabs for realistic voice synthesis, and FAL.ai's VEED Fabric model to create a lip-synced avatar video from the photo. The final video, along with an engaging caption and relevant hashtags, is saved to Google Sheets for tracking and then automatically published to up to nine social media platforms—TikTok, YouTube, Instagram, LinkedIn, Facebook, Twitter (X), Threads, Pinterest, and Bluesky—via the Blotato integration. This is an end-to-end content creation pipeline perfect for creators, marketers, and businesses who want to maintain a consistent, high-frequency posting schedule without manual video editing. It reduces the time from idea to published video to under 5 minutes. 📋 Node-by-Node Breakdown Telegram Trigger (Telegram Bot Token) — Listens for incoming messages containing a photo and caption. The trigger activates on updates. No additional filtering is applied; every photo with a caption will start the workflow. Workflow Configuration (No auth) — A static Set node that stores API keys and configuration values (ElevenLabs API key, voice ID, FAL API key, and the Perplexity model name) as workflow variables for easy maintenance. Extract Photo and Theme (No auth) — Extracts the largest photo file ID from the Telegram message and the caption (or text) as the theme. Falls back to "viral content" if no caption is provided. Get Photo File from Telegram (Telegram Bot Token) — Uses the Telegram Bot API to download the photo file specified by the file ID extracted in the previous step. Build Public Image URL (No auth) — Uploads the downloaded photo to to obtain a publicly accessible URL. This URL is later used by FAL.ai's VEED Fabric model. Search Trends with Perplexity (Perplexity API key) — Sends a query to Perplexity AI asking for the top 3 current viral trends related to the user's theme. The model is configured dynamically from the workflow configuration node. Generate Script with GPT-4 (OpenAI API key) — Uses OpenAI GPT-4o-mini to generate a 30-second TikTok script based on the trends found by Perplexity and the original theme. The prompt enforces a hook in the first 2 seconds and conversational tone. ElevenLabs Voice Synthesis (API key in header) — Sends the generated script to ElevenLabs' text-to-speech API with the configured voice ID, producing an MP3 audio file. Uses header for authentication. Convert .mpga to .mp3 (No auth) — A JavaScript Code node that renames the binary audio file from to and sets the correct MIME type, ensuring compatibility with downstream nodes. Upload Audio to Public URL (No auth) — Uploads the MP3 audio to to make it publicly accessible for FAL.ai. FAL.ai Video Generation (API key in header) — Sends a request to FAL.ai's VEED Fabric 1.0 endpoint with the public image URL and audio URL to generate a talking-head lip-sync video at 480p resolution. Authentication uses the header with the FAL API key. Wait for VEED (No auth) — A Wait node that pauses execution for 10 minutes to allow the video generation to complete. The node uses polling via webhook (not active here) but is configured as a timed wait. Download VEED Video (API key in header) — Periodically queries the FAL.ai request status endpoint (using the request ID from the generation response) to retrieve the completed video URL. Generate Caption with GPT-4 (OpenAI API key) — A second OpenAI node that creates an engaging TikTok caption with trending hashtags based on the same theme and trends. Outputs only the caption text. Save to Google Sheets (Google Sheets OAuth2) — Appends a new row to a Google Sheet with columns: IDEA (original theme), CAPTION, AUDIO URL, IMAGE URL, VIDEO URL. The sheet and document ID are expected to be configured via resource locator or expression. Send a video (Telegram Bot Token) — Sends the generated video back to the original Telegram chat as a confirmation. Upload Video to BLOTATO (Blotato API key) — Uploads the video file to Blotato's media storage, obtaining a hosted URL for distribution. TikTok / YouTube / LinkedIn / Facebook / Instagram / Twitter (X) / Threads / Bluesky / Pinterest (Blotato API key) — Nine parallel Blotato nodes that each publish the video to their respective social media accounts. Each node uses pre-configured account IDs (list mode) and the generated caption. YouTube optionally sets the video to "private" and disables subscriber notifications. Merge1 (No auth) — A Choose Branch merge node that waits for all nine social media publishing branches to complete before continuing. Update Status to "DONE" (Google Sheets OAuth2) — Updates the corresponding row in the Google Sheet (matched by video URL) to set the STATUS column to "DONE". 🔧 Setup Instructions To use this workflow, you'll need the following accounts and API keys: Telegram — Create a bot via @BotFather and get the bot token. Use it in the Telegram Trigger and Telegram nodes. ElevenLabs — Sign up at elevenlabs.io, generate an API key, and clone or select a voice. Note the Voice ID. FAL.ai — Sign up at fal.ai, create an API key from the dashboard. The workflow uses the VEED Fabric 1.0 model – no separate VEED subscription is needed. Perplexity AI — Sign up at perplexity.ai, get an API key from settings. OpenAI — Sign up at platform.openai.com, create an API key with access to GPT-4o-mini. Google Sheets — Create a Google Sheet with the required columns (IDEA, URL IMAGE, URL AUDIO, URL VIDEO, CAPTION, STATUS). Set up Google Sheets OAuth2 credentials in n8n. Blotato — Sign up at blotato.com, get an API key from settings. Install the community node in n8n (Settings → Community Nodes). Connect each social media account within Blotato to obtain account IDs. tmpfiles.org — No account required; the service is used for temporary file hosting. After obtaining all keys, update the Workflow Configuration node with your values and configure credentials for each API node (Telegram, Perplexity, OpenAI, Google Sheets, Blotato). The sticky notes in the canvas provide step-by-step visual guidance. 💡 Use Cases & Variations Content Repurposing: The workflow can be adapted to repurpose a blog post or article into a short video by feeding the text as a theme. Brand Voice: Customize the ElevenLabs voice to match your brand's tone. Trend-Driven Campaigns: Use Perplexity with different prompts to focus on niche topics (e.g., "tech startups", "healthy recipes"). Platform-Specific Formatting: Modify the caption generation prompt to include platform-specific elements (e.g., LinkedIn professional tone, Twitter character limit). Scheduling: Add a Schedule Trigger to run the workflow periodically with pre-defined themes from a spreadsheet instead of Telegram. Analytics: Extend the Google Sheet with additional columns for engagement metrics by integrating with social media analytics APIs. This workflow is fully modular; you can remove any of the Blotato publishing nodes if you only need specific platforms.

35 nodes

AI-Powered Social Media Post Automation from Google Trends

AI-Powered Social Media Post Automation from Google Trends This workflow automatically generates and publishes social media posts based on trending Google search queries. It combines Google Trends data, AI content generation, and multi-platform publishing to keep your social channels active with relevant, engaging content without manual effort. The workflow runs twice daily (at 6 AM and 6 PM) and follows a pipeline: fetch trending keywords → select the best topic → generate a human-like post using Perplexity AI → publish to X (Twitter), Facebook, and LinkedIn → log the activity in Google Sheets. This is ideal for marketers, social media managers, and content creators who want to maintain a consistent posting schedule with minimal intervention. How It Works Schedule Trigger — Runs the workflow twice daily at 6 AM and 6 PM (no auth required). Google Trends (HTTP Request) — Fetches related queries from Google Trends via SerpAPI. Uses API Key auth (the parameter is passed as a query parameter). It retrieves rising queries for the keyword "ai agents" in the US over the last 3 days. 2 Most Trending (Set) — Extracts the top two rising queries from the Google Trends response and structures them into a clean JSON object with and keys. High search volume keywords (Code) — Filters the top related queries to include only those with an extracted value (search volume increase) greater than 30, and joins them into a comma-separated string. Choosing Topic (OpenAI) — Uses GPT-3.5-turbo to select the most relevant keyword from the two trending options, based on the client's SEO goals and trendiness. Requires OpenAI API key. Research Topic- Perplexity (HTTP Request) — Sends the chosen topic to Perplexity's API (sonar-pro model) to generate a complete LinkedIn post. Uses Header Auth (HTTP Header Auth) with your Perplexity API key. The prompt instructs the AI to write a human-like, engaging post with Unicode formatting, bullet points, and a call-to-action. Wait — Pauses for 10 seconds to ensure the AI generation is complete and to avoid rate limits. Split Out — Splits the AI-generated content from the Perplexity response into separate items for each social platform. X1 (Twitter) — Publishes the post to X (Twitter) using OAuth2 authentication. Facebook Graph API1 — Publishes the post to a Facebook Page using OAuth2 authentication. LinkedIn1 — Publishes the post to LinkedIn using Community Management authentication (OAuth2). Google Sheets2 — Appends or updates a row in Google Sheets with the topic, AI output, status, and date posted. Uses OAuth2 authentication. Setup Instructions To use this workflow, you'll need accounts and credentials for the following services: SerpAPI — Sign up at serpapi.com and get an API key. Replace in the Google Trends node. OpenAI — Create an API key at platform.openai.com. Add it as a credential in n8n. Perplexity — Get an API key from perplexity.ai and set it as an HTTP Header Auth credential. X (Twitter) — Create a Twitter app and obtain OAuth2 credentials. Facebook — Create a Facebook app and get a Page Access Token with permission. LinkedIn — Create a LinkedIn app and get a Community Management token. Google Sheets — Create a Google Cloud project, enable Sheets API, and set up OAuth2 credentials. Replace the document ID and sheet name in the Google Sheets node. After setting up credentials, update the Google Sheets document ID and sheet name, and configure the LinkedIn person ID (replace ). Use Cases and Variations Content Marketing — Automate daily posting of trending topics to multiple platforms, saving hours of manual research and writing. SEO Blogging — Modify the workflow to generate full blog posts instead of social media posts and publish to a CMS like WordPress. Multi-Client Management — Adapt the workflow to handle multiple clients by adding a loop or using a different Google Sheets row for each client. Custom Keywords — Change the parameter in the Google Trends node to target different niches or industries. Additional Platforms — Add more social media nodes (e.g., Instagram, Pinterest) by connecting them to the Split Out node. Human Review — Insert a manual approval step (e.g., using the Wait node or a Slack notification) before publishing to ensure content quality.

18 nodes

AI Video Creation with Veo3 & Auto-Post to Social Media via Blotato

Automated Video Creation & Cross-Platform Publishing Workflow This workflow demonstrates a fully automated pipeline for generating short, viral-style videos using Google's Veo3 AI video model, then publishing them across multiple social media platforms via Blotato. It combines AI creativity, cloud video generation, and a social media scheduler — all orchestrated in n8n. Ideal for content creators, marketers, or anyone who wants to produce daily video content with minimal manual effort. The workflow runs on a schedule, generates unique video ideas and captions using GPT-4.1, creates a Veo3-compatible prompt, triggers video generation, uploads the result to Blotato, and posts to Instagram, YouTube, TikTok, Facebook, Threads, Twitter, LinkedIn, Bluesky, and Pinterest. All intermediate and final data is logged in Google Sheets for tracking. Node-by-Node Breakdown Trigger: Run Daily Script Generator (Schedule Trigger, No auth) — Runs the workflow daily based on the configured interval (default: not set; user should define a schedule). AI Agent: Generate Video Concept (LangChain Agent, OAuth2 / API Key — uses OpenAI) — Sends a user-provided topic (e.g., "a Yeti doing a vlog") to an OpenAI GPT-4.1 model with a strict system prompt that forces the output into a JSON array containing a caption, idea, environment description, and status. Requires an OpenAI credential configured in n8n. Tool: Inject Creativity (Tool, No auth) — A placeholder tool that can be extended to inject external creativity or research data (currently empty). LLM: Generate Idea & Caption (GPT-4.1) (Language Model, OpenAI) — The actual LLM call used by the agent. Uses model . Parser: Extract JSON from Idea (Output Parser, No auth) — Parses the LLM output into a structured JSON object, enforcing the schema defined in the node. Google Sheets: Save Script Idea (Google Sheets, OAuth2) — Appends the generated idea, caption, environment prompt, and status to a new row in a Google Sheet. Requires a Google Sheets credential and a configured sheet/document. AI Agent: Create Veo3-Compatible Prompt (LangChain Agent, OpenAI) — Takes the saved idea and environment, and asks GPT-4.1 to format a detailed, cinematic prompt suitable for Google Veo3. The system prompt enforces a strict structure (scene, character, dialogue, action, technical details). Tool: Build Prompt Structure (Tool, No auth) — Placeholder for potential future enhancements. LLM: Format Prompt for Veo3 (GPT-4.1) (Language Model, OpenAI) — The underlying LLM call for prompt generation. Call Veo3 API to Generate Video (HTTP Request, Header Auth) — Sends the Veo3 prompt as JSON to using a method. Authentication uses a generic HTTP Header credential (e.g., a Fal.ai API key passed in the header or similar). Expects a request ID in the response. Wait for Veo3 Processing (5 mins) (Wait, No auth) — Pauses execution for 5 minutes to allow Veo3 to generate the video. You may need to adjust this delay based on actual queue times. Retrieve Final Video URL from Veo3 (HTTP Request, Header Auth) — Polls the Veo3 status endpoint () with the same header auth to get the final video URL. Google Sheets: Log Final Video Output (Google Sheets, OAuth2) — Updates the row in the same sheet (matched by ) with the generated video URL and marks production as "done". Get my video (Google Sheets, OAuth2) — Reads the video metadata from the sheet (URL, description, title, etc.) for later posting. This node expects the sheet to have specific column headers (e.g., , , ). Assign Social Media IDs (Set, No auth) — Outputs a static JSON object containing placeholder social media account IDs (e.g., ). These must be replaced with real IDs from your Blotato account. Upload Video to Blotato (HTTP Request, Header Auth) — Uploads the video to Blotato's media API () using the URL from the sheet. Requires a personal header. INSTAGRAM, YOUTUBE, TIKTOK, FACEBOOK, THREADS, TWITTER, LINKEDIN, BLUESKY, PINTEREST (HTTP Request, Header Auth) — Each node posts the video to the respective platform via Blotato's endpoint. They include the uploaded media URL and the description from the sheet. Different platforms have additional parameters (e.g., YouTube title, TikTok privacy settings). All require the same Blotato API key. Google Sheets (Google Sheets, OAuth2) — Finally, updates the sheet with a "Publish" status and row number, marking successful publication. Setup Instructions Google Sheets: You need a Google Cloud project with the Sheets API enabled. Create an OAuth2 credential in n8n for Google Sheets and grant access to the spreadsheet you will use. The sheet must have columns: , , , , , , , , , , . You can adjust column names in the nodes. OpenAI: Obtain an API key from OpenAI and create a credential in n8n of type "OpenAI". The workflow uses model ; ensure your account has access. Veo3 (Fal.ai): This workflow uses the Fal.ai queue API. You need a Fal.ai account, create an API key, and set up a Header Auth credential in n8n with the key (likely as ). Blotato: Sign up at Blotato, connect your social media accounts, and get your API key from settings. Create a Header Auth credential in n8n with header name . Replace the placeholder social media IDs () in the Assign Social Media IDs node with the actual account IDs from Blotato (found in the Blotato dashboard or API). Schedule: Configure the Schedule Trigger to run at your desired frequency (e.g., daily at 9 AM). Use Cases & Variations Daily Content Machine: Set the schedule to run every morning, generating a fresh video idea and publishing across all your platforms automatically. Batch Creation: Modify the workflow to generate multiple ideas in one run (loop over the AI node or adjust the system prompt to output multiple concepts). Topic Injection: Change the hardcoded topic ("a Yeti speaking to a camera…") to a dynamic input — for example, pull trending topics from an RSS feed or a Google Sheet column. Platform Filtering: Remove nodes for platforms you don’t use, or add conditional logic to skip certain posts. Human Review: Insert a manual approval step before posting (e.g., using a webhook or an n8n manual trigger). Analytics: Add nodes to fetch engagement metrics from Blotato after posting and log them back to the sheet.

29 nodes

Ready to automate with n8n?

Get affordable managed n8n hosting with 24/7 support.