ChatGPTSalesRevenue growthAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Auto-Transform LINE Images to Lego Style with n8n and DALL·E

LINE message trigger → n8n fetches image → GPT-4o-mini generates Lego prompt → DALL·E generates image → LINE delivers result

Some experienceStepsWorkflowPromptTip
Who
Content creators, small-business marketers, developers automating image style transfers
You get
User sends any image in LINE and automatically receives an AI-generated isometric LEGO-style image
You need
n8n

Constraints

Requires: 1) an accessible n8n instance; 2) a LINE Developer Account and API Token; 3) an OpenAI API key with DALL·E and GPT-4 access. Costs: OpenAI API usage-based for tokens and image generation; LINE Messaging API has a free tier. Not tested by this site.

What they did

Author boriwatopal published a 5-node n8n official template: a LINE webhook receives user images, an HTTP Request node fetches image content from LINE servers, GPT-4o-mini analyzes the image and generates a LEGO-style prompt, DALL·E generates an isometric LEGO image, and the LINE Messaging API sends the image back to the user.

How it went

The source reports this template simplifies AI LEGO-image generation, enabling non-technical users to upload images via chat and receive results (author_report). No specific conversion rate, success rate, or cost data is provided.

Worth knowing

1. The 'Receive Line Messages' node header template still contains the placeholder YOUR_TOKEN_HERE; it must be replaced with a real token after import or requests will fail. 2. The prompt explicitly says 'Only provide me with a prompt' to reduce extra explanation from the model, but verify the model follows this constraint. 3. Customization: change the prompt text for other styles (pixel art, watercolor); add Slack/Email notification nodes. 4. Optimization suggestions (source): add fallback error-handling nodes, logging, and queue-based scaling. 5. Not tested by this site; reproduction=not_tested; actual runs incur OpenAI image-generation charges.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Creating an Image using Dall-E node: connect OpenAI API credentials.
  • Creating a Prompt for Dall-E (Lego Style) node: connect OpenAI API credentials.

Configuration to replace

  • Source template is n8n public workflow #2738 (~5 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Prepare credentials and environment variables

    Add to n8n Credentials: LINE API Token (as HTTP Header or env var LINE_API_TOKEN) and OpenAI API key (type openAiApi). Ensure the variable names are readable by the workflow in n8n Settings or execution environment.

  2. Configure LINE webhook and image-receive nodes

    1. Import workflow.json into n8n. 2. Configure 'Receive a Line Webhook' node: HTTP Method=POST, Path=lineimage (match the Webhook URL path in LINE Developer Console, e.g. https://your-n8n/webhook/lineimage). 3. Configure 'Receive Line Messages' node: URL template https://api-data.line.me/v2/bot/message/{{ $json.body.events[0].message.id }}/content; Headers include Authorization: Bearer YOUR_TOKEN_HERE (replace with real LINE Token). Test: send an image to the Bot in LINE; n8n execution log should show binary data received.

  3. Configure GPT-4o-mini prompt-generation node

    Configure 'Creating a Prompt for Dall-E (Lego Style)' node (OpenAI node): Resource=image, Operation=analyze, Input Type=base64, Binary Property Name=data, Model=gpt-4o-mini. In the text field enter the following prompt (verbatim from source):

    Execution prompt · Source text。OpenAI node 'Creating a Prompt for Dall-E (Lego Style)' text parameter

    Creating the DALL·E 3 prompt to transform this kind of image into a isometric LEGO image (Only provide me with a prompt).
  4. Configure DALL·E image generation and LINE reply nodes

    1. Configure 'Creating an Image using Dall-E' node (OpenAI node): Resource=image, Prompt={{ $json.content }} (receives prompt from previous step), Options enable returnImageUrls=true. 2. Configure 'Send Back an Image through Line' node: Method=POST, URL=https://api.line.me/v2/bot/message/reply; Headers include Authorization: Bearer YOUR_TOKEN_HERE; Body is JSON: {"replyToken": "{{ $('Receive a Line Webhook').item.json.body.events[0].replyToken }}", "messages": [{"type": "image", "originalContentUrl": "{{ $json.url }}", "previewImageUrl": "{{ $json.url }}"}]}. Test: send an image again; you should receive the LEGO-style generated image in LINE.

Prompt you can copy

Setup guidance · Editorial suggestion。Hand to setup assistant: confirm inputs and permissions first, then verify node configs step by step

This block is the prompt. Ads are never placed here.

You are an n8n setup assistant. The user wants to recreate the 'LINE image → LEGO-style AI image' automation. Assist in this order: 1) Confirm the user has an n8n instance, LINE Developer Account, and OpenAI API key; 2) Guide importing workflow.json and replacing credentials; 3) Explain each node's input/output relationship; 4) Remind them to test webhook path and check OpenAI quota. Do not send real messages or consume API credits on the user's behalf.

After pasting workflow.json, check that YOUR_TOKEN_HERE and credential-id placeholders are replaced with real credentials

Source

Transform image to Lego style using line and Dall-E · boriwatopal · n8n.io · 2025-01-17

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related