Skip to content

edit episode 9 workflows: add title

David3497a8b0055f
diff --git a/episode_9/revenge-story-workflow-qwen3.json b/episode_9/revenge-story-workflow-qwen3.json
index fbd407d..1d62c85 100644
--- a/episode_9/revenge-story-workflow-qwen3.json
+++ b/episode_9/revenge-story-workflow-qwen3.json
@@ -1,5 +1,5 @@
{
- "name": "Episode 9: Revenge story creator - qwen3",
+ "name": "Episode 9: Revenge story creator - qwen3 local",
"nodes": [
{
"parameters": {},
@@ -9,7 +9,7 @@
-240,
-1740
],
- "id": "21c47d1c-23cf-4326-b14a-11fabb1c6df2",
+ "id": "ce3922f9-4bd9-48f5-8f38-7805bf241510",
"name": "When clicking ‘Test workflow’"
},
{
@@ -23,7 +23,7 @@
340,
-3100
],
- "id": "165bb080-6533-4fce-9610-41e86a4ee107",
+ "id": "ec43a198-a4fd-4e8e-baee-3941491a8922",
"name": "Split Out"
},
{
@@ -37,8 +37,14 @@
340,
-3760
],
- "id": "07e689c1-8b29-4323-9e55-4ac606829771",
- "name": "Ollama Model"
+ "id": "992d8877-3293-4800-9d89-b69c042f7893",
+ "name": "Ollama Model",
+ "credentials": {
+ "ollamaApi": {
+ "id": "cWXUsJ0LsqnzOEx0",
+ "name": "Ollama account"
+ }
+ }
},
{
"parameters": {
@@ -50,7 +56,7 @@
900,
-3100
],
- "id": "e4bb05d9-4747-4796-bbd6-88fe80c6e6d0",
+ "id": "fef07916-87c6-4817-a4d0-3c18400c99bc",
"name": "Loop Over Items"
},
{
@@ -84,7 +90,7 @@
600,
-3100
],
- "id": "46e5b3d7-340f-4d7a-9776-7cdba9669c50",
+ "id": "f5e62731-a499-45f1-b1fa-351533fa2058",
"name": "Filter"
},
{
@@ -121,7 +127,7 @@
2880,
-2780
],
- "id": "977a089b-7498-4627-a120-4a1be3c5cd40",
+ "id": "4a3db96d-3d3d-479f-913b-1cd37976c06a",
"name": "Skip post",
"credentials": {
"supabaseApi": {
@@ -164,7 +170,7 @@
2560,
-2780
],
- "id": "e77ef569-19e2-4e0b-a141-1bc104accd8d",
+ "id": "fa826813-b43d-4eb1-896d-df290c71680b",
"name": "Save post",
"credentials": {
"supabaseApi": {
@@ -197,7 +203,7 @@
2080,
-3080
],
- "id": "6fd407e1-c8c8-4ba8-847e-d6d01d06f952",
+ "id": "5b8a7295-ba36-496b-b595-4dc4d4bcab85",
"name": "Is it a story?"
},
{
@@ -211,7 +217,7 @@
20,
-3100
],
- "id": "ec0f1ffa-2b99-4c3f-8c7c-a5a266a64044",
+ "id": "fc58694d-a513-434d-8bcf-e2ea9cd1a1b7",
"name": "Get stories from Reddit"
},
{
@@ -252,7 +258,7 @@
1360,
-3100
],
- "id": "2685f586-2223-49e5-aaee-ece0ced6911c",
+ "id": "61aeb28c-7f9b-4386-8661-a2346fe287d8",
"name": "Set fields"
},
{
@@ -274,7 +280,7 @@
1620,
-3100
],
- "id": "76c6f42b-c82d-4b3f-9496-8541f95cf1d5",
+ "id": "3b395307-f440-4caf-bb76-409b4b778811",
"name": "Look up the id of the post",
"alwaysOutputData": true,
"credentials": {
@@ -314,7 +320,7 @@
1840,
-3100
],
- "id": "cf039314-f0cf-4166-88f4-2480d0f8d7d6",
+ "id": "27793712-6ba4-4309-a593-f38c1cddba5a",
"name": "Already exists?"
},
{
@@ -338,7 +344,7 @@
920,
-1740
],
- "id": "9c0af49b-fd93-4173-afd6-d4f1cac30cb9",
+ "id": "a8ef67fa-3f2e-465b-85dd-8e1dee1f28d1",
"name": "Get the next story to process",
"alwaysOutputData": true,
"credentials": {
@@ -358,9 +364,9 @@
460,
-760
],
- "id": "6ad08bca-6017-4728-b467-b2acd54bf318",
+ "id": "7f4f2656-a41c-49e9-80fb-068f897e860d",
"name": "Wait",
- "webhookId": "fd80656e-441d-4917-a540-d6db5b19aa9c"
+ "webhookId": "ba65a25e-21d4-4f4f-8aab-93adf607bfc7"
},
{
"parameters": {
@@ -370,20 +376,19 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
- 2040,
+ 2260,
-1080
],
- "id": "f532dbea-227f-4c5c-ac71-e45b887305ed",
+ "id": "7dfcb8cb-7920-4453-8c5b-4554464e8fce",
"name": "Download the video",
"alwaysOutputData": false,
- "retryOnFail": false,
- "disabled": true
+ "retryOnFail": false
},
{
"parameters": {
"resource": "video",
"operation": "upload",
- "title": "={{ $('Generate video').item.json.output.videoTitle }}",
+ "title": "={{ $('Cleanup title').item.json.title }}",
"regionCode": "HU",
"categoryId": "24",
"options": {}
@@ -391,12 +396,17 @@
"type": "n8n-nodes-base.youTube",
"typeVersion": 1,
"position": [
- 2280,
+ 2720,
-1080
],
- "id": "98254149-d8d2-4f2c-9e40-02ab4cb3ff24",
+ "id": "e3bdbca3-6185-4b71-b2aa-a5985321b790",
"name": "Share on YouTube",
- "disabled": true
+ "credentials": {
+ "youTubeOAuth2Api": {
+ "id": "EvIEz3KvgFMPW9Ap",
+ "name": "YouTube account"
+ }
+ }
},
{
"parameters": {
@@ -409,7 +419,7 @@
680,
-760
],
- "id": "2215fe38-c63d-47ee-81cf-0aa5be6fba68",
+ "id": "6f879041-10df-48b0-8a24-128ed615378d",
"name": "Check video status",
"alwaysOutputData": false,
"retryOnFail": false
@@ -455,7 +465,7 @@
20,
-760
],
- "id": "53bda433-301e-4e2c-8088-4ae6b7eea6bc",
+ "id": "16642184-0651-48ee-8391-6b3fdcd7e0d3",
"name": "Start creating the video"
},
{
@@ -546,7 +556,7 @@
940,
-760
],
- "id": "6379ef5f-8cdc-45ed-bbca-43fe38d6ca43",
+ "id": "61dc93c5-0ebd-48b8-abc1-dca206577cbf",
"name": "Switch"
},
{
@@ -557,7 +567,7 @@
1500,
-1060
],
- "id": "7e35d746-6337-48d3-8b82-d957ebb1bfc5",
+ "id": "19197a23-5deb-4f73-a0cb-73e224116f3c",
"name": "No Operation, do nothing"
},
{
@@ -580,7 +590,7 @@
2140,
-1740
],
- "id": "8067ee1a-c32b-45f8-8357-cd7a33ebb0f9",
+ "id": "87b8bed4-7f21-44cb-8b04-e9bd19a55c6a",
"name": "Cleanup text"
},
{
@@ -621,7 +631,7 @@
1440,
-1740
],
- "id": "836bda6c-004a-44cc-b85f-96b1384bced5",
+ "id": "ba65b807-ab8d-4fa8-834f-503e90c9f9e4",
"name": "Create character"
},
{
@@ -653,9 +663,8 @@
1740,
-740
],
- "id": "ac66a420-53c0-4601-85bf-8deb2ca6f0fc",
- "name": "Set status to created",
- "disabled": true
+ "id": "991eeabb-6566-48ac-9daf-83f9bd197381",
+ "name": "Set status to created"
},
{
"parameters": {
@@ -683,12 +692,11 @@
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
- 2580,
+ 3020,
-740
],
- "id": "ba2132bd-79ad-46bc-a132-951ab5012838",
- "name": "Set status to uploaded",
- "disabled": true
+ "id": "880d8dc7-12b7-4731-8193-f0e540734b16",
+ "name": "Set status to uploaded"
},
{
"parameters": {
@@ -719,7 +727,7 @@
1280,
-1060
],
- "id": "7b7b90f3-1c0c-4b2c-be9b-cc06b921a677",
+ "id": "15ada02b-5275-465a-a567-3935c38c0a0d",
"name": "Set status to failed",
"credentials": {
"supabaseApi": {
@@ -740,7 +748,7 @@
-420,
-3380
],
- "id": "eaeb482d-e79f-4371-abd0-a21618967a5e",
+ "id": "06f66339-00a6-4b1e-bf17-d44d6ae1f230",
"name": "Sticky Note"
},
{
@@ -751,7 +759,7 @@
1480,
-2060
],
- "id": "fb4448e6-2ea9-4c4a-973b-af39b10a7e2a",
+ "id": "f851bd60-7c80-485e-8731-d69cba0c6544",
"name": "No unprocessed stories in the database"
},
{
@@ -775,10 +783,10 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
- 3020,
+ 3260,
-1580
],
- "id": "afe5e017-3802-4284-b9f7-4e682f0e4ed6",
+ "id": "f4e32ad1-01c1-47f5-82b0-00b281d838ed",
"name": "HTTP Request"
},
{
@@ -801,7 +809,7 @@
640,
-1740
],
- "id": "ec695da1-2415-4e17-8b6b-3ce127d5f152",
+ "id": "b49050f3-cb9e-4d90-bd7c-e3ca652c6779",
"name": "Setup sex of the main character"
},
{
@@ -835,7 +843,7 @@
{
"id": "5b5a9281-1de3-429e-aaf3-8da03a38b979",
"name": "lang_code",
- "value": "en-gb",
+ "value": "en-us",
"type": "string"
},
{
@@ -860,7 +868,7 @@
20,
-1740
],
- "id": "e9d7b68b-ccdc-462e-b16a-112ecc1d9808",
+ "id": "aeb10b5e-dc09-4787-92bf-011f41485b3b",
"name": "Configuration for story writing"
},
{
@@ -873,7 +881,7 @@
360,
-1740
],
- "id": "ed3fe871-19a2-4579-ba25-260fb0e9ebb5",
+ "id": "c036bded-1112-4524-b456-2e67ca2e4110",
"name": "Setup language"
},
{
@@ -893,10 +901,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3720,
+ 3760,
-1580
],
- "id": "f8d7b64f-cde4-451d-b2af-b5cc481916b4",
+ "id": "0d9aeae3-5b3e-4162-a5f5-3f435bc89a8c",
"name": "Set the final voice"
},
{
@@ -927,10 +935,10 @@
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
- 2520,
+ 2880,
-1740
],
- "id": "547d60c8-104a-40c1-8ed8-e2070e4f00cf",
+ "id": "395650f3-2f46-4944-9e65-3666bfc0c97c",
"name": "Is there a pre-selected voice to use?"
},
{
@@ -950,10 +958,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3100,
+ 3340,
-1860
],
- "id": "dcd326fd-02d2-4f65-91a9-580230c0da57",
+ "id": "79556be5-d85c-420c-a6fc-dd9c8f755d9c",
"name": "Keep the original voice value"
},
{
@@ -973,10 +981,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3200,
+ 3440,
-1580
],
- "id": "137554d6-7f6a-4ebf-903c-a3ddbaa58335",
+ "id": "f255db09-6510-49a1-acaa-8804277d3655",
"name": "Set a random voice"
},
{
@@ -1009,7 +1017,7 @@
1180,
-1740
],
- "id": "bd812a04-fb51-4af9-8045-8605ce696772",
+ "id": "70fe908d-5dcf-4add-ada9-f0312662e446",
"name": "Is there a story to process?"
},
{
@@ -1030,7 +1038,7 @@
1780,
-1740
],
- "id": "3721b863-9b76-4abe-a9bb-4bffcf44c4dd",
+ "id": "de6fd847-3a4c-432a-93be-4cb986cadbe8",
"name": "Write the story"
},
{
@@ -1053,7 +1061,7 @@
1480,
-740
],
- "id": "86da44d2-b067-4a87-a544-1b7cc57996dc",
+ "id": "3abfc072-f1f5-4ef2-8a13-c3c9552e7d7a",
"name": "Setup the download url"
},
{
@@ -1069,7 +1077,7 @@
-420,
-4120
],
- "id": "2bf98c92-5626-49b4-9ad8-4391d69a4d5c",
+ "id": "aa91abd5-5e0a-499c-8a77-36f10deee18a",
"name": "Sticky Note1"
},
{
@@ -1082,7 +1090,7 @@
-140,
-3940
],
- "id": "6fdb70f1-0c78-445a-917e-afc4367c1be8",
+ "id": "a01595af-e261-44c5-a5a6-cdc164d1c9b7",
"name": "OpenRouter Chat Model"
},
{
@@ -1095,7 +1103,7 @@
20,
-3760
],
- "id": "0432b123-0a82-4327-ae33-cb9d0e48612d",
+ "id": "650a910f-c824-4cc0-8266-d106e8a2c61b",
"name": "Google Gemini Chat Model"
},
{
@@ -1113,7 +1121,7 @@
-320,
-3940
],
- "id": "d39fb3fe-0929-4d56-a63b-dcfcb7ed8c43",
+ "id": "1bc2ddca-e51f-4b21-a116-37c87092770d",
"name": "OpenAI Chat Model"
},
{
@@ -1126,7 +1134,7 @@
-320,
-3760
],
- "id": "7a48048c-3e0f-44a6-9647-57eb1687d953",
+ "id": "c2ce7193-bb7f-4e51-b6c7-43366413e5fd",
"name": "Azure OpenAI Chat Model"
},
{
@@ -1139,14 +1147,14 @@
-140,
-3760
],
- "id": "2c268109-4b4c-4c8d-aff9-7ffc40e65466",
+ "id": "088e8a71-5d2b-4770-976f-8c6633365965",
"name": "xAI Grok Chat Model"
},
{
"parameters": {
"content": "# Create a story, generate a video and upload to YouTube",
"height": 1880,
- "width": 4420,
+ "width": 4440,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
@@ -1155,7 +1163,7 @@
-420,
-2300
],
- "id": "6df16155-6857-4ebd-bfc8-e4c10601b859",
+ "id": "a24d8a1d-ec2e-4117-91fb-8fe994c46111",
"name": "Sticky Note2"
},
{
@@ -1171,7 +1179,7 @@
-40,
-1900
],
- "id": "c04c05a9-4365-4bc2-873e-74308385acbb",
+ "id": "16bca362-2179-4a6a-b598-f5034016d0d3",
"name": "Sticky Note3"
},
{
@@ -1186,12 +1194,12 @@
680,
-4100
],
- "id": "426c6df3-afe7-4b1a-b5c3-64cdcbf01207",
+ "id": "888c20ca-1619-4051-803d-075f9611774c",
"name": "Sticky Note4"
},
{
"parameters": {
- "content": "# 1. Make sure to add a trigger node to both of the workflows\n\n# 2. Feel free to separate these workflows\n",
+ "content": "# 1. Make sure to add a trigger node to both of the workflows\n\n# 2. Feel free to separate these workflows\n\n# 3. Make sure the background video is 1920x1080",
"height": 800,
"width": 640,
"color": 5
@@ -1199,11 +1207,48 @@
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
- -1160,
+ -1180,
-2820
],
- "id": "4da2c723-390c-4aa2-a451-32960b6c2de8",
+ "id": "06ac85a3-b878-477f-b7af-a1043f4797aa",
"name": "Sticky Note5"
+ },
+ {
+ "parameters": {
+ "promptType": "define",
+ "text": "=<Instructions>\nCreate an attention-grabbing title, that is consise and descriptive for the following story in {{ $('Setup language').item.json.language }} ({{ $('Configuration for story writing').item.json.lang_code }}) language. The title should be maximum 100 characters.\n</Instructions>\n\n<Story>\n{{ $json.text }}\n</Story>\n\n/nothink"
+ },
+ "type": "@n8n/n8n-nodes-langchain.chainLlm",
+ "typeVersion": 1.6,
+ "position": [
+ 2320,
+ -1740
+ ],
+ "id": "e1ee5735-50f6-4be0-b9cb-a25cdd0f2d6c",
+ "name": "Create title"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "5528f120-1fb8-4ef0-9357-f206ee8c4afe",
+ "name": "title",
+ "value": "={{ $json.text.split('</think>')[1].trim().replace(/\\n/g, '').replace(/ {2,}/g, ' ').replace(/\\*/g, '').trim() }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ 2680,
+ -1740
+ ],
+ "id": "134992f9-cf46-4c82-8d40-4adb622ce7cc",
+ "name": "Cleanup title"
}
],
"pinData": {},
@@ -1247,6 +1292,11 @@
"node": "Create character",
"type": "ai_languageModel",
"index": 0
+ },
+ {
+ "node": "Create title",
+ "type": "ai_languageModel",
+ "index": 0
}
]
]
@@ -1456,7 +1506,7 @@
"main": [
[
{
- "node": "Is there a pre-selected voice to use?",
+ "node": "Create title",
"type": "main",
"index": 0
}
@@ -1646,17 +1696,39 @@
}
]
]
+ },
+ "Create title": {
+ "main": [
+ [
+ {
+ "node": "Cleanup title",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Cleanup title": {
+ "main": [
+ [
+ {
+ "node": "Is there a pre-selected voice to use?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
- "versionId": "9b162ebb-5118-408a-93e6-7c6520d88f2e",
+ "versionId": "cee6903a-de72-4545-9e9b-27c937954589",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
},
- "id": "9eBmwaOwz2bkEgZV",
+ "id": "LjkppBiYksNFmAzA",
"tags": []
}
\ No newline at end of file
diff --git a/episode_9/revenge-story-workflow.json b/episode_9/revenge-story-workflow.json
index f0c2843..440455d 100644
--- a/episode_9/revenge-story-workflow.json
+++ b/episode_9/revenge-story-workflow.json
@@ -1,15 +1,15 @@
{
- "name": "Episode 9: Revenge story creator",
+ "name": "Episode 9: Revenge story creator 2",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
- -220,
- -3120
+ -240,
+ -1740
],
- "id": "a85a6597-e9a1-445f-b22b-7015402e3a26",
+ "id": "53c669c5-d85b-4252-a2dd-c7bf84680831",
"name": "When clicking ‘Test workflow’"
},
{
@@ -21,9 +21,9 @@
"typeVersion": 1,
"position": [
340,
- -3120
+ -3100
],
- "id": "7fd00466-4e3f-49fd-92de-1aea0bbac0d5",
+ "id": "e02f1176-711c-44d1-9138-b3fad9e884a0",
"name": "Split Out"
},
{
@@ -37,7 +37,7 @@
340,
-3760
],
- "id": "66f9af13-f6fd-424b-8ae6-55bad8af3348",
+ "id": "4debe0e4-8eb2-41ef-a7e7-b216062c2478",
"name": "Ollama Model",
"credentials": {
"ollamaApi": {
@@ -53,10 +53,10 @@
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
- 920,
- -3120
+ 900,
+ -3100
],
- "id": "78b4ee9b-c229-4a44-ab07-c6de99f77b16",
+ "id": "a8b7f961-9b76-4d2d-9847-e8fdc993d95d",
"name": "Loop Over Items"
},
{
@@ -88,9 +88,9 @@
"typeVersion": 2.2,
"position": [
600,
- -3120
+ -3100
],
- "id": "ca658516-8955-4168-a128-8cb2ccec6221",
+ "id": "8407cc8c-8dca-4f16-b790-46a941b32e8e",
"name": "Filter"
},
{
@@ -124,10 +124,10 @@
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
- 2900,
- -2800
+ 2880,
+ -2780
],
- "id": "79d9adf8-7533-4091-940c-e8c7fa3a78d8",
+ "id": "1563fd09-6647-470b-8fa8-7a7672eccee0",
"name": "Skip post",
"credentials": {
"supabaseApi": {
@@ -167,10 +167,10 @@
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
- 2580,
- -2800
+ 2560,
+ -2780
],
- "id": "4b153f9b-dc12-412a-8a29-d88ce85333dd",
+ "id": "1a594090-55f7-40de-af92-1785631ab7bb",
"name": "Save post",
"credentials": {
"supabaseApi": {
@@ -200,10 +200,10 @@
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"typeVersion": 1,
"position": [
- 2100,
- -3100
+ 2080,
+ -3080
],
- "id": "b493e70e-5b81-4c7f-a215-7ee462fe2c16",
+ "id": "efd6d869-e1d9-475e-a674-e01a818aeacd",
"name": "Is it a story?"
},
{
@@ -215,9 +215,9 @@
"typeVersion": 4.2,
"position": [
20,
- -3120
+ -3100
],
- "id": "5e826a0e-f0ea-4c06-bcc5-daa3dea860df",
+ "id": "91dea14a-1058-4f89-b4f5-49e0e73a6801",
"name": "Get stories from Reddit"
},
{
@@ -255,10 +255,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 1380,
- -3120
+ 1360,
+ -3100
],
- "id": "3684de24-5db0-45f6-92ab-4e51b33a029a",
+ "id": "68ac32ab-8e6c-44c4-8a2b-fab2e9913b42",
"name": "Set fields"
},
{
@@ -277,10 +277,10 @@
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
- 1640,
- -3120
+ 1620,
+ -3100
],
- "id": "7dca3c40-fa2a-4a9c-9cfe-3d8063ae6bd4",
+ "id": "35cfadeb-a851-44d2-b2c4-a7fbc58f4b93",
"name": "Look up the id of the post",
"alwaysOutputData": true,
"credentials": {
@@ -317,10 +317,10 @@
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
- 1860,
- -3120
+ 1840,
+ -3100
],
- "id": "cddbeaf0-646c-4c2b-9994-e23585a4941e",
+ "id": "b996cc2e-eefa-45ea-8275-b0939c1fa4e8",
"name": "Already exists?"
},
{
@@ -344,7 +344,7 @@
920,
-1740
],
- "id": "451aa784-1e49-42f6-987e-27d62f89f978",
+ "id": "2eeb9e63-f01e-4ec8-8cda-8a2bb32739d9",
"name": "Get the next story to process",
"alwaysOutputData": true,
"credentials": {
@@ -364,9 +364,9 @@
460,
-760
],
- "id": "4197fb12-5181-4b41-94a5-bb9dccb3260d",
+ "id": "646deb58-6cc6-40f9-a76b-3ce9c27b3058",
"name": "Wait",
- "webhookId": "6e8a282a-9ef0-4c3d-b4dd-d4ca41366446"
+ "webhookId": "f7cb7ba8-fae0-41f1-8ee6-6313c48d04c4"
},
{
"parameters": {
@@ -376,20 +376,19 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
- 2040,
+ 2260,
-1080
],
- "id": "a4838968-b3a5-49db-ae56-9cdb18a02931",
+ "id": "667def5a-dc11-4a57-9000-46f1824dddca",
"name": "Download the video",
"alwaysOutputData": false,
- "retryOnFail": false,
- "disabled": true
+ "retryOnFail": false
},
{
"parameters": {
"resource": "video",
"operation": "upload",
- "title": "={{ $('Generate video').item.json.output.videoTitle }}",
+ "title": "={{ $('Cleanup title').item.json.title }}",
"regionCode": "HU",
"categoryId": "24",
"options": {}
@@ -397,12 +396,17 @@
"type": "n8n-nodes-base.youTube",
"typeVersion": 1,
"position": [
- 2280,
+ 2720,
-1080
],
- "id": "6a73d69b-2d06-4572-bb55-314d48c09641",
+ "id": "7e11ac67-91e0-4a13-bcc8-8837addaf160",
"name": "Share on YouTube",
- "disabled": true
+ "credentials": {
+ "youTubeOAuth2Api": {
+ "id": "EvIEz3KvgFMPW9Ap",
+ "name": "YouTube account"
+ }
+ }
},
{
"parameters": {
@@ -415,7 +419,7 @@
680,
-760
],
- "id": "30a011e7-4dcd-463c-b8cf-2a08824ba188",
+ "id": "02d0225e-fdaf-43ac-b8f7-b016e1697847",
"name": "Check video status",
"alwaysOutputData": false,
"retryOnFail": false
@@ -461,7 +465,7 @@
20,
-760
],
- "id": "5b3cfb99-781f-4745-9682-a2ef205fd971",
+ "id": "0facd03d-1798-405e-a270-3b61289067fc",
"name": "Start creating the video"
},
{
@@ -552,7 +556,7 @@
940,
-760
],
- "id": "5395584d-28d2-470a-b8ac-55ba53bd8c32",
+ "id": "3b213ca9-1584-4f23-97ab-90d507774e78",
"name": "Switch"
},
{
@@ -563,7 +567,7 @@
1500,
-1060
],
- "id": "64895f22-34bd-4be7-a7a6-cc18d2014ba9",
+ "id": "3e13268d-d04e-4ade-91cd-f8810bd38a48",
"name": "No Operation, do nothing"
},
{
@@ -573,7 +577,7 @@
{
"id": "761be6c7-4a57-4c29-b24b-0e7769515baf",
"name": "text",
- "value": "={{ $json.text.trim().replace(/\\n/g, '').replace(/ {2,}/g, ' ').replace(/\\*/g, '') }}",
+ "value": "={{ $json.text.replace(/\\n/g, '').replace(/ {2,}/g, ' ').replace(/\\*/g, '').trim() }}",
"type": "string"
}
]
@@ -586,7 +590,7 @@
2140,
-1740
],
- "id": "56c8bb6c-f100-467f-b44a-f27f85975528",
+ "id": "28062ee4-2e06-4609-92bf-6940650e30de",
"name": "Cleanup text"
},
{
@@ -627,7 +631,7 @@
1440,
-1740
],
- "id": "0d33f56e-957c-47f7-bbbf-1122c1da83f1",
+ "id": "c26b45b7-1adf-46a7-b5c7-8af6211390f9",
"name": "Create character"
},
{
@@ -659,15 +663,14 @@
1740,
-740
],
- "id": "e13beed6-5e8a-4890-aea3-40b9fc21a235",
+ "id": "f8905eb1-4417-4644-8676-39d23cdc645c",
"name": "Set status to created",
"credentials": {
"supabaseApi": {
"id": "ITjsOe1zjbHScIWk",
"name": "Supabase revange videos"
}
- },
- "disabled": true
+ }
},
{
"parameters": {
@@ -695,18 +698,17 @@
"type": "n8n-nodes-base.supabase",
"typeVersion": 1,
"position": [
- 2580,
+ 3020,
-740
],
- "id": "0acd45ff-340c-4be1-8e9a-e3910789a0bb",
+ "id": "64e2703d-fcea-4733-8276-580e63df08ac",
"name": "Set status to uploaded",
"credentials": {
"supabaseApi": {
"id": "ITjsOe1zjbHScIWk",
"name": "Supabase revange videos"
}
- },
- "disabled": true
+ }
},
{
"parameters": {
@@ -737,7 +739,7 @@
1280,
-1060
],
- "id": "9d064092-54ba-4a51-8c4a-eac40145565a",
+ "id": "b6b68753-1a7c-4329-90be-c8674fcf91f7",
"name": "Set status to failed",
"credentials": {
"supabaseApi": {
@@ -750,7 +752,7 @@
"parameters": {
"content": "# Add more stories to the database",
"height": 940,
- "width": 3600
+ "width": 3640
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
@@ -758,7 +760,7 @@
-420,
-3380
],
- "id": "a973c25f-9151-4924-b581-3fbfa29f00f7",
+ "id": "b989335e-78d8-4d7d-acfc-db9bea70910f",
"name": "Sticky Note"
},
{
@@ -769,7 +771,7 @@
1480,
-2060
],
- "id": "d306d19c-124d-4cb4-895f-dfcdf4281021",
+ "id": "f0e676b5-0cc2-4604-800b-d6edafb1d6a9",
"name": "No unprocessed stories in the database"
},
{
@@ -793,10 +795,10 @@
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
- 3020,
+ 3260,
-1580
],
- "id": "95ea7117-5b8e-4ed8-875d-7dbf217136d6",
+ "id": "2279ea5f-d97a-470c-a91d-480dfa54cbba",
"name": "HTTP Request"
},
{
@@ -819,7 +821,7 @@
640,
-1740
],
- "id": "e93dabb8-e238-4a29-8110-a052ddc1b378",
+ "id": "44bd9195-a6d8-4c76-b2df-02bb39f623c5",
"name": "Setup sex of the main character"
},
{
@@ -847,13 +849,13 @@
{
"id": "efa00bce-d84c-450a-ae7e-41cbf4ffdda8",
"name": "server_url",
- "value": "ADD_YOUR_SERVER_URL",
+ "value": "YOUR_SERVER_URL",
"type": "string"
},
{
"id": "5b5a9281-1de3-429e-aaf3-8da03a38b979",
"name": "lang_code",
- "value": "en-gb",
+ "value": "en-us",
"type": "string"
},
{
@@ -878,7 +880,7 @@
20,
-1740
],
- "id": "242c8f06-72f6-48a1-94ac-cc4ec106f39e",
+ "id": "13eedf3b-9702-4690-b631-828c7478563f",
"name": "Configuration for story writing"
},
{
@@ -891,7 +893,7 @@
360,
-1740
],
- "id": "7bdf4290-038e-4525-a345-e9ef4b4d4311",
+ "id": "edebb0b2-f25b-4f85-a39a-a8cb20466b77",
"name": "Setup language"
},
{
@@ -911,10 +913,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3720,
+ 3760,
-1580
],
- "id": "6827003c-2716-4948-b13d-2b7a09b49e34",
+ "id": "4a9a196d-f0f0-415e-a25a-0a9ab85b6379",
"name": "Set the final voice"
},
{
@@ -945,10 +947,10 @@
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
- 2520,
+ 2880,
-1740
],
- "id": "a444f01a-5236-46f3-9bc3-d1fab10e84e1",
+ "id": "e5252ddf-3fa5-4588-b8c6-030ff89c7097",
"name": "Is there a pre-selected voice to use?"
},
{
@@ -968,10 +970,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3100,
+ 3340,
-1860
],
- "id": "1d2570b8-b26c-477c-a62c-885a5ff65794",
+ "id": "0212e5ae-6e6f-463c-a544-70a14caec462",
"name": "Keep the original voice value"
},
{
@@ -991,10 +993,10 @@
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
- 3200,
+ 3440,
-1580
],
- "id": "21a172d0-0eae-40ac-804e-9055f610c2ad",
+ "id": "611fdd64-a7c3-4eb4-b068-096dd8f226df",
"name": "Set a random voice"
},
{
@@ -1027,7 +1029,7 @@
1180,
-1740
],
- "id": "3d8013e6-08cb-40f1-9ca9-0be9c0a32c3a",
+ "id": "533ff614-5db7-4258-a763-c61bfe395cf0",
"name": "Is there a story to process?"
},
{
@@ -1048,7 +1050,7 @@
1780,
-1740
],
- "id": "d29267f6-65cd-49b3-a406-5e8fe3343ee4",
+ "id": "da8fcb1c-5ac9-4b1a-b135-7c141cc8b855",
"name": "Write the story"
},
{
@@ -1071,7 +1073,7 @@
1480,
-740
],
- "id": "5415ef3b-c896-4cbb-a739-78511abbca87",
+ "id": "529a6c6f-0183-43ce-9ab6-ca1c808d808a",
"name": "Setup the download url"
},
{
@@ -1087,7 +1089,7 @@
-420,
-4120
],
- "id": "0c179610-cef6-4f59-a204-b5fd349bb1a4",
+ "id": "b184a26e-2a26-41e8-8726-41a9de7beff7",
"name": "Sticky Note1"
},
{
@@ -1100,7 +1102,7 @@
-140,
-3940
],
- "id": "73ff609c-f2fc-4937-aa0e-feb47d4daa2e",
+ "id": "af8f8351-76a6-4cd5-bc63-95170882933b",
"name": "OpenRouter Chat Model"
},
{
@@ -1113,7 +1115,7 @@
20,
-3760
],
- "id": "96902f9a-3c7b-40a4-9540-8249c19fff86",
+ "id": "dc42f68f-edf1-4c1d-b190-def1ca83df9c",
"name": "Google Gemini Chat Model"
},
{
@@ -1131,14 +1133,8 @@
-320,
-3940
],
- "id": "65e2fbe6-b007-4717-9b76-bee0c513f545",
- "name": "OpenAI Chat Model",
- "credentials": {
- "openAiApi": {
- "id": "tGvJRP2th9CbI2oq",
- "name": "OpenAi account 2"
- }
- }
+ "id": "d7ed9581-131e-4e43-ad83-3efbd77dcdbc",
+ "name": "OpenAI Chat Model"
},
{
"parameters": {
@@ -1150,7 +1146,7 @@
-320,
-3760
],
- "id": "0b04564a-b228-4c34-aece-3ddfe3a2331b",
+ "id": "b75384d1-e5d2-4462-addd-b95248b19cee",
"name": "Azure OpenAI Chat Model"
},
{
@@ -1163,14 +1159,14 @@
-140,
-3760
],
- "id": "d9b0d547-8544-4bf9-916b-7371a9de715f",
+ "id": "cec973c7-090e-4267-b9c5-c0fad859b19e",
"name": "xAI Grok Chat Model"
},
{
"parameters": {
"content": "# Create a story, generate a video and upload to YouTube",
"height": 1880,
- "width": 4420,
+ "width": 4440,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
@@ -1179,7 +1175,7 @@
-420,
-2300
],
- "id": "caf8d1fb-cab3-41fc-8051-9c7dd26af071",
+ "id": "93ebc2e0-e4f5-4951-b4a9-05d9fe2f8a9b",
"name": "Sticky Note2"
},
{
@@ -1195,7 +1191,7 @@
-40,
-1900
],
- "id": "d7555f8e-9199-4e7c-b412-27e29a63aedd",
+ "id": "0fba4f6a-37c4-4795-94b8-8a327f41d95c",
"name": "Sticky Note3"
},
{
@@ -1207,15 +1203,15 @@
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
- 720,
+ 680,
-4100
],
- "id": "52bb677f-73ae-4540-9edd-eb9fd4dcc724",
+ "id": "b7ccf28b-57ca-4ab0-a094-0a5087b06cbb",
"name": "Sticky Note4"
},
{
"parameters": {
- "content": "# 1. Make sure to add a trigger node to both of the workflows\n\n# 2. Feel free to separate these workflows\n",
+ "content": "# 1. Make sure to add a trigger node to both of the workflows\n\n# 2. Feel free to separate these workflows\n\n# 3. Make sure the background video is 1920x1080",
"height": 800,
"width": 640,
"color": 5
@@ -1224,10 +1220,47 @@
"typeVersion": 1,
"position": [
-1180,
- -2740
+ -2820
],
- "id": "59fdc886-f8a5-4938-9da1-73bd548aa3d7",
+ "id": "eb47f2db-0dd7-4303-bdcd-a04aeaa9e62f",
"name": "Sticky Note5"
+ },
+ {
+ "parameters": {
+ "promptType": "define",
+ "text": "=<Instructions>\nCreate an attention-grabbing title, that is consise and descriptive for the following story in {{ $('Setup language').item.json.language }} ({{ $('Configuration for story writing').item.json.lang_code }}) language. The title should be maximum 100 characters.\n</Instructions>\n\n<Story>\n{{ $json.text }}\n</Story>"
+ },
+ "type": "@n8n/n8n-nodes-langchain.chainLlm",
+ "typeVersion": 1.6,
+ "position": [
+ 2320,
+ -1740
+ ],
+ "id": "a8023d4d-0002-4fae-8f9d-5bbbc5c7c968",
+ "name": "Create title"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "5528f120-1fb8-4ef0-9357-f206ee8c4afe",
+ "name": "title",
+ "value": "={{ $json.text.replace(/\\n/g, '').replace(/ {2,}/g, ' ').replace(/\\*/g, '').trim() }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ 2680,
+ -1740
+ ],
+ "id": "5db9d0b9-02a3-4b16-af96-9a99db4378b5",
+ "name": "Cleanup title"
}
],
"pinData": {},
@@ -1236,7 +1269,7 @@
"main": [
[
{
- "node": "Get stories from Reddit",
+ "node": "Configuration for story writing",
"type": "main",
"index": 0
}
@@ -1271,6 +1304,11 @@
"node": "Create character",
"type": "ai_languageModel",
"index": 0
+ },
+ {
+ "node": "Create title",
+ "type": "ai_languageModel",
+ "index": 0
}
]
]
@@ -1480,7 +1518,7 @@
"main": [
[
{
- "node": "Is there a pre-selected voice to use?",
+ "node": "Create title",
"type": "main",
"index": 0
}
@@ -1670,17 +1708,39 @@
}
]
]
+ },
+ "Create title": {
+ "main": [
+ [
+ {
+ "node": "Cleanup title",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Cleanup title": {
+ "main": [
+ [
+ {
+ "node": "Is there a pre-selected voice to use?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
- "versionId": "fee10e1c-db8c-45ec-945d-38248a90341e",
+ "versionId": "12c64860-5f84-4fc7-9ff7-bd48b5a68bc5",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
},
- "id": "2yetvBGqqsH9DQLB",
+ "id": "FPpFkTG9ia6gOgd4",
"tags": []
}
\ No newline at end of file