{
  "name": "image_generate_simple",
  "nodes": [
    {
      "parameters": {
        "operation": "write",
        "fileName": "./current_file.png",
        "dataPropertyName": "visual_asset",
        "options": {
          "append": false
        }
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        320,
        416
      ],
      "id": "9d48fcbc-7863-4d27-af28-bf873736dfbd",
      "name": "Read/Write Files from Disk"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        688,
        480
      ],
      "id": "e0de9290-5370-4901-8c31-2a339d240b52",
      "name": "Merge1",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "subject": "Your requested image!",
        "message": "=<!doctype html>\n<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta http-equiv=\"x-ua-compatible\" content=\"ie=edge\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>Thanks for subscribing!</title>\n    <style>\n      /* Preheader hide */\n      .preheader { display:none!important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; overflow:hidden; mso-hide:all; }\n      /* Dark mode basics */\n      @media (prefers-color-scheme: dark) {\n        body, table, td { background-color:#0b0c10 !important; color:#e6e6e6 !important; }\n        .container { background-color:#14161a !important; }\n        .muted { color:#a2a7b0 !important; }\n        .card { background:#1b1e24 !important; border-color:#2a2f37 !important; }\n        .btn { background:#3b82f6 !important; color:#ffffff !important; }\n      }\n    </style>\n  </head>\n  <body style=\"margin:0; padding:0; background:#f5f7fb;\">\n    <!-- Preheader text (preview in inbox) -->\n    <div class=\"preheader\">Your brand-styled image is attached. Book an AI chat anytime.</div>\n\n    <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" style=\"background:#f5f7fb;\">\n      <tr>\n        <td align=\"center\" style=\"padding:32px 12px;\">\n          <!-- Container -->\n          <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"600\" class=\"container\" style=\"width:600px; max-width:100%; background:#ffffff; border-radius:12px; border:1px solid #e8eaf0;\">\n            <!-- Header -->\n            <tr>\n              <td style=\"padding:28px 28px 0 28px; text-align:center;\">\n                <div style=\"font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:14px; letter-spacing:.08em; color:#6b7280; text-transform:uppercase;\">\n                  Thank you for subscribing\n                </div>\n                <h1 style=\"margin:8px 0 0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-weight:700; font-size:24px; line-height:1.3; color:#0f172a;\">\n                  Your AI-generated image is ready 🎉\n                </h1>\n              </td>\n            </tr>\n\n            <!-- Intro -->\n            <tr>\n              <td style=\"padding:18px 28px 0 28px;\">\n                <p style=\"margin:0 0 12px; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:16px; line-height:1.6; color:#111827;\">\n                  Thanks for subscribing to the newsletter and trying out the bot! As you can see, I used n8n and AI to generate an image in your brand.\n                </p>\n              </td>\n            </tr>\n\n            <!-- Prompt Card -->\n            <tr>\n              <td style=\"padding:8px 28px 0 28px;\">\n                <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"card\" style=\"background:#f9fafb; border:1px solid #e5e7eb; border-radius:10px;\">\n                  <tr>\n                    <td style=\"padding:14px 16px;\">\n                      <div style=\"font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:#6b7280; margin-bottom:6px;\">\n                        The prompt you submitted\n                      </div>\n                      <pre style=\"margin:0; white-space:pre-wrap; word-wrap:break-word; font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-size:14px; line-height:1.5; color:#111827;\">\n{{ $json[\"product description\"] }}</pre>\n                    </td>\n                  </tr>\n                </table>\n              </td>\n            </tr>\n\n            <!-- Image note -->\n            <tr>\n              <td style=\"padding:16px 28px 0 28px;\">\n                <p style=\"margin:0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:15px; line-height:1.6; color:#111827;\">\n                  The resulting image is attached to this email.\n                </p>\n              </td>\n            </tr>\n\n            <!-- Notifications -->\n            <tr>\n              <td style=\"padding:12px 28px 0 28px;\">\n                <p style=\"margin:0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:15px; line-height:1.6; color:#111827;\">\n                  You’ll automatically be notified when events are booked, and you’ll receive AI news alerts.\n                </p>\n              </td>\n            </tr>\n\n            <!-- CTA Button -->\n            <tr>\n              <td align=\"center\" style=\"padding:22px 28px 8px;\">\n                <!-- Bulletproof button -->\n                <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n                  <tr>\n                    <td align=\"center\" bgcolor=\"#111827\" style=\"border-radius:8px;\">\n                      <a href=\"https://calendly.com/justingirard/ai-art-chat\"\n                         style=\"display:inline-block; padding:12px 20px; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-weight:600; font-size:15px; color:#ffffff; text-decoration:none; background:#111827; border-radius:8px;\"\n                         target=\"_blank\" rel=\"noopener\">\n                        Book an AI Chat\n                      </a>\n                    </td>\n                  </tr>\n                </table>\n              </td>\n            </tr>\n\n            <!-- Learning blurb -->\n            <tr>\n              <td style=\"padding:8px 28px 0 28px;\">\n                <p style=\"margin:0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:14px; line-height:1.6; color:#374151;\">\n                  Interested in learning the AI ecosystem? Reply to this email and I’ll send upcoming workshop options.\n                </p>\n              </td>\n            </tr>\n\n            <!-- Divider -->\n            <tr>\n              <td style=\"padding:24px 28px 0 28px;\">\n                <hr role=\"presentation\" style=\"border:none; border-top:1px solid #e5e7eb; margin:0;\" />\n              </td>\n            </tr>\n\n            <!-- Footer -->\n            <tr>\n              <td style=\"padding:16px 28px 28px 28px; text-align:center;\">\n                <p class=\"muted\" style=\"margin:0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:12px; color:#6b7280; line-height:1.6;\">\n                  You’re receiving this because you subscribed or tried the bot. If this wasn’t you, you can ignore this email.\n                </p>\n                <!-- Optional unsubscribe / address -->\n                <!-- <p class=\"muted\" style=\"margin:8px 0 0; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; font-size:12px; color:#6b7280;\"> <a href=\"{{ unsubscribe_url }}\" style=\"color:#6b7280; text-decoration:underline;\">Unsubscribe</a> </p> -->\n              </td>\n            </tr>\n          </table>\n          <!-- /Container -->\n        </td>\n      </tr>\n    </table>\n  </body>\n</html>\n",
        "options": {
          "attachmentsUi": {
            "attachmentsBinary": [
              {}
            ]
          }
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        2720,
        576
      ],
      "id": "2c7086fd-62d3-4cc8-8d96-b58ab9ca6fde",
      "name": "Send a message",
      "webhookId": "76bcb9e6-7471-463e-a41b-45ce07c7953c",
      "credentials": {
        "gmailOAuth2": {
          "id": "Isr6XQlWNhydNLBu",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/predictions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"version\":\"google/nano-banana\",\n  \"input\":{\n    \"prompt\":\"Generate a new image, described, in the style of the attached image. The style image is attached, and this new image in the story is described below: {{ $json.message.content }}. t.\",\n    \"image_input\":[\"{{ $json.urls.get }}\"]\n  }\n  \n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        832,
        480
      ],
      "id": "3257b61a-9c96-4f10-90c9-d33db18e9ef3",
      "name": "Start AI Job",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1104,
        480
      ],
      "id": "dd02eee5-6ae9-44af-aaf4-064f97d6d8a1",
      "name": "Download AI Result",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "formTitle": "Generate an example ad in this style!",
        "formDescription": "Be creative, and I'll send you a branded image!",
        "formFields": {
          "values": [
            {
              "fieldLabel": "product description",
              "fieldType": "textarea",
              "requiredField": true
            },
            {
              "fieldLabel": "email",
              "fieldType": "email",
              "requiredField": true
            }
          ]
        },
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #fbfcfe;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #ffffff;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #555555;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #ff6d5a;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}"
        }
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        -640,
        544
      ],
      "id": "410d5593-c32d-4709-99b4-5e4d4ec342a9",
      "name": "Generate Ad",
      "webhookId": "465040be-1af9-4c84-9043-14e21046e17e",
      "alwaysOutputData": true
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        48,
        672
      ],
      "id": "e438747e-da22-49d8-8596-da8cf904038c",
      "name": "Merge2",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "amount": 30
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        976,
        480
      ],
      "id": "5e1baada-06e9-45fd-97f8-29728b92bc37",
      "name": "Wait",
      "webhookId": "203fd01b-b5da-4740-b17b-4a8272c51bcd"
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "value": "1Oy87MGy8_t4k1C6xdfZIzqCmpgMy3-DY",
          "mode": "id"
        },
        "options": {
          "binaryPropertyName": "visual_asset"
        }
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        -320,
        656
      ],
      "id": "51da97e5-29bf-4a56-bd77-5260d77fab7b",
      "name": "Download file",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "yvJ1cMHHlmA8sshk",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        -144,
        528
      ],
      "id": "949af380-0ca4-4f9c-ac0e-18f7efbb370d",
      "name": "Merge4",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-5-nano",
          "mode": "list",
          "cachedResultName": "GPT-5-NANO"
        },
        "messages": {
          "values": [
            {
              "content": "=Please generate a comic style llm image prompt featuring zero or more cute blob like character(s)\n\nUse the following scene and product context\n{{ $json['product description'] }}\n\nModification only mandate\nTreat every instruction below as an additive modification to the existing scene and description\nDo not replace or reset the base scene\nDo not invent new focal subjects beyond what is implied by the context\n\nGlobal coherence rules\nUse one consistent isometric three quarters camera within a square frame\nKeep gravity consistent and align objects to plausible surfaces\nAnchor props and products to the ground or valid supports with clear contact points\nAvoid floating items, impossible angles, or interpenetration\nKeep scale consistent across all elements unless the context explicitly implies otherwise\nMaintain clear front back and left right relationships and avoid contradictory placements\nAvoid unintentional duplicates, mirroring artifacts, or phantom objects\nKeep shadows or contact cues consistent so objects feel grounded\nDo not add text unless it exists in the base scene\n\nCharacters\nDo not mention color at any time\nPeople are always stylized blob characters only\nFor each character provide a unique name and a brief visual description\nEmotions can vary across happy sad neutral chubby thin nerdy cool edgy passive slouched erect purposeful depressed\nMale leaning silhouettes are slightly capsule and bent according to posture\nFemale leaning silhouettes are slightly peanut shaped and bent according to posture\nLimbs are small tubular or blob like and forms are soft and capsule based\nAll characters share one uniform skin tone without describing it and remain in mutual proportion\nAnimals such as cats or dogs may appear as non blob animals only if implied by the base scene\n\nScene\nDescribe the ground the background and any large foreground elements\nBuild the scene so that props and products are placed logically and rest on plausible supports\nEnsure characters interact with props and products coherently with gaze and limb directions matching actions\nKeep the main product and primary action unobstructed and readable\nIsometric view within the boundaries of a square with white space blending into a white gradient on all sides\nDo not mention any colors\n\nSeven additive scene refinements\nProvide seven short one line refinements that tighten composition and orientation relative to the product context below\nEach line must be additive and not replace the scene\nFocus on blocking prop placement depth cues occlusion management anchoring and readability\n\nRelationship to scene context\nUse the following product description to guide which elements are emphasized and how they are arranged\n{{ $json['product description'] }}\n\nOutput format\nReturn pure text only\nNo JSON\nNo special characters\nNo color words\nNo brand or IP names"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        -432,
        416
      ],
      "id": "5168dfa8-5c54-4d39-a3e3-77d0da49bacb",
      "name": "Message a model",
      "credentials": {
        "openAiApi": {
          "id": "smdYUBYsTPygDg4J",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2512,
        576
      ],
      "id": "cc694549-7877-400d-ae9b-daf63662289f",
      "name": "Merge",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/predictions",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"version\":\"google/nano-banana\",\n  \"input\":{\n    \"prompt\":\"Please convert the first image into the isometric style of the second, emphasizing using cutout background angles to emphasize the 3d effect.\",\n    \"image_input\":[\"{{ $json.urls.get }}\",\"{{ $json.ref_urls.get }}\"]\n  }\n  \n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1840,
        352
      ],
      "id": "07630cdd-eba5-4c60-9e7d-7af4517dae1f",
      "name": "Start AI Job1",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1680,
        352
      ],
      "id": "50cd5b87-8338-42bb-bedb-dc5594c1e664",
      "name": "Merge5",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "amount": 40
      },
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1984,
        352
      ],
      "id": "de07341c-d9ed-4ed3-9ca4-29d471806ffc",
      "name": "Wait1",
      "webhookId": "a2634b85-8c29-43b0-aa68-710946b0b9b1"
    },
    {
      "parameters": {
        "url": "={{ $json.urls.get }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2112,
        352
      ],
      "id": "b6545f92-a2ee-4843-8955-033012c5593e",
      "name": "Download AI Result1",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.output }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2240,
        352
      ],
      "id": "47a531f0-3f4a-4728-b695-bba9930d96fa",
      "name": "Download Image1",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ $json.output }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1232,
        480
      ],
      "id": "27854103-4fac-442a-9bb7-3ab72b2b0f7d",
      "name": "Download Image",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "./new_file.png",
        "options": {
          "append": false
        }
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        1376,
        480
      ],
      "id": "951c20ba-a24d-441c-ad77-d1bc428bb875",
      "name": "Read/Write Files from Disk1"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/files",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "content",
              "inputDataFieldName": "visual_asset"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        464,
        416
      ],
      "id": "209a4f8a-92a4-4e99-9c2f-1287bac9446e",
      "name": "UploadReference",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.replicate.com/v1/files",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "parameterType": "formBinaryData",
              "name": "content",
              "inputDataFieldName": "data"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1536,
        480
      ],
      "id": "1791927f-5799-4999-a499-b73c6f6962d0",
      "name": "UploadDraft",
      "credentials": {
        "httpHeaderAuth": {
          "id": "eQ9YzzsyRvus5dXu",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "gpt-5-nano",
          "mode": "list",
          "cachedResultName": "GPT-5-NANO"
        },
        "messages": {
          "values": [
            {
              "content": "You are an image prompt generator. You ALWAYS return valid pure text with no special characters or quotes safe for json. you always respond with valid text with no preamble. To help with parsing, remove all 'new lines', and 'returns', as the later stages may have trouble. One block of text, using only spaces and periods and commas for punctuation.  comic style\n\nIMPORTANT: Make sure to specify character  comic style colors with great detail, and highlight and distinctive  comic style textures,   comic style highlights, and   comic style colors. They are dark blue, almost black, have blue eyes, and their skin is shiny. \n\nCRITICAL: Emphasize that all characters in the scene should have realistic sizing realative to each other. Every time you mention a character, note their height to be safe.\n\nYour response is part of an automated pipeline, so do not explain, introduce, or otherwise inject illegal characters outside or inside of the text. It will be embedded into a json query, so do not include any characters that will need escaping. If prior text has illegal characters, you should remove them.\n\nCRITICAL:\nTo help with parsing, return all new lines, and returns, as the later stages may have trouble. One block of text, using only spaces and periods and commas for punctuation.\n",
              "role": "system"
            },
            {
              "content": "=Please generate me a comic style llm image prompt featuring a cute blob like character. Do not mention color and remove any mention of color.\nPLEASE RETURN PURE TEXT NOT JSON. NO SPECIAL CHARACTERS.\n{{ $json[\"product description\"] }}\n\n{{ $json.message.content }}\n\nThis will go into json, so no special characters. There will be an attached color image, so do not mention any colors."
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [
        304,
        592
      ],
      "id": "389273a9-1822-403d-9165-0d9ad1652582",
      "name": "Message a model1",
      "credentials": {
        "openAiApi": {
          "id": "smdYUBYsTPygDg4J",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "keys": {
          "key": [
            {
              "currentKey": "urls",
              "newKey": "ref_urls"
            }
          ]
        },
        "additionalOptions": {}
      },
      "type": "n8n-nodes-base.renameKeys",
      "typeVersion": 1,
      "position": [
        976,
        352
      ],
      "id": "60b2e8f4-6e3b-4914-bd5b-d56ffeff1c74",
      "name": "Rename Keys"
    },
    {
      "parameters": {
        "content": "## Create Brand Activated Query\n- Enhance prompt\n- Download Reference Images",
        "height": 544,
        "width": 880
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -672,
        272
      ],
      "id": "43e0c373-1114-4dd9-8f17-04cd901ef960",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "content": "## Generate Additional Scene Details\n",
        "height": 544,
        "width": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        288,
        272
      ],
      "id": "603df0de-1666-41ed-943f-9cf00031da9b",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## Generate Draft Image",
        "height": 544,
        "width": 672
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        816,
        272
      ],
      "id": "00b9ebe1-a3dc-43ee-9533-002ff7afea21",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Generate Draft Image",
        "height": 544,
        "width": 848
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1520,
        272
      ],
      "id": "4eef5bab-446e-43df-8b15-750b052b1bdc",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "content": "## Build HTML Email",
        "height": 544,
        "width": 448
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2400,
        272
      ],
      "id": "21bd7a1c-b344-4259-a505-43030cf0a170",
      "name": "Sticky Note4"
    }
  ],
  "pinData": {},
  "connections": {
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "UploadReference",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Start AI Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start AI Job": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download AI Result": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Ad": {
      "main": [
        [
          {
            "node": "Download file",
            "type": "main",
            "index": 0
          },
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge4",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          },
          {
            "node": "Message a model1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Download AI Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download file": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge4": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Merge4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge5": {
      "main": [
        [
          {
            "node": "Start AI Job1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start AI Job1": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Download AI Result1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download AI Result1": {
      "main": [
        [
          {
            "node": "Download Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadReference": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Rename Keys",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk1": {
      "main": [
        [
          {
            "node": "UploadDraft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadDraft": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Message a model1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Rename Keys": {
      "main": [
        [
          {
            "node": "Merge5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3ad33a8d-fef9-41b3-92ef-04d31327b2e2",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "c7a22866753d464bbb6b7e8b6c7c0bc2f12bcf33e8276a985236028ff8e4bd53"
  },
  "id": "zCEZbmR7sOdQLCFh",
  "tags": []
}