{
  "name": "HYPEAKZ \u2014 AI Content Generator (Blog/Social, 100% Local)",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "generate-content",
        "responseMode": "responseNode"
      },
      "id": "node-webhook",
      "name": "Content Request",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "model": "llama3.2",
        "baseUrl": "http://ollama:11434"
      },
      "id": "node-ollama",
      "name": "Ollama Local LLM",
      "type": "@n8n/n8n-nodes-langchain.lmOllama",
      "typeVersion": 1,
      "position": [
        550,
        550
      ]
    },
    {
      "parameters": {
        "prompt": "You are a professional content writer. Create content based on these inputs:\n\nTopic: {{ $json.body.topic }}\nType: {{ $json.body.type || 'blog_post' }}\nTone: {{ $json.body.tone || 'professional' }}\nTarget Audience: {{ $json.body.audience || 'business owners' }}\nKeywords: {{ $json.body.keywords || 'none specified' }}\n\nIf type is 'blog_post': Write a 600-800 word article with headline, introduction, 3-5 sections with subheadings, and a conclusion with CTA.\n\nIf type is 'linkedin': Write a LinkedIn post (max 1300 characters) with hook, value, and CTA. Use line breaks for readability.\n\nIf type is 'twitter_thread': Write a 5-7 tweet thread. Each tweet under 280 characters. Start with a hook tweet.\n\nIf type is 'instagram': Write an Instagram caption (max 2200 chars) with hook, story, CTA, and 15 relevant hashtags.\n\nReturn JSON with:\n- headline: the main headline/hook\n- content: the full content\n- meta_description: SEO meta description (155 chars)\n- hashtags: array of relevant hashtags"
      },
      "id": "node-generate",
      "name": "Generate Content (AI)",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.4,
      "position": [
        550,
        300
      ]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "content",
              "value": "={{ $json.text }}"
            },
            {
              "name": "topic",
              "value": "={{ $('Content Request').item.json.body.topic }}"
            },
            {
              "name": "type",
              "value": "={{ $('Content Request').item.json.body.type || 'blog_post' }}"
            },
            {
              "name": "generated_at",
              "value": "={{ $now.toISO() }}"
            },
            {
              "name": "model",
              "value": "llama3.2 (local)"
            }
          ]
        }
      },
      "id": "node-format",
      "name": "Format Output",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        800,
        300
      ]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify($json) }}"
      },
      "id": "node-respond",
      "name": "Return Content",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        1050,
        300
      ]
    }
  ],
  "connections": {
    "Content Request": {
      "main": [
        [
          {
            "node": "Generate Content (AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Local LLM": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Content (AI)",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Content (AI)": {
      "main": [
        [
          {
            "node": "Format Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Output": {
      "main": [
        [
          {
            "node": "Return Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    {
      "name": "HYPEAKZ.IO"
    },
    {
      "name": "Self-Hosted AI"
    },
    {
      "name": "Ollama"
    },
    {
      "name": "Content Generation"
    }
  ]
}