{
  "name": "VW24 \u2014 Social Media AI Auto-Poster",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24,
              "triggerAtHour": 9
            }
          ]
        }
      },
      "name": "Daily at 9am",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "id": "3bd35b3b-7250-4d93-b7aa-77199671a0fb"
    },
    {
      "parameters": {
        "url": "https://vibeworld24.com/api/chat",
        "method": "POST",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-API-Key",
              "value": "YOUR_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "message",
              "value": "Generate 3 viral social media posts for VibeWorld24 AI platform. Include a LinkedIn post (professional), an Instagram caption (engaging with emojis), and a TikTok hook (first 3 seconds). Topic: AI automation for business growth in 2026. Make them punchy, scroll-stopping, and conversion-focused. Format: JSON with keys linkedin, instagram, tiktok."
            },
            {
              "name": "agent",
              "value": "social"
            }
          ]
        }
      },
      "name": "Generate AI Content",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        460,
        300
      ],
      "id": "e3f809aa-4289-4b11-b1c5-cff70f27e84b"
    },
    {
      "parameters": {
        "functionCode": "const reply = items[0].json.reply || '';\nlet posts = { linkedin: '', instagram: '', tiktok: '' };\ntry {\n  const jsonMatch = reply.match(/\\{[\\s\\S]*\\}/);\n  if (jsonMatch) posts = JSON.parse(jsonMatch[0]);\n} catch {\n  posts.linkedin  = reply.slice(0, 500);\n  posts.instagram = reply.slice(0, 300);\n  posts.tiktok    = reply.slice(0, 200);\n}\nreturn [{ json: { ...posts, generatedAt: new Date().toISOString() }}];"
      },
      "name": "Parse Posts",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        680,
        300
      ],
      "id": "4d449655-c1e2-4ca6-8323-321e0e708b4b"
    },
    {
      "parameters": {
        "fromEmail": "info@vibeworld24.com",
        "toEmail": "klodiantaipi51@gmail.com",
        "subject": "\ud83d\udcf1 Today's AI-Generated Social Media Content \u2014 {{$json.generatedAt}}",
        "emailType": "html",
        "message": "<!DOCTYPE html><html><body style='background:#03030f;color:#e2e8f0;font-family:sans-serif;padding:20px'><div style='max-width:600px;margin:0 auto'><h2 style='color:#00f0ff'>Today's Social Content</h2><h3>\ud83d\udcbc LinkedIn</h3><div style='background:#0d0d22;border:1px solid rgba(0,240,255,.1);border-radius:10px;padding:16px;margin-bottom:16px;white-space:pre-wrap;font-size:.85rem'>{{$json.linkedin}}</div><h3>\ud83d\udcf8 Instagram</h3><div style='background:#0d0d22;border:1px solid rgba(124,58,237,.2);border-radius:10px;padding:16px;margin-bottom:16px;white-space:pre-wrap;font-size:.85rem'>{{$json.instagram}}</div><h3>\ud83c\udfb5 TikTok Hook</h3><div style='background:#0d0d22;border:1px solid rgba(0,255,136,.1);border-radius:10px;padding:16px;white-space:pre-wrap;font-size:.85rem'>{{$json.tiktok}}</div><p style='color:#5a6a82;font-size:.75rem;margin-top:16px'>Generated by VibeWorld24 AI Social Specialist \u00b7 {{$json.generatedAt}}</p></div></body></html>"
      },
      "name": "Email Content to Owner",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        900,
        300
      ],
      "credentials": {
        "smtp": {
          "id": "1",
          "name": "VW24 SMTP"
        }
      },
      "id": "52110fa0-9e4b-4cb0-8c88-ae8469ee031a"
    },
    {
      "parameters": {
        "url": "http://127.0.0.1:22663/trigger/all",
        "method": "POST",
        "options": {
          "timeout": 10000,
          "ignoreResponseCode": true
        }
      },
      "name": "Trigger Social Poster",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1120,
        300
      ],
      "id": "ff8d0ca0-f2a6-4f0c-9296-11e599a98c71"
    }
  ],
  "connections": {
    "Daily at 9am": {
      "main": [
        [
          {
            "node": "Generate AI Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate AI Content": {
      "main": [
        [
          {
            "node": "Parse Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Posts": {
      "main": [
        [
          {
            "node": "Email Content to Owner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email Content to Owner": {
      "main": [
        [
          {
            "node": "Trigger Social Poster",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "59742f35-d0c9-42e7-98b3-14472b74cf27"
}