{
  "id": "5MqlVfBJAZQ3OOEd",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Turn Podcast Clips into TikTok shorts copy",
  "tags": [],
  "nodes": [
    {
      "id": "7dcc1346-624b-4bd7-b330-ac16d6089ed4",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        0,
        0
      ],
      "parameters": {
        "options": {},
        "formTitle": "Podcast Interviews to TikTok Shorts",
        "formFields": {
          "values": [
            {
              "fieldLabel": "URL link"
            }
          ]
        }
      },
      "typeVersion": 2.5
    },
    {
      "id": "bae58089-4c79-4f51-a333-9ecbc3eb531f",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        416,
        0
      ],
      "parameters": {
        "unit": "minutes"
      },
      "typeVersion": 1.1
    },
    {
      "id": "a821badc-1117-4f5f-b89a-c579d1fba80f",
      "name": "Clip Videos",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        208,
        0
      ],
      "parameters": {
        "url": "https://wayinvideo-api.wayin.ai/api/v2/clips",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"video_url\": \"{{ $json['URL link'] }}\",\n    \"project_name\": \"sample project name\",\n    \"target_duration\": \"DURATION_30_60\",\n    \"enable_export\": true,\n    \"resolution\": \"HD_720\",\n    \"enable_caption\": true,\n    \"enable_ai_reframe\": true,\n    \"ratio\": \"RATIO_9_16\"\n  } ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "71e0788a-f744-418c-8fc8-1481ad2022a5",
      "name": "Get Clips",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        624,
        0
      ],
      "parameters": {
        "url": "=https://wayinvideo-api.wayin.ai/api/v2/clips/results/{{ $('Clip Videos').item.json.data.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer YOUR_TOKEN_HERE"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            }
          ]
        }
      },
      "typeVersion": 4.4
    },
    {
      "id": "6e36bfbb-3652-4d4a-ad34-7cee64ddda35",
      "name": "Upload media",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        1232,
        0
      ],
      "parameters": {
        "resource": "media"
      },
      "credentials": {
        "postPulseOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bf333501-16f6-46fc-b1b5-d9f02d9a67c0",
      "name": "Download Clip",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        0
      ],
      "parameters": {
        "url": "={{ $json.export_link }}",
        "options": {}
      },
      "typeVersion": 4.4
    },
    {
      "id": "b00b31a3-33d8-445f-be54-7fdd428334d5",
      "name": "Schedule a light post",
      "type": "@postpulse/n8n-nodes-postpulse.postPulse",
      "position": [
        1424,
        0
      ],
      "parameters": {
        "content": "={{ $('Get Clips').item.json.data.clips[0].desc }}",
        "operation": "scheduleLight",
        "tiktokTitle": "={{ $('Get Clips').item.json.data.clips[0].title }}",
        "scheduledTime": "={{ $now.plus({ days: 1 }) }}",
        "attachmentPaths": "={{ $('Upload media').item.json.path }}",
        "socialMediaAccount": "TIKTOK|1422"
      },
      "credentials": {
        "postPulseOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "83c99e4c-1c49-4483-919d-f092f323fa4c",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        832,
        0
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data.clips"
      },
      "typeVersion": 1
    },
    {
      "id": "1a7e0a74-4b99-4900-a768-d59139346152",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        -528
      ],
      "parameters": {
        "width": 544,
        "height": 736,
        "content": "**Workflow Purpose**\nA content generation platform that turns podcast video into TikTok shorts with WayinVideo and schedules them in PostPulse.\n\n## Workflow Steps\n**1. Form Trigger** \n* Triggers the worflow whenever a form is submitted containing a URL link. \n\n\n**2. Clip Video From URL**\n* Clips video using WayinVideo's Submit Clipping Task endpoint and the URL from the submitted form.\n\n\n**3. Pause Workflow**\n* Pause workflow to allow clips to generate.\n\n\n**4. Get Generated Clip**\n* Get generated clip using WayinVideo's Get Clips endpoint. \n\n\n**5. Split Out Result**\n* Split out clip results for individual processing and scheduling.\n\n\n**6. Download Generated Clips**\n* Download each generated clip.\n\n\n**7. Upload Media**\n* Upload downloaded clips to PostPulse to retrieve attachment ID.\n\n\n**8. Schedule Clips for TikTok**\n* Schedule generated clips in PostPulse to go out daily.\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2418ee78-01f5-4dd9-a679-a243afff0088",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 752,
        "height": 288,
        "content": "## Kick-Off workflow\n\nGets podcast URL from form submission and generates short clips using WayinVideo's submit clipping task endpoint. The workflow pauses for 5 minutes while the clips are generated in WayinVideo's platform before they're retrieved using the get clip endpoint. "
      },
      "typeVersion": 1
    },
    {
      "id": "196f30fe-b65f-4fcc-91e4-3e67737c14c9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        -192
      ],
      "parameters": {
        "color": 7,
        "width": 784,
        "height": 288,
        "content": "## Split Out Clips and Schedule Posts for TikTok\n\nSplit out generated clips for individual processing and download each clip individually. Upload downloaded clips to PostPulse for attachment ID and schedule generated short clips with PostPulse."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "858d5519-da83-4e95-8be0-a9dfd123900e",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get Clips",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Clips": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Download Clip",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clip Videos": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Schedule a light post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Clip": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Clip Videos",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}