{
  "name": "Automated Thai content creation & publishing with Ollama, Gemini & Telegram",
  "nodes": [
    {
      "id": "",
      "name": "Ollama: Article Writer Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        -2660,
        -220
      ]
    },
    {
      "id": "12a28d97-2679-4bc5-a8a0-65ec7ef76398",
      "name": "HTTP Request: Post to Website",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -960,
        -220
      ]
    },
    {
      "id": "3c460292-1341-48e8-83cb-784a7a5f2d54",
      "name": "Telegram: Send Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -800,
        -220
      ]
    },
    {
      "id": "b21535d9-db05-4d51-b0d5-344ca70ea2b5",
      "name": "Google Gemini: Generate Photo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1480,
        -220
      ]
    },
    {
      "id": "12be1078-6a82-46e3-a35f-c497dc7789c7",
      "name": "Convert AI Image to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -1120,
        -220
      ]
    },
    {
      "id": "",
      "name": "Ollama: SEO & Marketing Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        -2360,
        80
      ]
    },
    {
      "id": "47c8db8e-d6fb-4caa-8332-43ac033c9fef",
      "name": "LLM: Article Writer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -2680,
        -120
      ]
    },
    {
      "id": "b2acb79c-ce1f-4a78-b6ec-b9ec644ca362",
      "name": "LLM: SEO & Marketing",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -2320,
        -120
      ]
    },
    {
      "id": "912fd524-acdd-47cf-92f2-cdc7a00bc77d",
      "name": "Function: Prepare Post Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1860,
        -120
      ]
    },
    {
      "id": "760df977-da46-4d10-9f19-d2cb2099e5b8",
      "name": "If: Is Real Image?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1700,
        -120
      ]
    },
    {
      "id": "3c916018-d0ad-4111-814a-be6c1cb84537",
      "name": "Convert AI Risoprint Image to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -1120,
        -40
      ]
    },
    {
      "id": "a021bbfd-870d-41c6-b481-729643acb196",
      "name": "Function: Parse LLM Output",
      "type": "n8n-nodes-base.code",
      "position": [
        -2020,
        -120
      ]
    },
    {
      "id": "f6ff9656-7342-492a-87d0-d290c76047a4",
      "name": "If: Is AI Image?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3260,
        -320
      ]
    },
    {
      "id": "308fc7dc-97fc-4a79-8340-f5ced91c015b",
      "name": "Function: Image Type Analyzer",
      "type": "n8n-nodes-base.code",
      "position": [
        -3220,
        -160
      ]
    },
    {
      "id": "9965d31f-85fc-450f-8918-de20504495bb",
      "name": "HTTP Request: Fetch Real Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3220,
        -20
      ]
    },
    {
      "id": "29ce8614-edd0-4496-9deb-493e2ad9d430",
      "name": "Read/Write Files from Disk (Local)",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        -3220,
        140
      ]
    },
    {
      "id": "d85f8b4c-8170-41d9-8d7b-329e41c249b4",
      "name": "Extract Image Binary Data",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -3220,
        300
      ]
    },
    {
      "id": "bb69c31c-837b-4714-b0cb-10d47a86796f",
      "name": "Merge Image Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2940,
        -120
      ]
    },
    {
      "id": "1c358faf-7240-4b85-b9c1-e047668aae7a",
      "name": "Convert Extracted Image to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -3220,
        420
      ]
    },
    {
      "id": "fefba463-aa01-48e3-aeb7-40423b1e9ed1",
      "name": "Function: Attach Image Binary",
      "type": "n8n-nodes-base.code",
      "position": [
        -2920,
        320
      ]
    },
    {
      "id": "",
      "name": "Google Sheets: Read News",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -2300,
        -500
      ]
    },
    {
      "id": "9773638f-ae9b-4693-b606-226e16af3f40",
      "name": "LLM: Image Type Analyzer",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -2140,
        -500
      ]
    },
    {
      "id": "",
      "name": "Ollama: Image Type Model",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "position": [
        -2140,
        -620
      ]
    },
    {
      "id": "366744f5-7868-43da-9196-9930992734d8",
      "name": "Google Gemini: Generate Risoprint Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1480,
        -40
      ]
    }
  ],
  "connections": {
    "If: Is AI Image?": {
      "main": [
        [
          {
            "node": "Merge Image Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Function: Image Type Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Image Data": {
      "main": [
        [
          {
            "node": "LLM: Article Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Is Real Image?": {
      "main": [
        [
          {
            "node": "Google Gemini: Generate Photo",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Google Gemini: Generate Risoprint Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM: Article Writer": {
      "main": [
        [
          {
            "node": "LLM: SEO & Marketing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM: SEO & Marketing": {
      "main": [
        [
          {
            "node": "Function: Parse LLM Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert AI Image to File": {
      "main": [
        [
          {
            "node": "HTTP Request: Post to Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets: Read News": {
      "main": [
        [
          {
            "node": "LLM: Image Type Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM: Image Type Analyzer": {
      "main": [
        [
          {
            "node": "If: Is AI Image?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama: Image Type Model": {
      "ai_languageModel": [
        [
          {
            "node": "LLM: Image Type Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Image Binary Data": {
      "main": [
        [
          {
            "node": "Convert Extracted Image to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function: Parse LLM Output": {
      "main": [
        [
          {
            "node": "Function: Prepare Post Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function: Prepare Post Data": {
      "main": [
        [
          {
            "node": "If: Is Real Image?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama: Article Writer Model": {
      "ai_languageModel": [
        [
          {
            "node": "LLM: Article Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Function: Attach Image Binary": {
      "main": [
        [
          {
            "node": "Merge Image Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Function: Image Type Analyzer": {
      "main": [
        [
          {
            "node": "HTTP Request: Fetch Real Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Image Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini: Generate Photo": {
      "main": [
        [
          {
            "node": "Convert AI Image to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request: Post to Website": {
      "main": [
        [
          {
            "node": "Telegram: Send Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama: SEO & Marketing Model": {
      "ai_languageModel": [
        [
          {
            "node": "LLM: SEO & Marketing",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request: Fetch Real Image": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk (Local)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Extracted Image to File": {
      "main": [
        [
          {
            "node": "Function: Attach Image Binary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert AI Risoprint Image to File": {
      "main": [
        [
          {
            "node": "HTTP Request: Post to Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk (Local)": {
      "main": [
        [
          {
            "node": "Extract Image Binary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}