{
  "nodes": [
    {
      "id": "878f78df-e210-4d05-acda-15cc13ac26f7",
      "name": "When form is submitted",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        592,
        400
      ],
      "parameters": {
        "options": {},
        "formTitle": "Icon Generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Icon Subject",
              "placeholder": "Action Copy, Banana, Action Paste, Website link"
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Icon style",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Flat \u2013 simple flat design, clean shapes, no gradients, no shadows, minimalistic modern UI look."
                  },
                  {
                    "option": "Outline (Stroke) \u2013 thin line icons, transparent background, no fills, geometric and clean outline style."
                  },
                  {
                    "option": "Filled (Solid) \u2013 bold solid shapes, fully filled, high-contrast modern icon style."
                  },
                  {
                    "option": "Material Design \u2013 Google Material style, rounded corners, clear geometry, soft drop shadows, modern and functional."
                  },
                  {
                    "option": "Neumorphic \u2013 soft extruded look, subtle highlights and shadows, elements look pressed into or lifted from the background."
                  },
                  {
                    "option": "Skeuomorphic \u2013 realistic icons imitating physical objects, textures and details that look like real life."
                  },
                  {
                    "option": "Gradient \u2013 colorful gradient fills, smooth transitions, modern glossy digital style."
                  },
                  {
                    "option": "Glassmorphic \u2013 translucent glass effect, frosted background blur, glowing highlights, futuristic look."
                  },
                  {
                    "option": "3D / Isometric \u2013 three-dimensional icon with perspective or isometric view, depth and shadows."
                  },
                  {
                    "option": "Hand-drawn \u2013 sketchy lines, imperfect strokes, playful handcrafted look."
                  },
                  {
                    "option": "Cartoon \u2013 bright colors, exaggerated shapes, comic style, fun and playful."
                  },
                  {
                    "option": "Minimalistic \u2013 extremely simplified, few details, focus on clarity and readability."
                  },
                  {
                    "option": "Pixel Art \u2013 retro pixelated look, low resolution, 8-bit video game style."
                  },
                  {
                    "option": "Line + Fill (Duo style) \u2013 combination of outlines with partial fills, modern contrast look."
                  },
                  {
                    "option": "Monochrome \u2013 single color icons, no gradients, simple and universal."
                  },
                  {
                    "option": "Cyberpunk / Futuristic \u2013 neon glow, high-tech shapes, sci-fi futuristic digital aesthetic."
                  },
                  {
                    "option": "Retro / Vintage \u2013 old-school vibe, pastel or muted tones, nostalgic 80s/90s design style."
                  }
                ]
              }
            },
            {
              "fieldLabel": "Icon Background"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d43e4402-964d-4a1f-995a-f1c209ac57e8",
      "name": "Display form completion",
      "type": "n8n-nodes-base.form",
      "position": [
        1760,
        400
      ],
      "parameters": {
        "options": {
          "customCss": "/* custom CSS trimmed to avoid WAF */"
        },
        "operation": "completion",
        "completionTitle": "Icon generated",
        "completionMessage": "=\n\n<img src=\"[[ $json.thumbnailLink ]]\" alt=\"Italian Trulli\">\n</ br></ br>\n<a href=\"[[ $json.webContentLink ]]\">Download</a>\n</ br></ br>\n<a href=\"https://n8n.kadius.pl/form/3f912e79-cb4a-4586-bf58-84c913f00d2f\">One more time</a>\n"
      },
      "typeVersion": 2.3
    },
    {
      "id": "c21f3b5e-1804-4992-96ef-b7f851ce616d",
      "name": "Render icon image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1184,
        400
      ],
      "parameters": {
        "model": "gpt-image-1",
        "prompt": "={{ $json.text }}",
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "18040659-09ea-4475-8767-c9e58e324228",
      "name": "Upload icon to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1472,
        400
      ],
      "parameters": {
        "name": "={{ $('When form is submitted').item.json['Icon Subject'] }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1zgt0yHp7nfAHhvM_RHGS-nx196LNtktP",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1zgt0yHp7nfAHhvM_RHGS-nx196LNtktP",
          "cachedResultName": "icons"
        },
        "inputDataFieldName": "=data"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "c5a4391e-018e-416e-b3e2-a6b75601a9d7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 656,
        "content": "## Step 1 - Form Trigger\n\nCollects three user inputs: Icon Subject, Icon Style, and Background.\nThis provides the core data the workflow needs to generate the correct icon.\nWhy: It ensures all later steps receive structured, predictable input.\n      "
      },
      "typeVersion": 1
    },
    {
      "id": "e27d513c-bb26-48f9-8280-11fc3869032b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 656,
        "content": "## Step 2 - Generate optimized icon prompt\n\nCreates a clean, structured JSON prompt using GPT-5.\nIt defines style, composition, palette, lighting, and constraints for the image.\nWhy: GPT-Image-1 delivers far better results when fed with precise, consistent parameters instead of raw text."
      },
      "typeVersion": 1
    },
    {
      "id": "4d91645d-c10d-4085-b2da-3c3e213b325e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 656,
        "content": "## Step 3 - Render icon image\nUses GPT-Image-1 to generate a 400\u00d7400 PNG with a transparent background based on the optimized prompt.\nReturns the image as base64 data.\nWhy: This model produces high-quality icons suited for UI/UX work.\n   "
      },
      "typeVersion": 1
    },
    {
      "id": "7fc80303-e6a1-4d6d-9393-beb6729d0e5f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 656,
        "content": "## Step 4 - Upload to Google Driv\n\nUploads the generated PNG into the selected Google Drive folder.\nOutputs both thumbnailLink and webContentLink for preview and download.\nWhy: Drive acts as a simple, reliable icon storage library you can access anywhere.\n     "
      },
      "typeVersion": 1
    },
    {
      "id": "096c3855-494f-4a85-a644-0a7b0def284c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        128
      ],
      "parameters": {
        "color": 5,
        "width": 288,
        "height": 656,
        "content": "## Step 5 - Display Form Completion\n\nShows a confirmation card with:\n\u2022 A thumbnail preview\n\u2022 A download link\n\u2022 A \u201cOne more time\u201d button\nUses custom CSS for a clean, polished look.\nWhy: Gives the user immediate visual feedback without leaving the workflow.\n    "
      },
      "typeVersion": 1
    },
    {
      "id": "18e53146-d673-4e5b-a178-3b0ce1e5d4c2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        512
      ],
      "parameters": {
        "width": 400,
        "height": 272,
        "content": "## Setup Notes\n* Add OpenAI + Google Drive credentials\n* Update the Drive folder ID\n* Can be adapted for Slack/Teams or external asset libraries\n* Works on n8n Cloud and self-hosted instances (e.g., Proxmox)\n  "
      },
      "typeVersion": 1
    },
    {
      "id": "263e1ac9-0435-49f1-a0fd-313a60f8b608",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        128
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 352,
        "content": "## Description\n\nA fully automated icon generator: collects inputs, creates a structured visual prompt, generates a high-quality icon using GPT-Image-1, uploads it to Google Drive, and returns a ready-to-use link \u2014 all through a simple form."
      },
      "typeVersion": 1
    },
    {
      "id": "60a85ff8-38ed-462e-96d8-188b1de87cc6",
      "name": "GPT-5 model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        832,
        576
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-chat-latest",
          "cachedResultName": "gpt-5-chat-latest"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "a942d224-fa14-4190-91b2-7d164d54ef08",
      "name": "Generate optimized icon prompt",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        832,
        400
      ],
      "parameters": {
        "text": "=create prompt for generateig Generate an icon of a {{ $('When form is submitted').item.json[\"Icon Subject\"] }}, in style {{ $json[\"Icon style\"] }} with background: {{ $json[\"Icon Background\"] }}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "message": "You are a top graphic designer specialising in icons As an output, you give a simple prompt that can be used with GPT Image 1 as structured json { \t\"topic\": \"copy action icon\", \t\"style\": \"Flat minimalistic digital UI icon, neumorphic depth, clean lines, high contrast\", \t\"size\": \"400x400\", \t\"background\": \"transparent\", \t\"composition\": { \t\t\"shape\": \"rounded-square\", \t\t\"radius_px\": 12, \t\t\"elements\": [ \t\t\t\"two overlapping sheets symbol\", \t\t\t\"soft drop shadow\", \t\t\t\"subtle highlight top-left\" \t\t] \t}, \t\"color_palette\": { \t\t\"primary\": \"#E0E0E0\", \t\t\"accent\": \"#1E88E5\", \t\t\"background\": \"#FFFFFF00\", \t\t\"notes\": \"neutral greys with electric blue accent for focus\" \t}, \t\"lighting\": { \t\t\"gloss\": \"soft top-left\", \t\t\"shadow\": \"diffuse 20% opacity under base\", \t\t\"detail\": \"light ambient occlusion for depth\" \t}, \t\"texture\": { \t\t\"surface\": \"smooth satin\", \t\t\"detail\": \"micro texture on edges to catch light\" \t}, \t\"constraints\": [ \t\t\"no text\", \t\t\"no border\", \t\t\"recognizable at small sizes (72x72)\", \t\t\"export as PNG with alpha transparency\" \t], \t\"prompt_summary\": \"Minimal flat neumorphic 'Copy' action icon with two overlapping sheets, electric blue accent, rounded corners, 400x400 transparent background.\" }"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    }
  ],
  "connections": {
    "GPT-5 model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate optimized icon prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Render icon image": {
      "main": [
        [
          {
            "node": "Upload icon to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When form is submitted": {
      "main": [
        [
          {
            "node": "Generate optimized icon prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload icon to Google Drive": {
      "main": [
        [
          {
            "node": "Display form completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate optimized icon prompt": {
      "main": [
        [
          {
            "node": "Render icon image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}