Skip to content

Add episode 40

David53925e405b39
diff --git a/README.md b/README.md
index 89aed1e..c924e51 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,7 @@ In this repo, you can find the n8n templates we created for the episodes of [AI
- [Episode 36: Viral bodycam footage creator with Sora 2](episode_36)
- [Episode 38: Create AI reaction videos with Veo 3.1 and n8n](episode_38)
- [Episode 39: Create infographics with Nano Banana Pro in n8n](episode_39)
+- [Episode 40: Flux.2[dev] with n8n](episode_40)
## servers
diff --git a/episode_40/README.md b/episode_40/README.md
new file mode 100644
index 0000000..b127889
--- /dev/null
+++ b/episode_40/README.md
@@ -0,0 +1,24 @@
+# Episode 40: Flux.2[dev] with n8n
+
+Flux.2[dev] was just released - and boy, is it powerful! In this episode, we explore how to integrate Flux.2[dev] into n8n workflows using Cloudflare Workers AI and Fal.ai.
+
+## [📚 Join our Skool community for support, premium content and more!](https://www.skool.com/ai-agents-az/about)
+
+### Get the premium versions of the workflows and the exclusive content - with the hosted GPU media server
+
+## Free n8n JSON workflow
+
+- [n8n workflow: test flux.2[dev]](workflow_test_flux2.json)
+- [n8n subworkflow: flux.2[dev] on cludflare](subworkflow_cloudflare.json)
+- [n8n subworkflow: flux.2[dev] on fal.ai](subworkflow_fal.json)
+
+## Additional resources
+
+- [Join n8n](https://n8n.partnerlinks.io/fenoo5ekqs1g)
+- [Cloudflare](https://dash.cloudflare.com)
+- [Fal.ai API keys](https://fal.ai/dashboard/keys)
+- [Cloudflare pricing for Workers AI](https://developers.cloudflare.com/workers-ai/platform/pricing/)
+
+## Watch the video
+
+[![Flux.2 is out - here's how to use it in n8n (free workflow)](https://img.youtube.com/vi/Wlc7j26EiJc/0.jpg)](https://www.youtube.com/watch?v=Wlc7j26EiJc)
diff --git a/episode_40/subworkflow_cloudflare.json b/episode_40/subworkflow_cloudflare.json
new file mode 100644
index 0000000..90f5038
--- /dev/null
+++ b/episode_40/subworkflow_cloudflare.json
@@ -0,0 +1,233 @@
+{
+ "name": "Cloudflare Workers AI Flux.2[dev]",
+ "nodes": [
+ {
+ "parameters": {
+ "operation": "toBinary",
+ "sourceProperty": "result.image",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.convertToFile",
+ "typeVersion": 1.1,
+ "position": [
+ 256,
+ 16
+ ],
+ "id": "b21a2b62-1884-4fa6-8624-69d93add3f9d",
+ "name": "Convert to File"
+ },
+ {
+ "parameters": {
+ "url": "https://api.cloudflare.com/client/v4/accounts",
+ "authentication": "genericCredentialType",
+ "genericAuthType": "httpBearerAuth",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -224,
+ 16
+ ],
+ "id": "dc4d5eb9-f53d-4f3a-b994-1ef29c3fad9f",
+ "name": "Get accounts",
+ "credentials": {
+ "httpBearerAuth": {
+ "id": "kqNEEhWZWQ3WxEaq",
+ "name": "Cloudflare AI workers"
+ }
+ }
+ },
+ {
+ "parameters": {
+ "workflowInputs": {
+ "values": [
+ {
+ "name": "prompt"
+ },
+ {
+ "name": "width",
+ "type": "number"
+ },
+ {
+ "name": "height",
+ "type": "number"
+ }
+ ]
+ }
+ },
+ "type": "n8n-nodes-base.executeWorkflowTrigger",
+ "typeVersion": 1.1,
+ "position": [
+ -640,
+ 16
+ ],
+ "id": "a26ab354-80b9-459d-906a-40329661e4fe",
+ "name": "When Executed by Another Workflow"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "3f7d5020-0710-4f3c-858f-0485a2bd2963",
+ "name": "width",
+ "value": "={{ $json.width || 1024 }}",
+ "type": "number"
+ },
+ {
+ "id": "39b906fa-3e0b-45b9-9c1b-95cbc51e195d",
+ "name": "prompt",
+ "value": "={{ $json.prompt }}",
+ "type": "string"
+ },
+ {
+ "id": "3f8593d2-cfb3-437a-a9fc-4430995cb78f",
+ "name": "height",
+ "value": "={{ $json.height || 1024 }}",
+ "type": "number"
+ },
+ {
+ "id": "065181ef-404a-4860-9019-976e6e8391e0",
+ "name": "seed",
+ "value": "={{ Math.floor(Math.random() * 100000000) }}",
+ "type": "number"
+ },
+ {
+ "id": "2c131da3-e708-4468-bb09-d400e7e5f28c",
+ "name": "steps",
+ "value": 28,
+ "type": "number"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -464,
+ 16
+ ],
+ "id": "7877d477-4677-4c16-95a9-ffe07b21248a",
+ "name": "Setup workflow"
+ },
+ {
+ "parameters": {
+ "content": "# 🚨Add the CloudFlare API token, read this carefully\n\n### Go to your CloudFlare account -> Manage Account -> Account API tokens\n### Click on 'Create token'\n### Select the the 'Workers AI' template\n### From the permissions, click on 'Add more'\n### Select 'Account Settings' and add 'Read' permissions\n### Click save and copy the token, add it as a bearer token to both HTTP nodes",
+ "height": 560,
+ "width": 448
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -288,
+ -384
+ ],
+ "id": "ba8808e8-640e-4b9b-a4e7-d73c07268e03",
+ "name": "Sticky Note"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "=https://api.cloudflare.com/client/v4/accounts/{{ $json.result[0].id }}/ai/run/@cf/black-forest-labs/flux-2-dev",
+ "authentication": "genericCredentialType",
+ "genericAuthType": "httpBearerAuth",
+ "sendBody": true,
+ "contentType": "multipart-form-data",
+ "bodyParameters": {
+ "parameters": [
+ {
+ "name": "prompt",
+ "value": "={{ $('Setup workflow').item.json.prompt }}"
+ },
+ {
+ "name": "steps",
+ "value": "25"
+ },
+ {
+ "name": "width",
+ "value": "1024"
+ },
+ {
+ "name": "height",
+ "value": "768"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.3,
+ "position": [
+ 0,
+ 16
+ ],
+ "id": "f95afb0f-e6f1-48ad-b608-6967e8d59f28",
+ "name": "Generate image",
+ "credentials": {
+ "httpBearerAuth": {
+ "id": "kqNEEhWZWQ3WxEaq",
+ "name": "Cloudflare AI workers"
+ }
+ }
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "Get accounts": {
+ "main": [
+ [
+ {
+ "node": "Generate image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "When Executed by Another Workflow": {
+ "main": [
+ [
+ {
+ "node": "Setup workflow",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Setup workflow": {
+ "main": [
+ [
+ {
+ "node": "Get accounts",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Generate image": {
+ "main": [
+ [
+ {
+ "node": "Convert to File",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "90d65bf6-4731-4969-893b-b38f099c839e",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "2s0SYdaCPkUb5NmS",
+ "tags": []
+}
\ No newline at end of file
diff --git a/episode_40/subworkflow_fal.json b/episode_40/subworkflow_fal.json
new file mode 100644
index 0000000..906d5d7
--- /dev/null
+++ b/episode_40/subworkflow_fal.json
@@ -0,0 +1,328 @@
+{
+ "name": "Fal.ai flux.2[dev] image edit subworkflow",
+ "nodes": [
+ {
+ "parameters": {
+ "workflowInputs": {
+ "values": [
+ {
+ "name": "prompt"
+ },
+ {
+ "name": "image_urls",
+ "type": "array"
+ },
+ {
+ "name": "aspect_ratio"
+ }
+ ]
+ }
+ },
+ "type": "n8n-nodes-base.executeWorkflowTrigger",
+ "typeVersion": 1.1,
+ "position": [
+ -800,
+ 16
+ ],
+ "id": "06410802-a73d-4248-8cbe-952e2254edda",
+ "name": "When Executed by Another Workflow"
+ },
+ {
+ "parameters": {},
+ "type": "n8n-nodes-base.wait",
+ "typeVersion": 1.1,
+ "position": [
+ -384,
+ 16
+ ],
+ "id": "dccfb78a-f2a1-47f6-bcd9-2103819a9729",
+ "name": "Wait for seed image",
+ "webhookId": "faf281d9-5c11-49d9-8d84-cf5dc8906ffc"
+ },
+ {
+ "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": [
+ 0,
+ 0
+ ],
+ "id": "096afdc9-300f-4be9-864b-37af51b92b0b",
+ "name": "Seed image status"
+ },
+ {
+ "parameters": {
+ "url": "={{ $json.images[0].url }}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 384,
+ 16
+ ],
+ "id": "e7e762bf-21d0-425e-8292-ce5ec9d41a2d",
+ "name": "Download the image"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('⚠️ Generate image').item.json.response_url }}",
+ "authentication": "genericCredentialType",
+ "genericAuthType": "httpHeaderAuth",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 208,
+ 16
+ ],
+ "id": "69dd687f-2156-4ae6-9a89-0654e5e0f35d",
+ "name": "Get the image",
+ "alwaysOutputData": false,
+ "retryOnFail": true,
+ "credentials": {
+ "httpHeaderAuth": {
+ "id": "BUYuOe8V0hqLtA02",
+ "name": "fal.ai"
+ }
+ }
+ },
+ {
+ "parameters": {
+ "url": "={{ $('⚠️ Generate image').item.json.status_url }}",
+ "authentication": "genericCredentialType",
+ "genericAuthType": "httpHeaderAuth",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -192,
+ 16
+ ],
+ "id": "c859c495-f148-4b39-9fbc-ee63cc363793",
+ "name": "⚠️ Get status of the image",
+ "credentials": {
+ "httpHeaderAuth": {
+ "id": "BUYuOe8V0hqLtA02",
+ "name": "fal.ai"
+ }
+ }
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "https://queue.fal.run/fal-ai/nano-banana/edit",
+ "authentication": "genericCredentialType",
+ "genericAuthType": "httpHeaderAuth",
+ "sendBody": true,
+ "specifyBody": "json",
+ "jsonBody": "={{\n JSON.stringify({\n prompt: $json.prompt,\n image_urls: $json.image_urls,\n image_size: $json.aspect_ratio,\n num_inference_steps: 28,\n guidance_scale: 2.5\n }, null, 2)\n}}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -608,
+ 16
+ ],
+ "id": "74c93133-41cb-4cf1-a89b-1cd3e3e5097e",
+ "name": "⚠️ Generate image",
+ "credentials": {
+ "httpHeaderAuth": {
+ "id": "BUYuOe8V0hqLtA02",
+ "name": "fal.ai"
+ }
+ }
+ },
+ {
+ "parameters": {
+ "content": "# 🚨Add Fal.ai API token\n\n### 1. Go to your Fal.ai account -> [Manage API keys](https://fal.ai/dashboard/keys)\n### 2. Click on 'Add key' and create a new one\n### 3. Create a new header authentication\n### 4. For the name, add Authorization\n\n### 5. And for the value\n\n```\nkey <your API key>\n```\n\nfor example \n```\nkey ASDFDASFASD\n```\n\n### 6. Select the authentication for both HTTP nodes",
+ "height": 768,
+ "width": 608
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -640,
+ -528
+ ],
+ "id": "edb0cb65-8109-4bf8-971d-870bfa540250",
+ "name": "Sticky Note"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "When Executed by Another Workflow": {
+ "main": [
+ [
+ {
+ "node": "⚠️ Generate image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Wait for seed image": {
+ "main": [
+ [
+ {
+ "node": "⚠️ Get status of the image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Seed image status": {
+ "main": [
+ [
+ {
+ "node": "Get the image",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait for seed image",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait for seed image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Get the image": {
+ "main": [
+ [
+ {
+ "node": "Download the image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "⚠️ Get status of the image": {
+ "main": [
+ [
+ {
+ "node": "Seed image status",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "⚠️ Generate image": {
+ "main": [
+ [
+ {
+ "node": "Wait for seed image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "2123b03b-5b87-4da3-a86d-b5604331e6c7",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "PCR4xcdLMGIsz1cT",
+ "tags": []
+}
\ No newline at end of file
diff --git a/episode_40/workflow_test_flux2.json b/episode_40/workflow_test_flux2.json
new file mode 100644
index 0000000..1e44584
--- /dev/null
+++ b/episode_40/workflow_test_flux2.json
@@ -0,0 +1,498 @@
+{
+ "name": "Test Flux.2[dev]",
+ "nodes": [
+ {
+ "parameters": {
+ "formTitle": "Testing Flux.2[dev]",
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "Which model would you like to try?",
+ "fieldType": "radio",
+ "fieldOptions": {
+ "values": [
+ {
+ "option": "Flux.2[dev] on Cloudflare (text to image)"
+ },
+ {
+ "option": "Flux.2[dev] on Fal.ai (image to image)"
+ }
+ ]
+ },
+ "requiredField": true
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.formTrigger",
+ "typeVersion": 2.3,
+ "position": [
+ -448,
+ -16
+ ],
+ "id": "3e810985-ed7e-488c-873e-6295cd2c3fca",
+ "name": "On form submission",
+ "webhookId": "edad4a97-783d-49c6-805f-7e103a577f18"
+ },
+ {
+ "parameters": {
+ "rules": {
+ "values": [
+ {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "leftValue": "={{ $json['Which model would you like to try?'] }}",
+ "rightValue": "Flex.2[dev] on Fal.ai (image to image)",
+ "operator": {
+ "type": "string",
+ "operation": "equals"
+ },
+ "id": "defa6e48-6baf-497b-a4c1-960987412c25"
+ }
+ ],
+ "combinator": "and"
+ },
+ "renameOutput": true,
+ "outputKey": "fal.ai"
+ },
+ {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "290b74a1-c538-480b-b0d9-67a888ab8559",
+ "leftValue": "={{ $json['Which model would you like to try?'] }}",
+ "rightValue": "Flux.2[dev] on Cloudflare (text to image)",
+ "operator": {
+ "type": "string",
+ "operation": "equals",
+ "name": "filter.operator.equals"
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "renameOutput": true,
+ "outputKey": "cloudflare"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.switch",
+ "typeVersion": 3.3,
+ "position": [
+ -256,
+ -16
+ ],
+ "id": "942a24f1-5691-473e-86bb-b4322517f899",
+ "name": "Switch"
+ },
+ {
+ "parameters": {
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "Images",
+ "fieldType": "file",
+ "acceptFileTypes": ".jpg,.png",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "prompt",
+ "fieldType": "textarea",
+ "placeholder": "you can reference the images in your prompt",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "Aspect ratio",
+ "fieldType": "dropdown",
+ "fieldOptions": {
+ "values": [
+ {
+ "option": "square_hd"
+ },
+ {
+ "option": "square"
+ },
+ {
+ "option": "portrait_4_3"
+ },
+ {
+ "option": "portrait_16_9"
+ },
+ {
+ "option": "landscape_4_3"
+ },
+ {
+ "option": "landscape_16_9"
+ }
+ ]
+ },
+ "requiredField": true
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.form",
+ "typeVersion": 2.3,
+ "position": [
+ 0,
+ -176
+ ],
+ "id": "a127cce7-4adf-4349-a060-049a4c956ffd",
+ "name": "Input for image edit",
+ "webhookId": "118e0602-a227-4544-8c6c-106677f50eba"
+ },
+ {
+ "parameters": {
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "Image prompt",
+ "fieldType": "textarea",
+ "placeholder": "you image prompt",
+ "requiredField": true
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.form",
+ "typeVersion": 2.3,
+ "position": [
+ 0,
+ 96
+ ],
+ "id": "12963f01-883c-4b99-ad01-f1fbf038e205",
+ "name": "Input for text to image",
+ "webhookId": "6e6a027b-be56-475c-ab6e-1c642cd8d57f"
+ },
+ {
+ "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 }\n}];"
+ },
+ "type": "n8n-nodes-base.code",
+ "typeVersion": 2,
+ "position": [
+ 192,
+ -176
+ ],
+ "id": "ec7a01cf-55d9-412b-b91d-5be7cd13b92b",
+ "name": "Convert images to base64"
+ },
+ {
+ "parameters": {
+ "operation": "completion",
+ "completionTitle": "The image is ready!",
+ "completionMessage": "=<img src=\"{{ $json.images[0].url }}\" alt=\"\" width=\"100%\" />",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.form",
+ "typeVersion": 2.3,
+ "position": [
+ 608,
+ -176
+ ],
+ "id": "b0ffcfe7-86b0-47d3-8f14-c9c93ad09fb1",
+ "name": "Image edit is done",
+ "webhookId": "d3637dd8-7059-4b6d-8efa-41fd56e55c22"
+ },
+ {
+ "parameters": {
+ "options": {
+ "formTitle": "Your image is ready",
+ "formDescription": "=<img src=\"data:image/png;base64,{{ $json.data }}\" width=\"100%\" alt=\"\" />",
+ "buttonLabel": "Close form"
+ }
+ },
+ "type": "n8n-nodes-base.form",
+ "typeVersion": 2.3,
+ "position": [
+ 608,
+ 96
+ ],
+ "id": "7dbe9937-d748-4031-a1d4-dc1d2f04f40d",
+ "name": "Text to image is done",
+ "webhookId": "d3637dd8-7059-4b6d-8efa-41fd56e55c22"
+ },
+ {
+ "parameters": {
+ "content": "# 📚 [Join our Skool community for video automations, support, premium content and more!](https://www.skool.com/ai-agents-az/about)\n\n## premium workflows\n## hosted GPU media server\n## voice cloning\n\n## Long-form video tools like \n### LoFi music video creator\n### Sleep video create",
+ "height": 452,
+ "width": 1292,
+ "color": 6
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -464,
+ -688
+ ],
+ "id": "f2b206e0-a315-4fd5-8ff1-607787390476",
+ "name": "Sticky Note17"
+ },
+ {
+ "parameters": {
+ "operation": "binaryToPropery",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.extractFromFile",
+ "typeVersion": 1.1,
+ "position": [
+ 400,
+ 96
+ ],
+ "id": "fa5c46a5-8bbc-47ed-b247-6ea843a01884",
+ "name": "Convert image to base64"
+ },
+ {
+ "parameters": {
+ "workflowId": {
+ "__rl": true,
+ "value": "PCR4xcdLMGIsz1cT",
+ "mode": "list",
+ "cachedResultUrl": "/workflow/PCR4xcdLMGIsz1cT",
+ "cachedResultName": "Fal.ai flux.2[dev] image edit subworkflow"
+ },
+ "workflowInputs": {
+ "mappingMode": "defineBelow",
+ "value": {
+ "image_urls": "={{ $json.files }}",
+ "prompt": "={{ $('Input for image edit').item.json.prompt }}",
+ "aspect_ratio": "={{ $('Input for image edit').item.json['Aspect ratio'] }}"
+ },
+ "matchingColumns": [],
+ "schema": [
+ {
+ "id": "prompt",
+ "displayName": "prompt",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "string",
+ "removed": false
+ },
+ {
+ "id": "image_urls",
+ "displayName": "image_urls",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "array",
+ "removed": false
+ },
+ {
+ "id": "aspect_ratio",
+ "displayName": "aspect_ratio",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "string",
+ "removed": false
+ }
+ ],
+ "attemptToConvertTypes": false,
+ "convertFieldsToString": true
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.executeWorkflow",
+ "typeVersion": 1.3,
+ "position": [
+ 400,
+ -176
+ ],
+ "id": "8736f92d-e8a0-471d-9170-0e6c22e927a4",
+ "name": "Call 'Fal.ai flux.2[dev] image edit subworkflow'"
+ },
+ {
+ "parameters": {
+ "workflowId": {
+ "__rl": true,
+ "value": "2s0SYdaCPkUb5NmS",
+ "mode": "list",
+ "cachedResultUrl": "/workflow/2s0SYdaCPkUb5NmS",
+ "cachedResultName": "Cloudflare Workers AI Flux.2[dev]"
+ },
+ "workflowInputs": {
+ "mappingMode": "defineBelow",
+ "value": {
+ "width": 1024,
+ "height": 768,
+ "prompt": "={{ $json['Image prompt'] }}"
+ },
+ "matchingColumns": [],
+ "schema": [
+ {
+ "id": "prompt",
+ "displayName": "prompt",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "string",
+ "removed": false
+ },
+ {
+ "id": "width",
+ "displayName": "width",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "number",
+ "removed": false
+ },
+ {
+ "id": "height",
+ "displayName": "height",
+ "required": false,
+ "defaultMatch": false,
+ "display": true,
+ "canBeUsedToMatch": true,
+ "type": "number",
+ "removed": false
+ }
+ ],
+ "attemptToConvertTypes": false,
+ "convertFieldsToString": true
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.executeWorkflow",
+ "typeVersion": 1.3,
+ "position": [
+ 192,
+ 96
+ ],
+ "id": "36395b1e-2bf0-4139-b49b-98bc3a8ce9c8",
+ "name": "Call 'Cloudflare Workers AI Flux.2[dev]'"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "On form submission": {
+ "main": [
+ [
+ {
+ "node": "Switch",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Switch": {
+ "main": [
+ [
+ {
+ "node": "Input for image edit",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Input for text to image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Input for image edit": {
+ "main": [
+ [
+ {
+ "node": "Convert images to base64",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Convert images to base64": {
+ "main": [
+ [
+ {
+ "node": "Call 'Fal.ai flux.2[dev] image edit subworkflow'",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Input for text to image": {
+ "main": [
+ [
+ {
+ "node": "Call 'Cloudflare Workers AI Flux.2[dev]'",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Convert image to base64": {
+ "main": [
+ [
+ {
+ "node": "Text to image is done",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Call 'Fal.ai flux.2[dev] image edit subworkflow'": {
+ "main": [
+ [
+ {
+ "node": "Image edit is done",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Call 'Cloudflare Workers AI Flux.2[dev]'": {
+ "main": [
+ [
+ {
+ "node": "Convert image to base64",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "eb02eb8b-4426-42e8-bff7-05ad03507299",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "IhWGM7HQQIuhtjzz",
+ "tags": []
+}
\ No newline at end of file