
Image to Image Generation
Description
Categories
đ€ AI & Machine Learning
Nodes Used
n8n-nodes-base.setn8n-nodes-base.waitn8n-nodes-base.airtablen8n-nodes-base.airtablen8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNoten8n-nodes-base.stickyNote
PriceFree
Views0
Last Updated11/28/2025
workflow.json
{
"id": "",
"meta": {
"instanceId": "",
"templateCredsSetupCompleted": true
},
"name": "Image to Image Generation",
"tags": [],
"nodes": [
{
"id": "",
"name": "When clicking âExecute workflowâ",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-680,
-180
],
"parameters": {},
"typeVersion": 1
},
{
"id": "",
"name": "Airtable",
"type": "n8n-nodes-base.airtable",
"position": [
-380,
-180
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "https://airtable.com/",
"cachedResultName": "YTB Outlier Finder"
},
"table": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "https://airtable.com/",
"cachedResultName": "Image Generation"
},
"options": {
"fields": [
"ImageDescription",
"Situation",
"BaseImage",
"Name"
]
},
"operation": "search",
"filterByFormula": "={Prompt} = \"\""
},
"credentials": {
"airtableTokenApi": {
"id": "",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "",
"name": "Generate Image",
"type": "n8n-nodes-base.httpRequest",
"position": [
140,
-180
],
"parameters": {
"url": "https://fal.run/fal-ai/flux-pro/kontext/max",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"bodyParameters": {
"parameters": [
{
"name": "prompt",
"value": "={{ $json.text }}"
},
{
"name": "image_url",
"value": "={{ $('Airtable').item.json.BaseImage[0].url }}"
},
{
"name": "guidance_scale",
"value": "7.5"
},
{
"name": "num_images",
"value": 1
},
{
"name": "safety_tolerance",
"value": 2
},
{
"name": "output_format",
"value": "jpeg"
},
{
"name": "sync_mode",
"value": "false"
},
{
"name": "aspect_ratio",
"value": "1:1"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "=Key {{ $('Edit Fields').item.json.FalAITOKEN }}"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "",
"name": "Log Image Posts",
"type": "n8n-nodes-base.airtable",
"position": [
640,
-200
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "https://airtable.com/",
"cachedResultName": "YTB Outlier Finder"
},
"table": {
"__rl": true,
"mode": "list",
"value": "",
"cachedResultUrl": "https://airtable.com/",
"cachedResultName": "Table 2"
},
"columns": {
"value": {
"Name": "={{ $('Airtable').item.json.Name }}",
"Prompt": "={{ $json.prompt }}",
"FinalImage": "={{ [{ \"url\": $json.images[0].url}] }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "BaseImage",
"type": "array",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "BaseImage",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "ImageDescription",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "ImageDescription",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Situation",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Situation",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Prompt",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "FinalImage",
"type": "array",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "FinalImage",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Name"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update"
},
"credentials": {
"airtableTokenApi": {
"id": "",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "",
"name": "Check IF Generated",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"position": [
340,
-180
],
"parameters": {
"url": "={{ $json.images[0].url }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
500,
-120
],
"webhookId": "",
"parameters": {
"amount": 3
},
"typeVersion": 1.1
},
{
"id": "",
"name": "Mistral Cloud Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
"position": [
-140,
-20
],
"parameters": {
"model": "mistral-large-latest",
"options": {}
},
"credentials": {
"mistralCloudApi": {
"id": "",
"name": "Mistral Cloud account"
}
},
"typeVersion": 1
},
{
"id": "",
"name": "Generate Prompt",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-220,
-180
],
"parameters": {
"text": "You are a Image Generation assistant.",
"batching": {},
"messages": {
"messageValues": [
{
"type": "HumanMessagePromptTemplate",
"message": "=You are a creative prompt engineer specializing in generating detailed image-to-image prompts for AI models like Stable Diffusion or Leonardo AI.\n\nYou will receive:\n- A base subject :{{ $json.ImageDescription }}\n- A situation or context that must be represented visually :{{ $json.Situation }}\n\nYour task is to generate an enhanced, imaginative prompt that:\n- Incorporates the visual details from the situation.\n- Respects the base subjectâs identity (i.e., the AI will transform an image of the given subject, not create a completely new one).\n- Uses scene-building language to describe environment, mood, lighting, and dynamics.\n- Mentions the style if relevant (e.g., ârealisticâ, âcinematicâ, âfantasy illustrationâ, etc.).\n- Avoids over-describing the subject's core features (to preserve the base image).\n\nOutput Format:\n- One paragraph of 1â3 sentences.\n- Include keywords or phrases that guide the AI visually (e.g., âdramatic lightingâ, âsmoke and lava in the backgroundâ, âthird-person perspectiveâ).\n- Return ONLY the prompt that will be directly given to the Image Generation LLM.\n\nExample Input:\nSubject: âa dogâ\nSituation: âthe dog is climbing a volcano in eruptionâ\n\nExample Output Prompt:\nâA dog braving the treacherous slopes of an erupting volcano, surrounded by glowing lava streams and thick clouds of smoke. The sky is darkened with ash as fiery embers illuminate the scene. Realistic style, cinematic lighting, wide-angle perspective.â"
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
-280
],
"parameters": {
"color": 7,
"width": 760,
"height": 400,
"content": "## Image Generation"
},
"typeVersion": 1
},
{
"id": "",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-720,
-280
],
"parameters": {
"color": 7,
"width": 780,
"height": 400,
"content": "## Base Image & Prompt"
},
"typeVersion": 1
},
{
"id": "",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-720,
-700
],
"parameters": {
"color": 7,
"width": 780,
"height": 400,
"content": "## SETUP\n\n**Setup Input :** The first part of the workflow can be replaced with anything else. You need as input a Prompt and the Base Image URL (publicly available).\n\n**Setup Output :** In this Workflow, the output is storing the image on Airtable but you can replace that with anything else but basically you have two options : \n- Store the Generated Image somewhere : Keep everything like this and replace the last Airtable node with the Third Party you want to use.\n- Use the Image directly in n8n : In HTTP Request \"Generate Image\" switch sync_mode to \"true\", remove all the following nodes and add \"Extract form File\" node (convert to Base64 String)\n\n\n**APIs :** For the following third-party integrations, replace [YOUR_API_TOKEN] with your API Token or connect your account via Client ID / Secret to your n8n instance:\n- Fal AI (FLUX KONTEXT MAX) : https://fal.ai/models/fal-ai/flux-pro/kontext/max/api#schema-input\n- Airtable : https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.airtable/?utm_source=n8n_app&utm_medium=node_settings_modal-credential_link&utm_campaign=n8n-nodes-base.airtable"
},
"typeVersion": 1
},
{
"id": "",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-720,
-1200
],
"parameters": {
"color": 7,
"width": 500,
"height": 480,
"content": "## How it works?\n**1 -** Retrieve Base Image, Image Description and Situation from Airtable\n**2 -** Generate Image Prompt\n**3 -** Generate Image via Fal AI\n**4 -** Verify if Image is generated\n**5 -** Upload Image on Airtable\n\n**đș Youtube Video Tutorial :**\n[](https://www.youtube.com/watch?v=0SVj70-dA0Q)"
},
"typeVersion": 1
},
{
"id": "",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
-920
],
"parameters": {
"color": 7,
"width": 380,
"height": 620,
"content": "## Base Image\n\n\n**Prompt** : A tower standing tall in the heart of a lush jungle, with vibrant greenery and exotic flowers at its base. Sunlight filters through the dense canopy above, casting dappled shadows on the tower's surface. The air is thick with humidity, and the sounds of wildlife echo through the cinematic scene, realistic style, with a low-angle perspective looking up at the tower.\n\n"
},
"typeVersion": 1
},
{
"id": "",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
-720
],
"parameters": {
"color": 7,
"width": 360,
"height": 420,
"content": "## Generated Image\n\n\n"
},
"typeVersion": 1
},
{
"id": "",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
-520,
-180
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "",
"name": "FalAITOKEN",
"type": "string",
"value": "[YOUR_API_TOKEN]"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"Wait": {
"main": [
[
{
"node": "Check IF Generated",
"type": "main",
"index": 0
}
]
]
},
"Airtable": {
"main": [
[
{
"node": "Generate Prompt",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Airtable",
"type": "main",
"index": 0
}
]
]
},
"Generate Image": {
"main": [
[
{
"node": "Check IF Generated",
"type": "main",
"index": 0
}
],
[]
]
},
"Generate Prompt": {
"main": [
[
{
"node": "Generate Image",
"type": "main",
"index": 0
}
]
]
},
"Check IF Generated": {
"main": [
[
{
"node": "Log Image Posts",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Mistral Cloud Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate Prompt",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When clicking âExecute workflowâ": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
}
}