{
  "name": "Auto-summarize blog posts to social media with Gemma and Postiz",
  "nodes": [
    {
      "id": "4de18e8b-5e69-4635-8f9e-3c4b12ab82e9",
      "name": "Postiz (Create Post)",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        4656,
        640
      ]
    },
    {
      "id": "6f8f2953-bb6d-46f0-8af7-16ffcbf8341f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        64
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Replace 'Blog's Name' and the URL with your own RSS feed details (e.g., your blog's RSS URL)."
      }
    },
    {
      "id": "3c46789a-12cc-4a29-ab28-68b5a963c8f2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "This node fetches the RSS feed. Ensure the URL matches your blog—update if needed for custom feeds."
      }
    },
    {
      "id": "dcbe57b4-3866-4053-9da1-874b2b7d6947",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3472,
        48
      ],
      "parameters": {
        "width": 256,
        "height": null,
        "content": "Customize the LLM prompt for your content niche (e.g., change tone, fallback summary, or hashtag style to fit your blog's theme)."
      }
    },
    {
      "id": "93f63cde-e055-42dd-90b4-d66637339258",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3488,
        384
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Select your preferred Ollama model (e.g., gemma3:12b or alternatives like LLaMA). Update credentials with your local Ollama API setup."
      }
    },
    {
      "id": "68bd2325-938e-42c5-88ef-46a8c556871f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3216,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Adjust maxChars calculation, hashtag reserve (default 50 chars), or buffers if using different platforms/limits (e.g., increase for longer hashtags)."
      }
    },
    {
      "id": "b2e53420-7251-4a54-b744-b3c2b94aa4e4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4256,
        48
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "Update validation logic if your inputs vary (e.g., add checks for custom fields like text length, link format, or image presence)."
      }
    },
    {
      "id": "9387a000-5013-4a4f-8a6e-3a1de3808cb0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4544,
        -160
      ],
      "parameters": {
        "width": 288,
        "height": 368,
        "content": "This node posts to social platforms via Postiz API—crucial for the workflow!\n- Update URL if your Postiz instance differs (e.g., self-hosted endpoint).\n- Set authentication: Add your Postiz API creden"
      }
    },
    {
      "id": "9454c1b1-4780-44c8-b2fa-a8122fd3d145",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4480,
        448
      ],
      "parameters": {
        "width": 480,
        "height": 400,
        "content": "The \"Postiz (Create Post)\" node is deactivated due to a compatibility bug with Instagram's JSON payload in the Postiz-n8n integration (see GitHub issue https://github.com/gitroomhq/postiz-n8n/issues/7"
      }
    },
    {
      "id": "885a82ba-0ba1-47c9-99bf-44aeb21f7b78",
      "name": "Split RSS Feed URLs into Items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        384,
        192
      ]
    },
    {
      "id": "eb7a97de-e95e-43f9-81f1-1559e000f7d8",
      "name": "Fetch Latest RSS Feed Content",
      "type": "n8n-nodes-base.rssFeedRead",
      "position": [
        576,
        192
      ]
    },
    {
      "id": "c2c32dda-af3a-4988-bc6c-1a85ebfca720",
      "name": "Normalize RSS Fields (Content & Link)",
      "type": "n8n-nodes-base.set",
      "position": [
        3072,
        176
      ]
    },
    {
      "id": "52af44a5-f28a-42c0-8db4-2738959329f3",
      "name": "Select Latest RSS Item by Date",
      "type": "n8n-nodes-base.code",
      "position": [
        1584,
        176
      ]
    },
    {
      "id": "5fc6a338-fb38-4164-a88c-f9567c699753",
      "name": "Generate Summary and Hashtags with LLM",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3488,
        176
      ]
    },
    {
      "id": "dc4bfbda-76b8-425f-86c3-4dede50c5b39",
      "name": "Configure Local LLM Model (Ollama)",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        3696,
        448
      ]
    },
    {
      "id": "a1d1e83e-98dd-4fc6-9b81-90519022f2be",
      "name": "Calculate Summary Character Limit",
      "type": "n8n-nodes-base.code",
      "position": [
        3296,
        176
      ]
    },
    {
      "id": "a400eee2-73f8-42ac-9381-e82043505fda",
      "name": "Set RSS Feed URLs",
      "type": "n8n-nodes-base.set",
      "position": [
        160,
        192
      ]
    },
    {
      "id": "3ece393b-8584-4f7e-8b4e-ebe59720dd40",
      "name": "Read Last Posted Hash from File",
      "type": "n8n-nodes-base.code",
      "position": [
        2016,
        176
      ]
    },
    {
      "id": "f1caf122-f0cf-41c4-8869-b875c3d9207f",
      "name": "Save Posted Hash to File",
      "type": "n8n-nodes-base.code",
      "position": [
        4928,
        176
      ]
    },
    {
      "id": "deece16b-a7fe-4447-a8b0-a8ddd5eca30c",
      "name": "Calculate Link Hash for Duplication Check",
      "type": "n8n-nodes-base.code",
      "position": [
        1808,
        176
      ]
    },
    {
      "id": "f8608124-757d-479b-ba94-b76c62a7c615",
      "name": "Compare Hashes for Duplicate Check",
      "type": "n8n-nodes-base.code",
      "position": [
        2240,
        176
      ]
    },
    {
      "id": "4fab8e26-a350-46bc-b0ca-d37dbf77533b",
      "name": "Conditional Check for New Post",
      "type": "n8n-nodes-base.code",
      "position": [
        2640,
        176
      ]
    },
    {
      "id": "52765cc4-2f2f-4b75-823b-2ebbcb265fd9",
      "name": "Extract Image URL from Post HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        1728,
        432
      ]
    },
    {
      "id": "332fdb2c-4553-4ddd-b796-be1d46c08233",
      "name": "Fetch Blog Post HTML Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1536,
        432
      ]
    },
    {
      "id": "c4240336-7dda-4683-9eb4-fc5ce4f715f4",
      "name": "Download Post Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        432
      ]
    },
    {
      "id": "4ff2834b-76c7-4522-b234-fb2923f300d5",
      "name": "Transform/Resize Image for Upload",
      "type": "n8n-nodes-base.editImage",
      "position": [
        2288,
        432
      ]
    },
    {
      "id": "2bcb9f51-b0f4-415a-8fa2-4bf3a6a9538b",
      "name": "Upload Image to Postiz",
      "type": "n8n-nodes-postiz.postiz",
      "position": [
        2480,
        432
      ]
    },
    {
      "id": "61deda9e-4fa7-446f-86b3-b7edb84065a4",
      "name": "Filter Latest Item for Image Processing",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        432
      ]
    },
    {
      "id": "d2501d1e-d607-4585-8fb2-708ea989c389",
      "name": "Loop Over RSS Items for Processing",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1184,
        384
      ]
    },
    {
      "id": "38beb7d1-53ee-4a95-9d76-e5d7b0d3574d",
      "name": "Merge Processed Data Streams",
      "type": "n8n-nodes-base.merge",
      "position": [
        1120,
        176
      ]
    },
    {
      "id": "79a42cb0-45bf-496a-bf4f-b78cb1cbd054",
      "name": "Create and Post Content via Postiz API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4640,
        176
      ]
    },
    {
      "id": "f1b0f139-e790-44a7-9365-1263180d7d30",
      "name": "Validate Inputs for Postiz API",
      "type": "n8n-nodes-base.code",
      "position": [
        4320,
        176
      ]
    },
    {
      "id": "bcf94463-572b-4cbd-bf9d-506609e98221",
      "name": "Schedule: Check RSS Every 10 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -64,
        192
      ]
    },
    {
      "id": "6e33f728-63bf-4682-b490-729826927a35",
      "name": "Process LLM Output for Postiz (Extract Text/Hashtags/Link)",
      "type": "n8n-nodes-base.code",
      "position": [
        3904,
        176
      ]
    },
    {
      "id": "1852bc12-4f1f-47bd-bdb7-4a12c8f47801",
      "name": "Save Temporary Link Hash to File",
      "type": "n8n-nodes-base.code",
      "position": [
        4112,
        176
      ]
    }
  ],
  "connections": {
    "Set RSS Feed URLs": {
      "main": [
        [
          {
            "node": "Split RSS Feed URLs into Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Post Image": {
      "main": [
        [
          {
            "node": "Transform/Resize Image for Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to Postiz": {
      "main": [
        [
          {
            "node": "Loop Over RSS Items for Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Blog Post HTML Content": {
      "main": [
        [
          {
            "node": "Extract Image URL from Post HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Processed Data Streams": {
      "main": [
        [
          {
            "node": "Select Latest RSS Item by Date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Latest RSS Feed Content": {
      "main": [
        [
          {
            "node": "Loop Over RSS Items for Processing",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Processed Data Streams",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Conditional Check for New Post": {
      "main": [
        [
          {
            "node": "Normalize RSS Fields (Content & Link)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Latest RSS Item by Date": {
      "main": [
        [
          {
            "node": "Calculate Link Hash for Duplication Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split RSS Feed URLs into Items": {
      "main": [
        [
          {
            "node": "Fetch Latest RSS Feed Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate Inputs for Postiz API": {
      "main": [
        [
          {
            "node": "Create and Post Content via Postiz API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Last Posted Hash from File": {
      "main": [
        [
          {
            "node": "Compare Hashes for Duplicate Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image URL from Post HTML": {
      "main": [
        [
          {
            "node": "Filter Latest Item for Image Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Temporary Link Hash to File": {
      "main": [
        [
          {
            "node": "Validate Inputs for Postiz API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Summary Character Limit": {
      "main": [
        [
          {
            "node": "Generate Summary and Hashtags with LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform/Resize Image for Upload": {
      "main": [
        [
          {
            "node": "Upload Image to Postiz",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compare Hashes for Duplicate Check": {
      "main": [
        [
          {
            "node": "Conditional Check for New Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Local LLM Model (Ollama)": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Summary and Hashtags with LLM",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over RSS Items for Processing": {
      "main": [
        [
          {
            "node": "Merge Processed Data Streams",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch Blog Post HTML Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule: Check RSS Every 10 Minutes": {
      "main": [
        [
          {
            "node": "Set RSS Feed URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize RSS Fields (Content & Link)": {
      "main": [
        [
          {
            "node": "Calculate Summary Character Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create and Post Content via Postiz API": {
      "main": [
        [
          {
            "node": "Save Posted Hash to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Summary and Hashtags with LLM": {
      "main": [
        [
          {
            "node": "Process LLM Output for Postiz (Extract Text/Hashtags/Link)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Latest Item for Image Processing": {
      "main": [
        [
          {
            "node": "Download Post Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Link Hash for Duplication Check": {
      "main": [
        [
          {
            "node": "Read Last Posted Hash from File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process LLM Output for Postiz (Extract Text/Hashtags/Link)": {
      "main": [
        [
          {
            "node": "Save Temporary Link Hash to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}