{
  "name": "FULL Money Psychology Shorts Automation",
  "nodes": [
    {
      "parameters": {
        "triggerTimes": {
          "item": [
            {
              "hour": 10,
              "minute": 0
            },
            {
              "hour": 15,
              "minute": 0
            },
            {
              "hour": 20,
              "minute": 0
            }
          ]
        }
      },
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.cron",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.openai.com/v1/chat/completions",
        "jsonParameters": true,
        "headerParametersJson": "={\"Authorization\":\"Bearer OPENAI_API_KEY\",\"Content-Type\":\"application/json\"}",
        "bodyParametersJson": "={\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"system\",\"content\":\"You are an expert short-form content writer specialized in monetizable YouTube Shorts and TikTok videos.\"},{\"role\":\"user\",\"content\":\"Create ONE short-form script about money psychology. English only. Max 60 words. Strong hook in first 2 seconds. One deep psychological insight about money. End with a memorable closing line. Also return a short title and 5 hashtags.\"}],\"temperature\":0.9}"
      },
      "name": "ChatGPT Script",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        420,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "const text = $json.choices[0].message.content;\nreturn [{ json: { script: text, title: text.split('\\n')[0].slice(0,60), hashtags: ['#money','#psychology','#wealth','#mindset','#shorts'] }}];"
      },
      "name": "Extract Script",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://developer.voicemaker.in/api/v1/voice/convert",
        "jsonParameters": true,
        "headerParametersJson": "={\"Authorization\":\"Bearer VOICEMAKER_API_KEY\",\"Content-Type\":\"application/json\"}",
        "bodyParametersJson": "={\"Engine\":\"neural\",\"VoiceId\":\"ai3-Jony\",\"LanguageCode\":\"en-US\",\"Text\":$node[\"Extract Script\"].json[\"script\"],\"OutputFormat\":\"mp3\"}"
      },
      "name": "VoiceMaker TTS",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        880,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.shotstack.io/stage/render",
        "jsonParameters": true,
        "headerParametersJson": "={\"x-api-key\":\"SHOTSTACK_API_KEY\",\"Content-Type\":\"application/json\"}",
        "bodyParametersJson": "={\"timeline\":{\"soundtrack\":{\"src\":$node[\"VoiceMaker TTS\"].json[\"url\"]},\"tracks\":[{\"clips\":[{\"asset\":{\"type\":\"video\",\"src\":\"https://shotstack-assets.s3.amazonaws.com/footage/road.mp4\"},\"start\":0,\"length\":10},{\"asset\":{\"type\":\"title\",\"text\":$node[\"Extract Script\"].json[\"script\"],\"style\":\"minimal\"},\"start\":0,\"length\":10}]}]},\"output\":{\"format\":\"mp4\",\"resolution\":\"1080x1920\"}}"
      },
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://api.apitemplate.io/v1/create",
        "jsonParameters": true,
        "headerParametersJson": "={\"Authorization\":\"Bearer THUMBNAIL_API_KEY\",\"Content-Type\":\"application/json\"}",
        "bodyParametersJson": "={\"template_id\":\"TEMPLATE_ID\",\"overrides\":{\"title\":$node[\"Extract Script\"].json[\"title\"]}}"
      },
      "name": "Thumbnail Generator",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1120,
        500
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://www.googleapis.com/upload/youtube/v3/videos?uploadType=multipart&part=snippet,status",
        "jsonParameters": true,
        "headerParametersJson": "={\"Authorization\":\"Bearer YOUTUBE_ACCESS_TOKEN\"}",
        "bodyParametersJson": "={\"snippet\":{\"title\":$node[\"Extract Script\"].json[\"title\"],\"description\":\"Money psychology short generated automatically\",\"tags\":$node[\"Extract Script\"].json[\"hashtags\"]},\"status\":{\"privacyStatus\":\"public\"}}"
      },
      "name": "Upload YouTube Shorts",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1380,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://business-api.tiktok.com/open_api/v1.3/video/upload/",
        "jsonParameters": true,
        "headerParametersJson": "={\"Access-Token\":\"TIKTOK_ACCESS_TOKEN\"}",
        "bodyParametersJson": "={\"video_url\":$node[\"Create Video\"].json[\"url\"],\"text\":$node[\"Extract Script\"].json[\"title\"]}"
      },
      "name": "Upload TikTok",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        1380,
        500
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "ChatGPT Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ChatGPT Script": {
      "main": [
        [
          {
            "node": "Extract Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Script": {
      "main": [
        [
          {
            "node": "VoiceMaker TTS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "VoiceMaker TTS": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "Upload YouTube Shorts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Upload TikTok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}