{"meta":{"instanceId":"6570b9a3c619b905a29a1c8dcd31f41add28a4b324f4ec6bd206e06c2b9731cf","templateCredsSetupCompleted":true},"nodes":[{"id":"e6d53ca0-ad48-4a6d-980a-dd4830349a5f","name":"When clicking ‘Execute workflow’","type":"n8n-nodes-base.manualTrigger","position":[288,240],"parameters":{},"typeVersion":1},{"id":"02b7f8b4-2267-4128-9de4-c0f25071bac5","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[752,832],"parameters":{"options":{},"fieldToSplitOut":"videos"},"typeVersion":1},{"id":"5253a001-b39e-4f08-837a-06bdae7dd1ac","name":"Retrieve Vizard Project","type":"n8n-nodes-base.httpRequest","position":[528,832],"parameters":{"url":"=https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/query/{{$json.projectId}}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"VIZARDAI_API_KEY","value":"api key goes here "}]}},"typeVersion":4.2},{"id":"6cb634e8-5814-40f2-a194-5df6059b915f","name":"Send Longform to Vizard","type":"n8n-nodes-base.httpRequest","position":[928,240],"parameters":{"url":"https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/create","method":"POST","options":{},"jsonBody":"={\n  \"lang\": \"en\",\n  \"preferLength\": [\n    0\n  ],\n  \"videoUrl\": \"{{ $json.link }}\",\n  \"videoType\": 2\n} ","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"VIZARDAI_API_KEY","value":"api key goes here "}]}},"typeVersion":4.2},{"id":"b98f477d-c1df-4bb8-8973-9838bae05cc0","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[960,832],"parameters":{"options":{}},"typeVersion":3},{"id":"13c99d5a-8548-4b66-9351-4fa33ac76087","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[240,608],"parameters":{"width":1720,"height":440,"content":"# 2. Retrieve & generate\n\n### This flow retrieves the Vizard project through webhook, and then splits the videos before adding them to a Google Sheet.\n### Things to adjust: Vizard Credentials (HTTP Request), File ID (Google Sheet), Email Copy (Gmail).\n### Get my Google Sheets template [here](https://docs.google.com/spreadsheets/d/1uo3Cq4AoSNhZW8sZup8V5AM55BRua7skVf9gOjxg-Wg/edit?usp=sharing)."},"typeVersion":1},{"id":"9b02a8ce-83b2-42af-bdba-00a55c024d94","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[240,48],"parameters":{"width":1720,"height":380,"content":"# 1. Scrape & send\n\n### This flow scrapes a channel of your choosing, and then sends new videos to Vizard for later clipping. \n### Things to adjust: YouTube Channel ID (RSS Feed), Vizard Credentials (HTTP Request). Deactivate the Limit node when you want to go live."},"typeVersion":1},{"id":"aff81d26-9508-4923-b081-c45553e42025","name":"Limit","type":"n8n-nodes-base.limit","position":[704,240],"parameters":{"maxItems":2},"typeVersion":1},{"id":"e8b866be-b8bd-475d-a9cc-eb33961e0ab8","name":"Webhook","type":"n8n-nodes-base.webhook","position":[288,832],"webhookId":"d40c9293-818e-49c9-bcff-a864bd524427","parameters":{"path":"d40c9293-818e-49c9-bcff-a864bd524427","options":{},"httpMethod":"POST"},"typeVersion":2},{"id":"164469dd-137a-4197-9123-60b20f50d050","name":"Append row in sheet","type":"n8n-nodes-base.googleSheets","position":[1552,832],"parameters":{"columns":{"value":{"title":"={{ $('Split Out').item.json.title }}","videoId":"={{ $('Split Out').item.json.videoId }}","videoUrl":"={{ $('Split Out').item.json.videoUrl }}","projectId":"={{ $('Retrieve Vizard Project').item.json.projectId }}","transcript":"={{ $('Split Out').item.json.transcript }}","viralScore":"={{ $('Split Out').item.json.viralScore }}","viralReason":"={{ $('Split Out').item.json.viralReason }}","relatedTopic":"={{ $('Split Out').item.json.relatedTopic }}","clipEditorUrl":"={{ $('Split Out').item.json.clipEditorUrl }}","videoMsDuration":"={{ $('Split Out').item.json.videoMsDuration }}","generatedCaption":"={{ $json.message.content.caption }}"},"schema":[{"id":"videoId","type":"string","display":true,"required":false,"displayName":"videoId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"projectId","type":"string","display":true,"required":false,"displayName":"projectId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoUrl","type":"string","display":true,"required":false,"displayName":"videoUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"videoMsDuration","type":"string","display":true,"required":false,"displayName":"videoMsDuration","defaultMatch":false,"canBeUsedToMatch":true},{"id":"title","type":"string","display":true,"required":false,"displayName":"title","defaultMatch":false,"canBeUsedToMatch":true},{"id":"transcript","type":"string","display":true,"required":false,"displayName":"transcript","defaultMatch":false,"canBeUsedToMatch":true},{"id":"viralScore","type":"string","display":true,"required":false,"displayName":"viralScore","defaultMatch":false,"canBeUsedToMatch":true},{"id":"viralReason","type":"string","display":true,"required":false,"displayName":"viralReason","defaultMatch":false,"canBeUsedToMatch":true},{"id":"relatedTopic","type":"string","display":true,"required":false,"displayName":"relatedTopic","defaultMatch":false,"canBeUsedToMatch":true},{"id":"clipEditorUrl","type":"string","display":true,"required":false,"displayName":"clipEditorUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"generatedCaption","type":"string","display":true,"required":false,"displayName":"generatedCaption","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/10CRVnoFOtY8p6mhX4d7wjbKB91RS3SgJ2v4dwmFM8b4/edit?usp=drivesdk","cachedResultName":"YT LF to tiktok shorts "}},"typeVersion":4.6},{"id":"9578fbfc-4329-42c8-b8d3-81ad7c3482b5","name":"Send a message","type":"n8n-nodes-base.gmail","position":[1344,656],"webhookId":"1090375c-2e63-47d6-9b18-f82ee339351b","parameters":{"sendTo":"nickolassaraev@gmail.com","message":"=Hi Nick,\n\nYour clips are ready to go. Just check the spreadsheet below: https://docs.google.com/spreadsheets/d/1uo3Cq4AoSNhZW8sZup8V5AM55BRua7skVf9gOjxg-Wg/edit?usp=sharing\n\nHappy clipping!\n\nThanks,\nNick","options":{},"subject":"Hey—your clips are ready to go!","emailType":"text"},"typeVersion":2.1},{"id":"4ad1bccd-6b2a-4678-8424-f3b8b9294112","name":"Read youtube RSS feed","type":"n8n-nodes-base.rssFeedRead","position":[512,240],"parameters":{"url":"https://www.youtube.com/feeds/videos.xml?channel_id=UCbo-KbSjJDG6JWQ_MTZ_rNA","options":{}},"typeVersion":1.1},{"id":"3cbbddb6-c7fe-459d-a274-89eb53917cc3","name":"Generate captions","type":"@n8n/n8n-nodes-langchain.openAi","position":[1184,832],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4.1","cachedResultName":"GPT-4.1"},"options":{},"messages":{"values":[{"role":"system","content":"You're a helpful, intelligent social media assistant. You make captions for Instagram and TikTok."},{"content":"Your task is to generate high-quality, engaging captions for Instagram and TikTok.\n\nYou'll be fed a transcript.\n\nReturn your captions in JSON using this format:\n\n{\"caption\":\"\"}\n\nRules:\n- Keep captions to ~100 words.\n- Use a spartan tone of voice, favoring the classic Western style (though still a fit for Instagram and TikTok).\n- Write conversationally, i.e as if I were doing the writing myself (in first person.\n- Use emojis, but sparingly.\n- Ensure each sentence is over 5 words long. Write for a University reading level."},{"content":"={{ $json.transcript }}"}]},"jsonOutput":true},"typeVersion":1.8},{"id":"3a01414f-0599-4668-8cf2-e2bfb2076f0e","name":"Wait for processing","type":"n8n-nodes-base.wait","position":[1744,832],"webhookId":"1d588357-cb88-42b5-b34f-ed3c767dbf04","parameters":{"amount":2},"typeVersion":1.1}],"pinData":{"When clicking ‘Execute workflow’":[{"projectId":"21292525"}]},"connections":{"Limit":{"main":[[{"node":"Send Longform to Vizard","type":"main","index":0}]]},"Webhook":{"main":[[{"node":"Retrieve Vizard Project","type":"main","index":0}]]},"Split Out":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Loop Over Items":{"main":[[{"node":"Send a message","type":"main","index":0}],[{"node":"Generate captions","type":"main","index":0}]]},"Generate captions":{"main":[[{"node":"Append row in sheet","type":"main","index":0}]]},"Append row in sheet":{"main":[[{"node":"Wait for processing","type":"main","index":0}]]},"Wait for processing":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Read youtube RSS feed":{"main":[[{"node":"Limit","type":"main","index":0}]]},"Retrieve Vizard Project":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"When clicking ‘Execute workflow’":{"main":[[{"node":"Read youtube RSS feed","type":"main","index":0}]]}}}