{
  "name": "Transform Image to Lego Style Using Line and Dall-E",
  "nodes": [
    {
      "id": "82b62d4e-a263-4232-9bae-4c581db2269c",
      "name": "Receive a Line Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        0
      ],
      "parameters": {
        "path": "lineimage",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "f861c4eb-3d4f-4253-810f-8032602f079b",
      "name": "Receive Line Messages",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        220,
        0
      ],
      "parameters": {
        "url": "=https://api-data.line.me/v2/bot/message/{{ $json.body.events[0].message.id }}/content",
        "options": {},
        "jsonHeaders": "={\n\"Authorization\": \"Bearer REPLACE_WITH_CREDENTIAL\",\n\"Content-Type\": \"application/json\"\n}",
        "sendHeaders": true,
        "specifyHeaders": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "da3a9188-028d-4c75-b23f-5f1f4e50784c",
      "name": "Creating an Image using Dall-E",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        860,
        0
      ],
      "parameters": {
        "prompt": "={{ $json.content }}",
        "options": {
          "returnImageUrls": true
        },
        "resource": "image"
      },
      "typeVersion": 1.7
    },
    {
      "id": "36c826e5-eacd-43ad-b663-4d788005e61a",
      "name": "Creating a Prompt for Dall-E (Lego Style)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        540,
        0
      ],
      "parameters": {
        "text": "Creating the DALL·E 3 prompt to transform this kind of image into a isometric LEGO image (Only provide me with a prompt).",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "REPLACE_WITH_RESOURCE"
        },
        "options": {},
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze",
        "binaryPropertyName": "=data"
      },
      "typeVersion": 1.7
    },
    {
      "id": "3c19f931-9ca0-4bd7-b4eb-1628d89bbba1",
      "name": "Send Back an Image through Line",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1160,
        0
      ],
      "parameters": {
        "url": "https://api.line.me/v2/bot/message/reply",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n \"replyToken\": \"{{ $('Receive a Line Webhook').item.json.body.events[0].replyToken }}\",\n \"messages\": [\n {\n \"type\": \"image\",\n \"originalContentUrl\": \"{{ $json.url }}\",\n \"previewImageUrl\": \"{{ $json.url }}\"\n }\n ]\n}",
        "sendBody": true,
        "jsonHeaders": "{\n\"Authorization\": \"Bearer REPLACE_WITH_CREDENTIAL\",\n\"Content-Type\": \"application/json\"\n}",
        "sendHeaders": true,
        "specifyBody": "json",
        "specifyHeaders": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "9e720505-1022-522d-940e-8adbde917a8a",
      "name": "Publication · Overview and setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -800,
        0
      ],
      "parameters": {
        "content": "# Transform Image to Lego Style Using Line and Dall-E\n\n## Purpose and structure\nThis folder contains the **Transform Image to Lego Style Using Line and Dall-E** workflow. Its executable nodes use `httpRequest`, `openAi`, `webhook`. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.\n\n## Setup\nImport inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.\n\n## Entry points\nReceive a Line Webhook\n\n## Verification\nSanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.\n\n## Attribution\nhttps://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Http/1700_HTTP_Webhook_Process_Webhook.json\nMIT; preserve source notices.",
        "width": 700,
        "height": 800,
        "color": 1
      }
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Receive Line Messages": {
      "main": [
        [
          {
            "node": "Creating a Prompt for Dall-E (Lego Style)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive a Line Webhook": {
      "main": [
        [
          {
            "node": "Receive Line Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating an Image using Dall-E": {
      "main": [
        [
          {
            "node": "Send Back an Image through Line",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating a Prompt for Dall-E (Lego Style)": {
      "main": [
        [
          {
            "node": "Creating an Image using Dall-E",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
