{
  "name": "Generate AI media with ComfyUI: Images, video, 3D & audio bridge",
  "nodes": [
    {
      "id": "4b4836b3-0a00-4ab1-ae02-d047e0ce9915",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -200,
        220
      ]
    },
    {
      "id": "dc9db75c-99a9-4e21-8521-64277a8919ee",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        1160,
        700
      ]
    },
    {
      "id": "854d1b0d-282b-4e9d-9f16-b344b3578dfb",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        160
      ]
    },
    {
      "id": "ca324db3-78a6-420c-91a7-58aac957483c",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1080,
        140
      ]
    },
    {
      "id": "ed82fb41-97f3-4c55-a564-0b3606d7d573",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1300,
        220
      ]
    },
    {
      "id": "3c40f341-466c-4202-8943-9654dba64f23",
      "name": "Get Generated Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1720,
        140
      ]
    },
    {
      "id": "036d5e1a-f6aa-41bb-aaae-cf623ff679a0",
      "name": "Fail Get History",
      "type": "n8n-nodes-base.code",
      "position": [
        740,
        560
      ]
    },
    {
      "id": "29ae5520-1a70-4bf3-b91d-5516b52528ab",
      "name": "Connection Config",
      "type": "n8n-nodes-base.set",
      "position": [
        20,
        220
      ]
    },
    {
      "id": "8b0633e2-0399-464a-8da2-7fefd199ae1d",
      "name": "Trigger LOCAL Workflow",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        340,
        200
      ]
    },
    {
      "id": "b22b686a-3f82-454f-b416-e21f7daab06c",
      "name": "Fail Trigger",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        720
      ]
    },
    {
      "id": "47b4c26a-fd30-444e-b068-bbd4d46b4606",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -60
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "6bb5fc8e-a31e-4bbc-a562-f5cc88449228",
      "name": "Write to error log",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1620,
        700
      ]
    },
    {
      "id": "6687c5ba-e28f-4eaa-9720-d5c5f237d1aa",
      "name": "Convert to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1400,
        700
      ]
    },
    {
      "id": "a65816db-72dd-4eaa-b540-5dc56fec03c9",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        940,
        700
      ]
    },
    {
      "id": "a440f7b1-eb70-499c-9989-9b4f2c99d38e",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1880,
        680
      ]
    },
    {
      "id": "37778379-98da-4e67-8656-2376cbd4d543",
      "name": "Discord Alert",
      "type": "n8n-nodes-base.discord",
      "position": [
        2040,
        680
      ]
    },
    {
      "id": "cc34d68c-8e38-4ac4-a63b-90b19142d863",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        440
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "b76b7268-7e4c-449e-9e8e-06c5f5317106",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -140,
        -740
      ]
    },
    {
      "id": "dedc67f5-7416-41f1-96bd-c349f285e5fc",
      "name": "🎨🏠 Run local ComfyUI workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        2420,
        -620
      ]
    },
    {
      "id": "2cf57e77-af83-45aa-a883-e3895251265d",
      "name": "Upload Attachments LOCAL",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1320,
        -960
      ]
    },
    {
      "id": "14dc4c91-ae32-4d6d-a8e0-6db04aec8859",
      "name": "Fail Upload",
      "type": "n8n-nodes-base.code",
      "position": [
        1680,
        -860
      ]
    },
    {
      "id": "a426d1a2-7ca0-47d5-84b7-7688dc04ca2c",
      "name": "Client ID",
      "type": "n8n-nodes-base.crypto",
      "position": [
        80,
        -740
      ]
    },
    {
      "id": "d7d9a07a-fcc1-44e8-a001-e941ecd5dc47",
      "name": "Wait For Test Type Select",
      "type": "n8n-nodes-base.wait",
      "position": [
        520,
        -740
      ]
    },
    {
      "id": "caf1fc4e-8e58-48df-8f0e-c77c59f6303f",
      "name": "If Img2Img",
      "type": "n8n-nodes-base.if",
      "position": [
        740,
        -740
      ]
    },
    {
      "id": "b9953a37-acef-4fc3-9ea4-99423f199bbe",
      "name": "Connection Config Duplicate",
      "type": "n8n-nodes-base.set",
      "position": [
        300,
        -740
      ]
    },
    {
      "id": "395d81cc-aeea-476e-9d5d-35f126d7312a",
      "name": "Fallback Txt2Img SDXL Turbo",
      "type": "n8n-nodes-base.set",
      "position": [
        1580,
        -400
      ]
    },
    {
      "id": "cd6c9c4b-1989-45ba-a602-434e6864e2c7",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1060,
        -960
      ]
    },
    {
      "id": "cfe6752b-c9ec-4596-968f-086efdacb191",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -300,
        -1360
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a2024fb6-ee65-4f49-847d-07de052983ed",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -1340
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "a32ac590-cb9b-4890-9151-5cd19f1f7cd6",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -680
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fc66546b-43a1-401d-86fb-f7e43d0096ef",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2280,
        -1340
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "de5a4cc0-67dc-45e5-8305-921c5c08e0c3",
      "name": "Link This To Error Handling",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1900,
        -860
      ]
    },
    {
      "id": "d2487de4-54cf-4376-bb6b-03eb63884d4f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        -860
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "2e481035-0225-4661-aa85-78a29933c9ee",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -860
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "82be0521-5b8b-4027-9a6b-2bace655d621",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        -860
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "5c2f294a-d8f1-48fe-8880-844f7c65c65c",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "63197f33-a485-4cb2-8170-acf4ad0bf6d9",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -860
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "595f59cd-f825-45f0-a9b0-1c13933c3260",
      "name": "Fallback Img2Img SDXL Turbo",
      "type": "n8n-nodes-base.set",
      "position": [
        1780,
        -1120
      ]
    },
    {
      "id": "66bbaec2-0cf4-48c2-81ad-3829350e5fd5",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1640,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "d01129f1-f2dd-4aa8-a722-babeb09cc47f",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "fffd202e-0279-4c18-bc75-be8b4ead50a9",
      "name": "Return The Output JSON Instead",
      "type": "n8n-nodes-base.set",
      "position": [
        2040,
        240
      ]
    },
    {
      "id": "4c2999bf-ef73-469d-84ac-b31a2c4a1faa",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1820,
        460
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "f11a67d4-78dc-4449-b1d1-5950f5178981",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1940,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "0c73e7c3-8bab-4c39-8bd8-e846b9c0cc27",
      "name": "Read API Exported Img2Img ComfyUI Workflow from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1540,
        -1220
      ]
    },
    {
      "id": "90ac3492-21c1-4df8-955a-ef9d4eba4c79",
      "name": "Extract Img2Img Comfy Workflow",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1780,
        -1300
      ]
    },
    {
      "id": "89814909-78f6-4dd3-8158-7cf9d68ca3e0",
      "name": "Edit Img2Img Inputs",
      "type": "n8n-nodes-base.set",
      "position": [
        2020,
        -1220
      ]
    },
    {
      "id": "9b479ac9-17e4-4a9c-b3fc-383eec6e534e",
      "name": "Read API Exported Txt2Img ComfyUI Workflow from Disk",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1340,
        -500
      ]
    },
    {
      "id": "c2057623-3e78-4057-81a9-5c321f31c621",
      "name": "Extract Txt2Img Comfy Workflow",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1580,
        -580
      ]
    },
    {
      "id": "9449e91c-da93-4344-8614-6e11a6a8a95a",
      "name": "Edit Txt2Img Inputs",
      "type": "n8n-nodes-base.set",
      "position": [
        1820,
        -500
      ]
    },
    {
      "id": "39e61de2-0592-4917-97f9-247069f29660",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    },
    {
      "id": "1d71da9e-73f6-46b2-ab02-ea5d43024426",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        40
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": ""
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Get Generated Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Upload Attachments LOCAL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Discord Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Client ID": {
      "main": [
        [
          {
            "node": "Connection Config Duplicate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Img2Img": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Read API Exported Txt2Img ComfyUI Workflow from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fail Upload": {
      "main": [
        [
          {
            "node": "Link This To Error Handling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fail Trigger": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fail Get History",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Write to error log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fail Get History": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Connection Config": {
      "main": [
        [
          {
            "node": "Trigger LOCAL Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Img2Img Inputs": {
      "main": [
        [
          {
            "node": "🎨🏠 Run local ComfyUI workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Txt2Img Inputs": {
      "main": [
        [
          {
            "node": "🎨🏠 Run local ComfyUI workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Generated Image": {
      "main": [
        [],
        [
          {
            "node": "Return The Output JSON Instead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger LOCAL Workflow": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fail Trigger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Attachments LOCAL": {
      "main": [
        [
          {
            "node": "Read API Exported Img2Img ComfyUI Workflow from Disk",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fail Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait For Test Type Select": {
      "main": [
        [
          {
            "node": "If Img2Img",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Connection Config Duplicate": {
      "main": [
        [
          {
            "node": "Wait For Test Type Select",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fallback Img2Img SDXL Turbo": {
      "main": [
        [
          {
            "node": "Edit Img2Img Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fallback Txt2Img SDXL Turbo": {
      "main": [
        [
          {
            "node": "Edit Txt2Img Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Img2Img Comfy Workflow": {
      "main": [
        [
          {
            "node": "Edit Img2Img Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Txt2Img Comfy Workflow": {
      "main": [
        [
          {
            "node": "Edit Txt2Img Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Connection Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Client ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read API Exported Img2Img ComfyUI Workflow from Disk": {
      "main": [
        [
          {
            "node": "Extract Img2Img Comfy Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fallback Img2Img SDXL Turbo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read API Exported Txt2Img ComfyUI Workflow from Disk": {
      "main": [
        [
          {
            "node": "Extract Txt2Img Comfy Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fallback Txt2Img SDXL Turbo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}