Episode 31
David4473afa7f262
diff --git a/README.md b/README.mdindex 6959d93..39ef3a7 100644--- a/README.md+++ b/README.md@@ -28,6 +28,8 @@ In this repo, you can find the n8n templates we created for the episodes of [AI- [Episode 22: Sleep long-form videos with GPT-5, ElevenMusic, Imagen4, Seendance and n8n](episode_22)- [Episode 23: UGC videos with nanobanana and n8n](episode_23)- [Episode 24: generate images with Qwen Image, Flux.1 [dev] and Flux.1 Schnell with modal.com and Cloudflare Workers AI](episode_24)+- [Episode 25: Fal.ai n8n subworkflows for Qwen Image Edit Plus and Wan 2.2 animate](episode_25)+- [Episode 31: Veo 3.1 is now in n8n - how to use it for FREE](episode_31)## serversdiff --git a/episode_25/README.md b/episode_25/README.mdnew file mode 100644index 0000000..9290aa3--- /dev/null+++ b/episode_25/README.md@@ -0,0 +1,28 @@+# Episode 25: China is winning the open AI model race++While Meta spends all its money poaching Open AI employees, Alibaba opened the open weight floodgates. There's even a Nano Banana killer in their upgrades. Did the new AI models from China just become the new table stakes? Let's find out...++<table>+ <tr>+ <td>+ <a href="https://www.skool.com/ai-agents-az/about">📚 Earn passive income with video generation in our Skool community</a>+ </td>+ <td>+ <img width="548" height="596" alt="Screenshot 2025-07-29 at 3 23 33 PM" src="https://github.com/user-attachments/assets/d687b58d-92d0-44c0-93f8-7be23d3cb80c" />+ </td>+ </tr>+</table>++## Free n8n JSON workflows++- [n8n subworkflow for Qwen Image Edit Plus (2509) with fal.ai](n8n_qwen_image_edit_2509.json)+- [n8n workflow for Wan 2.2 animate - move with fal.ai](wan_22_animate_move.json)+- [n8n workflow for Wan 2.2 animate - replace with fal.ai](wan_22_animate_replace.json)++## Additional resources++- [Join n8n](https://n8n.partnerlinks.io/fenoo5ekqs1g)++## Watch the video++[](https://www.youtube.com/watch?v=IPU7hf-zoIk)diff --git a/episode_25/n8n_qwen_image_edit_2509.json b/episode_25/n8n_qwen_image_edit_2509.jsonnew file mode 100644index 0000000..4758d65--- /dev/null+++ b/episode_25/n8n_qwen_image_edit_2509.json@@ -0,0 +1,436 @@+{+ "name": "Qwen image edit 2509",+ "nodes": [+ {+ "parameters": {+ "formTitle": "Use Qwen image edit 2509",+ "formFields": {+ "values": [+ {+ "fieldLabel": "Images",+ "fieldType": "file",+ "acceptFileTypes": ".png,.jpg,.avif,.webp",+ "requiredField": true+ },+ {+ "fieldLabel": "Prompt",+ "fieldType": "textarea",+ "requiredField": true+ },+ {+ "fieldLabel": "Image size",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "portrait_16_9"+ },+ {+ "option": "landscape_16_9"+ },+ {+ "option": "portrait_4_3"+ },+ {+ "option": "landscape_4_3"+ },+ {+ "option": "square"+ },+ {+ "option": "square_hd"+ }+ ]+ },+ "requiredField": true+ },+ {+ "fieldLabel": "Negative prompt",+ "fieldType": "textarea"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.formTrigger",+ "typeVersion": 2.3,+ "position": [+ -576,+ 0+ ],+ "id": "fcfa843a-449a-42f2-9e8e-770b7b179056",+ "name": "On form submission",+ "webhookId": "60425abe-e885-428c-931b-def03e4badd3"+ },+ {+ "parameters": {+ "content": "# Generate image",+ "height": 288,+ "width": 1172,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -96,+ -80+ ],+ "id": "554bcb5c-d699-4f0e-86a1-8855a843cde5",+ "name": "Sticky Note19"+ },+ {+ "parameters": {+ "url": "={{ $json.images[0].url }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 1136,+ 32+ ],+ "id": "63cd255e-ec17-45e9-a45e-025df49c98e2",+ "name": "Download the image"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "https://queue.fal.run/fal-ai/qwen-image-edit-plus",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={{\n JSON.stringify({\n \"prompt\": $json.prompt,\n \"image_size\": $json.image_size,\n \"num_inference_steps\": 50,\n \"guidance_scale\": 4,\n \"num_images\": 1,\n \"image_urls\": $json.files,\n \"negative_prompt\": $json.negative_prompt,\n}, null, 2)\n}}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ -32,+ 0+ ],+ "id": "53c455c5-a8a0-4e07-8f46-b91dd30ee211",+ "name": "⚠️ Generate image",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {},+ "type": "n8n-nodes-base.wait",+ "typeVersion": 1.1,+ "position": [+ 288,+ -16+ ],+ "id": "069b700d-99ad-4170-ade6-636801b68bf0",+ "name": "Wait for image generation",+ "webhookId": "c2af0d99-26e3-43ab-84fd-62b58465d2cd"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate image').item.json.status_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 496,+ -16+ ],+ "id": "254ff5f0-bd17-4f5f-99bd-ffc6058ea512",+ "name": "⚠️ Get status of the image generation",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "rules": {+ "values": [+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "leftValue": "={{ $json.status }}",+ "rightValue": "COMPLETED",+ "operator": {+ "type": "string",+ "operation": "equals"+ },+ "id": "6fc5bea4-1567-474b-bfca-5394eb303217"+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "COMPLETED"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "0882f634-2472-4d24-a1c3-a39f0cd94855",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_PROGRESS",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_PROGRESS"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "e6c8b207-13ac-4537-8c5c-677039bc2fef",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_QUEUE",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_QUEUE"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.switch",+ "typeVersion": 3.2,+ "position": [+ 736,+ -16+ ],+ "id": "980bb88f-d46e-4afc-bbde-b1c4d450a0e3",+ "name": "Image status"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate image').item.json.response_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 960,+ 32+ ],+ "id": "d55bca9d-ddd1-4335-93a6-b910cde16def",+ "name": "Get the image",+ "alwaysOutputData": false,+ "retryOnFail": true,+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "jsCode": "const results = [];\n\nfor (const file in $input.first().binary) {\n try {\n const bin = $input.first().binary[file];\n const binBuffer = await this.helpers.getBinaryDataBuffer(0, file);\n\n const path = bin.directory\n ? `${bin.directory}/${bin.fileName}`\n : bin.fileName;\n\n results.push(`data:${bin.mimeType};base64,` + Buffer.from(binBuffer).toString('base64'));\n } catch (error) {\n console.error(`Error processing file \"${file}\": ${error.message}`);\n }\n}\n\nreturn [{\n json: {\n files: results, \n prompt:$input.first().json.Prompt,\n negative_prompt: $input.first().json['Negative prompt'] || '',\n image_size: $input.first().json['Image size']\n }\n}];"+ },+ "type": "n8n-nodes-base.code",+ "typeVersion": 2,+ "position": [+ -320,+ 0+ ],+ "id": "218f0e3a-b1c2-4dc2-a07a-2d602b781cd6",+ "name": "Convert images to base64"+ },+ {+ "parameters": {+ "content": "# Download",+ "height": 288,+ "width": 276,+ "color": 4+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ 1104,+ -80+ ],+ "id": "be147505-acb8-46f4-a685-61bd54991f4d",+ "name": "Sticky Note"+ },+ {+ "parameters": {+ "content": "# Prepare data",+ "height": 288,+ "width": 276,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -80+ ],+ "id": "1f2c56d8-fa7b-4969-beed-5354cd40d6db",+ "name": "Sticky Note1"+ },+ {+ "parameters": {+ "content": "# 📚 [Join our Premium AI video generation community!](https://www.skool.com/ai-agents-az/about)\n\n## Create videos and build passive income on YouTube",+ "height": 156,+ "width": 1484,+ "color": 6+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -272+ ],+ "id": "6f950cad-64da-4da6-af77-78efed9363d0",+ "name": "Sticky Note16"+ }+ ],+ "pinData": {},+ "connections": {+ "On form submission": {+ "main": [+ [+ {+ "node": "Convert images to base64",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Generate image": {+ "main": [+ [+ {+ "node": "Wait for image generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Wait for image generation": {+ "main": [+ [+ {+ "node": "⚠️ Get status of the image generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Get status of the image generation": {+ "main": [+ [+ {+ "node": "Image status",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Image status": {+ "main": [+ [+ {+ "node": "Get the image",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for image generation",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for image generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Get the image": {+ "main": [+ [+ {+ "node": "Download the image",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Convert images to base64": {+ "main": [+ [+ {+ "node": "⚠️ Generate image",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "c0fd9ef1-9ed8-4a3c-a046-743bf2b5b4f6",+ "meta": {+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"+ },+ "id": "Jov3lktZ49j7LjA4",+ "tags": []+}\ No newline at end of filediff --git a/episode_25/wan_22_animate_move.json b/episode_25/wan_22_animate_move.jsonnew file mode 100644index 0000000..3a75baf--- /dev/null+++ b/episode_25/wan_22_animate_move.json@@ -0,0 +1,426 @@+{+ "name": "Wan 2.2 animate move",+ "nodes": [+ {+ "parameters": {+ "formTitle": "Wan 2.2 animate (replace)",+ "formFields": {+ "values": [+ {+ "fieldLabel": "Video",+ "fieldType": "file",+ "multipleFiles": false,+ "acceptFileTypes": ".mp4",+ "requiredField": true+ },+ {+ "fieldLabel": "Image",+ "fieldType": "file",+ "multipleFiles": false,+ "acceptFileTypes": ".png,.jpg,.avif,.webp",+ "requiredField": true+ },+ {+ "fieldLabel": "Resolution",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "480p"+ },+ {+ "option": "580p"+ },+ {+ "option": "720p"+ }+ ]+ },+ "requiredField": true+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.formTrigger",+ "typeVersion": 2.3,+ "position": [+ -576,+ 0+ ],+ "id": "f5d1fe32-dba4-4693-b572-92827900b738",+ "name": "On form submission",+ "webhookId": "12031b7e-9e6c-4543-bb92-e0987112cc99"+ },+ {+ "parameters": {+ "content": "# Generate image",+ "height": 288,+ "width": 1172,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -96,+ -80+ ],+ "id": "fd9c0e55-86e7-4be7-87ce-d2cccf74835d",+ "name": "Sticky Note19"+ },+ {+ "parameters": {+ "content": "# Download",+ "height": 288,+ "width": 276,+ "color": 4+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ 1104,+ -80+ ],+ "id": "0193f299-6ae8-4f4a-9d67-5f776e50bb2d",+ "name": "Sticky Note"+ },+ {+ "parameters": {+ "content": "# 📚 [Join our Premium AI video generation community!](https://www.skool.com/ai-agents-az/about)\n\n## Create videos and build passive income on YouTube",+ "height": 156,+ "width": 1484,+ "color": 6+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -272+ ],+ "id": "87790ffc-55c0-4cf9-9c60-ab4fe4650154",+ "name": "Sticky Note16"+ },+ {+ "parameters": {+ "content": "# Prepare data",+ "height": 288,+ "width": 276,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -80+ ],+ "id": "7c1b9842-dddd-413d-b9d1-d205323a9595",+ "name": "Sticky Note1"+ },+ {+ "parameters": {+ "jsCode": "const results = [];\n\nfor (const file in $input.first().binary) {\n try {\n const bin = $input.first().binary[file];\n const binBuffer = await this.helpers.getBinaryDataBuffer(0, file);\n\n const path = bin.directory\n ? `${bin.directory}/${bin.fileName}`\n : bin.fileName;\n\n results.push(`data:${bin.mimeType};base64,` + Buffer.from(binBuffer).toString('base64'));\n } catch (error) {\n console.error(`Error processing file \"${file}\": ${error.message}`);\n }\n}\n\nreturn [{\n json: {\n files: results, \n resolution: $input.first().json['Resolution']\n }\n}];"+ },+ "type": "n8n-nodes-base.code",+ "typeVersion": 2,+ "position": [+ -320,+ 0+ ],+ "id": "391a1ac7-b92b-442e-9364-c9e03479869e",+ "name": "Convert video+image to base64"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "https://queue.fal.run/fal-ai/wan/v2.2-14b/animate/move",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={{\n JSON.stringify({\n \"video_url\": $json.files[0],\n \"image_url\": $json.files[0],\n \"resolution\": $json.resolution\n}, null, 2)\n}}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ -32,+ 0+ ],+ "id": "112a13b7-7b65-4392-9a89-082598d04af7",+ "name": "⚠️ Generate video",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {},+ "type": "n8n-nodes-base.wait",+ "typeVersion": 1.1,+ "position": [+ 288,+ -16+ ],+ "id": "983a5250-d722-4735-a2d7-19911b395205",+ "name": "Wait for video generation",+ "webhookId": "375d3b6f-0fa6-45ce-a0ad-cdc17cab59f3"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate video').item.json.status_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 496,+ -16+ ],+ "id": "58f2baba-ed13-440e-bdd4-ba105796fdc2",+ "name": "⚠️ Get status of the video generation",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "rules": {+ "values": [+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "leftValue": "={{ $json.status }}",+ "rightValue": "COMPLETED",+ "operator": {+ "type": "string",+ "operation": "equals"+ },+ "id": "6fc5bea4-1567-474b-bfca-5394eb303217"+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "COMPLETED"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "0882f634-2472-4d24-a1c3-a39f0cd94855",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_PROGRESS",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_PROGRESS"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "e6c8b207-13ac-4537-8c5c-677039bc2fef",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_QUEUE",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_QUEUE"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.switch",+ "typeVersion": 3.2,+ "position": [+ 736,+ -16+ ],+ "id": "77fbca2b-4a6d-4d2c-9532-a6d99e41d509",+ "name": "Video status"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate video').item.json.response_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 960,+ 32+ ],+ "id": "6dfc7134-1410-4a2b-abe6-b976447eaa66",+ "name": "Get the video",+ "alwaysOutputData": false,+ "retryOnFail": true,+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "url": "={{ $json.images[0].url }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 1184,+ 32+ ],+ "id": "dd316ead-9651-49df-b297-6a2b072456f0",+ "name": "Download the video"+ }+ ],+ "pinData": {},+ "connections": {+ "On form submission": {+ "main": [+ [+ {+ "node": "Convert video+image to base64",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Convert video+image to base64": {+ "main": [+ [+ {+ "node": "⚠️ Generate video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Generate video": {+ "main": [+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Wait for video generation": {+ "main": [+ [+ {+ "node": "⚠️ Get status of the video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Get status of the video generation": {+ "main": [+ [+ {+ "node": "Video status",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Video status": {+ "main": [+ [+ {+ "node": "Get the video",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Get the video": {+ "main": [+ [+ {+ "node": "Download the video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "8036694f-25d3-4954-9bc8-9a69b2fec685",+ "meta": {+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"+ },+ "id": "cjHzpZmoaFMBqKxJ",+ "tags": []+}\ No newline at end of filediff --git a/episode_25/wan_22_animate_replace.json b/episode_25/wan_22_animate_replace.jsonnew file mode 100644index 0000000..401b5a8--- /dev/null+++ b/episode_25/wan_22_animate_replace.json@@ -0,0 +1,426 @@+{+ "name": "Wan 2.2 animate replace",+ "nodes": [+ {+ "parameters": {+ "formTitle": "Wan 2.2 animate (replace)",+ "formFields": {+ "values": [+ {+ "fieldLabel": "Video",+ "fieldType": "file",+ "multipleFiles": false,+ "acceptFileTypes": ".mp4",+ "requiredField": true+ },+ {+ "fieldLabel": "Image",+ "fieldType": "file",+ "multipleFiles": false,+ "acceptFileTypes": ".png,.jpg,.avif,.webp",+ "requiredField": true+ },+ {+ "fieldLabel": "Resolution",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "480p"+ },+ {+ "option": "580p"+ },+ {+ "option": "720p"+ }+ ]+ },+ "requiredField": true+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.formTrigger",+ "typeVersion": 2.3,+ "position": [+ -576,+ 0+ ],+ "id": "dbafa7c7-05fd-4824-8a44-0d7079a68f5e",+ "name": "On form submission",+ "webhookId": "35e85019-cbe1-4b8f-b79b-71fb72e53b1f"+ },+ {+ "parameters": {+ "content": "# Generate image",+ "height": 288,+ "width": 1172,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -96,+ -80+ ],+ "id": "30229a7f-4006-4748-a2cf-3da50467d8d7",+ "name": "Sticky Note19"+ },+ {+ "parameters": {+ "content": "# Download",+ "height": 288,+ "width": 276,+ "color": 4+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ 1104,+ -80+ ],+ "id": "653f5012-fd08-4415-951f-f306091d9dbe",+ "name": "Sticky Note"+ },+ {+ "parameters": {+ "content": "# 📚 [Join our Premium AI video generation community!](https://www.skool.com/ai-agents-az/about)\n\n## Create videos and build passive income on YouTube",+ "height": 156,+ "width": 1484,+ "color": 6+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -272+ ],+ "id": "fb73b36b-2a0d-41e1-a08c-8c1b8adf4207",+ "name": "Sticky Note16"+ },+ {+ "parameters": {+ "content": "# Prepare data",+ "height": 288,+ "width": 276,+ "color": 7+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -400,+ -80+ ],+ "id": "6544a748-b315-44db-ba1e-f4bd24260b4b",+ "name": "Sticky Note1"+ },+ {+ "parameters": {+ "jsCode": "const results = [];\n\nfor (const file in $input.first().binary) {\n try {\n const bin = $input.first().binary[file];\n const binBuffer = await this.helpers.getBinaryDataBuffer(0, file);\n\n const path = bin.directory\n ? `${bin.directory}/${bin.fileName}`\n : bin.fileName;\n\n results.push(`data:${bin.mimeType};base64,` + Buffer.from(binBuffer).toString('base64'));\n } catch (error) {\n console.error(`Error processing file \"${file}\": ${error.message}`);\n }\n}\n\nreturn [{\n json: {\n files: results, \n resolution: $input.first().json['Resolution']\n }\n}];"+ },+ "type": "n8n-nodes-base.code",+ "typeVersion": 2,+ "position": [+ -320,+ 0+ ],+ "id": "547a5561-9912-4022-9ff9-8b303cd89692",+ "name": "Convert video+image to base64"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "https://queue.fal.run/fal-ai/wan/v2.2-14b/animate/replace",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={{\n JSON.stringify({\n \"video_url\": $json.files[0],\n \"image_url\": $json.files[0],\n \"resolution\": $json.resolution\n}, null, 2)\n}}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ -32,+ 0+ ],+ "id": "a7ffedbf-00e8-48e1-a573-735d124b991a",+ "name": "⚠️ Generate video",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {},+ "type": "n8n-nodes-base.wait",+ "typeVersion": 1.1,+ "position": [+ 288,+ -16+ ],+ "id": "c7480ae3-7c3f-4493-b27b-dffab11d9821",+ "name": "Wait for video generation",+ "webhookId": "9969f11f-f1d6-4dc2-8790-e6c076ec4482"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate video').item.json.status_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 496,+ -16+ ],+ "id": "a8e81a00-d1ef-483d-89b8-867460012110",+ "name": "⚠️ Get status of the video generation",+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "rules": {+ "values": [+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "leftValue": "={{ $json.status }}",+ "rightValue": "COMPLETED",+ "operator": {+ "type": "string",+ "operation": "equals"+ },+ "id": "6fc5bea4-1567-474b-bfca-5394eb303217"+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "COMPLETED"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "0882f634-2472-4d24-a1c3-a39f0cd94855",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_PROGRESS",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_PROGRESS"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "e6c8b207-13ac-4537-8c5c-677039bc2fef",+ "leftValue": "={{ $json.status }}",+ "rightValue": "IN_QUEUE",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "IN_QUEUE"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.switch",+ "typeVersion": 3.2,+ "position": [+ 736,+ -16+ ],+ "id": "bdf7cab4-137d-4ba0-b4e1-1cc16e9a0e91",+ "name": "Video status"+ },+ {+ "parameters": {+ "url": "={{ $('⚠️ Generate video').item.json.response_url }}",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 960,+ 32+ ],+ "id": "dfa6ea28-25f2-454a-aa8c-7c8ac844d4d1",+ "name": "Get the video",+ "alwaysOutputData": false,+ "retryOnFail": true,+ "credentials": {+ "httpHeaderAuth": {+ "id": "BUYuOe8V0hqLtA02",+ "name": "fal.ai"+ }+ }+ },+ {+ "parameters": {+ "url": "={{ $json.images[0].url }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 1184,+ 32+ ],+ "id": "995f7562-ccc6-45f1-964e-6ce843bfe560",+ "name": "Download the video"+ }+ ],+ "pinData": {},+ "connections": {+ "On form submission": {+ "main": [+ [+ {+ "node": "Convert video+image to base64",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Convert video+image to base64": {+ "main": [+ [+ {+ "node": "⚠️ Generate video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Generate video": {+ "main": [+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Wait for video generation": {+ "main": [+ [+ {+ "node": "⚠️ Get status of the video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "⚠️ Get status of the video generation": {+ "main": [+ [+ {+ "node": "Video status",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Video status": {+ "main": [+ [+ {+ "node": "Get the video",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait for video generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Get the video": {+ "main": [+ [+ {+ "node": "Download the video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "421e8030-1a7c-4fde-b14e-f3004762d201",+ "meta": {+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"+ },+ "id": "Vn6AJsMe5TnCsC2Z",+ "tags": []+}\ No newline at end of filediff --git a/episode_31/README.md b/episode_31/README.mdnew file mode 100644index 0000000..0d99cfa--- /dev/null+++ b/episode_31/README.md@@ -0,0 +1,26 @@+# Episode 31: Veo 3.1 is now in n8n - how to use it for FREE++While Meta spends all its money poaching Open AI employees, Alibaba opened the open weight floodgates. There's even a Nano Banana killer in their upgrades. Did the new AI models from China just become the new table stakes? Let's find out...++<table>+ <tr>+ <td>+ <a href="https://www.skool.com/ai-agents-az/about">📚 Earn passive income with video generation in our Skool community</a>+ </td>+ <td>+ <img width="548" height="596" alt="Screenshot 2025-07-29 at 3 23 33 PM" src="https://github.com/user-attachments/assets/d687b58d-92d0-44c0-93f8-7be23d3cb80c" />+ </td>+ </tr>+</table>++## Free n8n JSON workflows++- [n8n workflow for Veo 3.1 with Vertex API](veo_31.json) - make sure to watch the video where we show you how to setup Vertex API++## Additional resources++- [Join n8n](https://n8n.partnerlinks.io/fenoo5ekqs1g)++## Watch the video++[](https://www.youtube.com/watch?v=bNzkWBOE37Y)diff --git a/episode_31/veo_31.json b/episode_31/veo_31.jsonnew file mode 100644index 0000000..0e97be6--- /dev/null+++ b/episode_31/veo_31.json@@ -0,0 +1,462 @@+{+ "name": "Veo 3.1",+ "nodes": [+ {+ "parameters": {+ "formTitle": "Create video using Veo 3.1",+ "formFields": {+ "values": [+ {+ "fieldLabel": "prompt",+ "requiredField": true+ },+ {+ "fieldLabel": "Resolution",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "720p"+ },+ {+ "option": "1080p"+ }+ ]+ },+ "requiredField": true+ },+ {+ "fieldLabel": "Aspect ratio",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "16:9"+ },+ {+ "option": "9:16"+ }+ ]+ },+ "requiredField": true+ },+ {+ "fieldLabel": "Video duration (seconds)",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "4"+ },+ {+ "option": "6"+ },+ {+ "option": "8"+ }+ ]+ },+ "requiredField": true+ },+ {+ "fieldLabel": "Start image",+ "fieldType": "file",+ "multipleFiles": false+ },+ {+ "fieldLabel": "End image",+ "fieldType": "file",+ "multipleFiles": false+ },+ {+ "fieldLabel": "Generate audio",+ "fieldType": "checkbox",+ "fieldOptions": {+ "values": [+ {+ "option": "Generate audio"+ }+ ]+ }+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.formTrigger",+ "typeVersion": 2.3,+ "position": [+ -480,+ 240+ ],+ "id": "58d7a073-418f-4a6d-8139-dcc81b33cede",+ "name": "On form submission",+ "webhookId": "056622a7-8752-4a57-aefb-603af43766da"+ },+ {+ "parameters": {+ "jsCode": "const results = {};\n\nfor (const file in $input.first().binary) {\n try {\n const bin = $input.first().binary[file];\n const binBuffer = await this.helpers.getBinaryDataBuffer(0, file);\n\n const path = bin.directory\n ? `${bin.directory}/${bin.fileName}`\n : bin.fileName;\n\n results[file] = {\n data: Buffer.from(binBuffer).toString('base64'),\n mime: bin.mimeType,\n };\n } catch (error) {\n console.error(`Error processing file \"${file}\": ${error.message}`);\n }\n}\n\nreturn [{\n json: {\n files: results,\n }\n}];"+ },+ "type": "n8n-nodes-base.code",+ "typeVersion": 2,+ "position": [+ -288,+ 240+ ],+ "id": "5cccb52d-efa0-491d-bdc7-8aa6329d5a0a",+ "name": "Convert images to base64"+ },+ {+ "parameters": {+ "content": "# Configure me",+ "height": 352,+ "width": 256,+ "color": 3+ },+ "type": "n8n-nodes-base.stickyNote",+ "position": [+ -80,+ 112+ ],+ "typeVersion": 1,+ "id": "8e718074-4807-4523-9395-b32588b5ef05",+ "name": "Sticky Note"+ },+ {+ "parameters": {+ "assignments": {+ "assignments": [+ {+ "id": "6e9fbe2d-6636-4df2-8054-811f855d376d",+ "name": "PROJECT_ID",+ "value": "<<add your project id here>>",+ "type": "string"+ },+ {+ "id": "1e65c4b0-c7c0-4876-a710-0b720931e3f6",+ "name": "LOCATION_ID",+ "value": "us-central1",+ "type": "string"+ },+ {+ "id": "0bef756a-6e2a-434f-9f42-ff4a74a1de64",+ "name": "API_ENDPOINT",+ "value": "us-central1-aiplatform.googleapis.com",+ "type": "string"+ },+ {+ "id": "30431164-1a3f-4194-92aa-5c966bd87e54",+ "name": "MODEL_ID",+ "value": "veo-3.1-generate-preview",+ "type": "string"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.set",+ "typeVersion": 3.4,+ "position": [+ -16,+ 240+ ],+ "id": "0df2ab0a-1d55-4647-b113-c9e2f93159e0",+ "name": "Configure me"+ },+ {+ "parameters": {+ "assignments": {+ "assignments": [+ {+ "id": "acc5846c-f85a-49d8-9e31-00a77714332f",+ "name": "URL",+ "value": "=https://{{ $json.API_ENDPOINT }}/v1/projects/{{ $json.PROJECT_ID }}/locations/{{ $json.LOCATION_ID }}/publishers/google/models/{{ $json.MODEL_ID }}:predictLongRunning",+ "type": "string"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.set",+ "typeVersion": 3.4,+ "position": [+ 336,+ 240+ ],+ "id": "b2cddaff-e680-4278-b58f-40700c42d5d8",+ "name": "Setup workflow"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "=https://{{ $('Configure me').item.json.API_ENDPOINT }}/v1/projects/{{ $('Configure me').item.json.PROJECT_ID }}/locations/{{ $('Configure me').item.json.LOCATION_ID }}/publishers/google/models/{{ $('Configure me').item.json.MODEL_ID }}:fetchPredictOperation",+ "authentication": "predefinedCredentialType",+ "nodeCredentialType": "googleOAuth2Api",+ "sendHeaders": true,+ "headerParameters": {+ "parameters": [+ {+ "name": "Content-Type",+ "value": "application/json"+ }+ ]+ },+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={{ JSON.stringify({\n \"operationName\": $('Start generating the video').first().json.name\n}, null, 2) }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 1040,+ 240+ ],+ "id": "29b00c88-0749-459f-bb20-1d2242764d8d",+ "name": "Get the status of the generation",+ "credentials": {+ "httpBearerAuth": {+ "id": "Y58EiorQxBVC7D3s",+ "name": "Together AI"+ },+ "googleOAuth2Api": {+ "id": "gqjs2rxPPrzlaDcw",+ "name": "Google account 2"+ }+ }+ },+ {+ "parameters": {+ "conditions": {+ "options": {+ "version": 2,+ "leftValue": "",+ "caseSensitive": true,+ "typeValidation": "strict"+ },+ "conditions": [+ {+ "id": "5de4dcc5-afd1-49ab-aa0e-c2c6ecf247e1",+ "operator": {+ "type": "boolean",+ "operation": "true",+ "singleValue": true+ },+ "leftValue": "={{ $json.done }}",+ "rightValue": ""+ }+ ],+ "combinator": "and"+ },+ "options": {}+ },+ "id": "7b57aeb7-e8d0-4708-81f1-c071085fb41f",+ "name": "If",+ "type": "n8n-nodes-base.if",+ "position": [+ 1248,+ 240+ ],+ "typeVersion": 2.2+ },+ {+ "parameters": {+ "method": "POST",+ "url": "={{ $json.URL }}",+ "authentication": "predefinedCredentialType",+ "nodeCredentialType": "googleOAuth2Api",+ "sendHeaders": true,+ "headerParameters": {+ "parameters": [+ {+ "name": "Content-Type",+ "value": "application/json"+ }+ ]+ },+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={{ JSON.stringify({\n endpoint: `projects/${$('Configure me').item.json.PROJECT_ID}/locations/${$('Configure me').item.json.LOCATION_ID}/publishers/google/models/${$('Configure me').item.json.MODEL_ID}`,\n instances: [\n {\n prompt: $('On form submission').item.json.prompt,\n image: $('Convert images to base64').item.json.files['Start_image'] ? {\n \"bytesBase64Encoded\": $('Convert images to base64').item.json.files['Start_image'].data,\n \"mimeType\": $('Convert images to base64').item.json.files['Start_image'].mime\n } : undefined,\n \"lastFrame\": $('Convert images to base64').item.json.files['End_image'] ? {\n \"bytesBase64Encoded\": $('Convert images to base64').item.json.files['End_image'].data,\n \"mimeType\": $('Convert images to base64').item.json.files['End_image'].mime\n } : undefined,\n }\n ],\n parameters: {\n aspectRatio: $('On form submission').item.json['Aspect ratio'],\n sampleCount: 1,\n // negativePrompt: \"\",\n // enhancePrompt: true,\n // compressionQuality: \"optimized\",\n durationSeconds: $('On form submission').item.json['Video duration (seconds)'],\n personGeneration: \"allow_all\",\n addWatermark: true,\n includeRaiReason: true,\n generateAudio: $('On form submission').item.json['Generate audio'].some(item => item === 'Generate audio'),\n resolution: $('On form submission').item.json.Resolution,\n }\n}, null, 2) }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 544,+ 240+ ],+ "id": "29668dd6-3e25-4a74-adc3-53434c58c5ce",+ "name": "Start generating the video",+ "credentials": {+ "httpBearerAuth": {+ "id": "mAlc7q2DqJmGe72x",+ "name": "Google vertex"+ },+ "googleOAuth2Api": {+ "id": "gqjs2rxPPrzlaDcw",+ "name": "Google account 2"+ }+ }+ },+ {+ "parameters": {+ "operation": "toBinary",+ "sourceProperty": "response.videos[0].bytesBase64Encoded",+ "options": {}+ },+ "id": "6f9c245d-f857-478b-bfec-297511c57c11",+ "name": "Convert to File",+ "type": "n8n-nodes-base.convertToFile",+ "position": [+ 1760,+ 224+ ],+ "typeVersion": 1.1+ },+ {+ "parameters": {+ "amount": 15+ },+ "type": "n8n-nodes-base.wait",+ "typeVersion": 1.1,+ "position": [+ 800,+ 240+ ],+ "id": "837029ba-119a-4895-aee1-b598563d1b74",+ "name": "Initial wait",+ "webhookId": "973ad659-e1ca-4daf-b6f6-bf6242cb4be2"+ },+ {+ "parameters": {},+ "type": "n8n-nodes-base.wait",+ "typeVersion": 1.1,+ "position": [+ 1504,+ 416+ ],+ "id": "c1843d67-e4cf-46e7-9c14-239c85f28593",+ "name": "Wait before polling again",+ "webhookId": "d68106f3-971c-47b6-8800-e02a3e273b8c"+ }+ ],+ "pinData": {},+ "connections": {+ "On form submission": {+ "main": [+ [+ {+ "node": "Convert images to base64",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Convert images to base64": {+ "main": [+ [+ {+ "node": "Configure me",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Configure me": {+ "main": [+ [+ {+ "node": "Setup workflow",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Setup workflow": {+ "main": [+ [+ {+ "node": "Start generating the video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Get the status of the generation": {+ "main": [+ [+ {+ "node": "If",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "If": {+ "main": [+ [+ {+ "node": "Convert to File",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Wait before polling again",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Start generating the video": {+ "main": [+ [+ {+ "node": "Initial wait",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Initial wait": {+ "main": [+ [+ {+ "node": "Get the status of the generation",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Wait before polling again": {+ "main": [+ [+ {+ "node": "Initial wait",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "4b525164-15de-4691-9581-6f649eca19e0",+ "meta": {+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"+ },+ "id": "7NBDSgWh8e313CdP",+ "tags": []+}\ No newline at end of file