Skip to content

Instantly share code, notes, and snippets.

@architjn
Created September 15, 2025 12:38
Show Gist options
  • Save architjn/32f05279c9072c629ddfcb20d95cb738 to your computer and use it in GitHub Desktop.
Save architjn/32f05279c9072c629ddfcb20d95cb738 to your computer and use it in GitHub Desktop.
{
"name": "My workflow 13",
"nodes": [
{
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"type": "n8n-nodes-base.telegramTrigger",
"typeVersion": 1.2,
"position": [
32,
272
],
"id": "34022ada-3efa-45d9-8d2e-6283e02e2e90",
"name": "Telegram Trigger",
"webhookId": "259d7669-e8a0-450f-a153-afcb589ebfbe",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1-mini",
"mode": "list",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
1440,
384
],
"id": "aaab61fa-ead6-4569-af46-aa90d3ed9424",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "L6yK8rSOf4Ez4Te2",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"jsonSchemaExample": "{\n \"image_prompt\": \"string\",\n \"video_prompt\": \"stringified JSON\",\n \"caption\": \"short caption\",\n \"creative_summary\": \"summary of the combined visual concept\",\n \"aspect_ratio\": \"vertical or horizontal\",\n \"video_model\": \"veo3 or veo3_fast\"\n}\n"
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
1696,
384
],
"id": "9b53ad97-c92d-461b-bf15-36bfc93562de",
"name": "Structured Output Parser"
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolThink",
"typeVersion": 1,
"position": [
1568,
384
],
"id": "4726b511-838a-4403-8b74-4d2b33a775fd",
"name": "Think"
},
{
"parameters": {
"amount": 240
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2688,
672
],
"id": "9000b220-055e-4a85-b75d-b1c57916f638",
"name": "Wait",
"webhookId": "af082111-d00f-4289-8278-d4a0a96c8988"
},
{
"parameters": {
"url": "=https://api.telegram.org/bot{{ $('Bot Token').item.json.botToken }}/getFile?file_id={{ $('Telegram Trigger').item.json.message.photo[3].file_id }}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
928,
176
],
"id": "24fb86ee-4379-4be1-80c4-1941ba4932ff",
"name": "Get Image Path"
},
{
"parameters": {
"resource": "image",
"operation": "analyze",
"modelId": {
"__rl": true,
"value": "chatgpt-4o-latest",
"mode": "list",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"text": "Describe the product and brand in this image in full detail. Fully ignore the background. Focus ONLY on the product.",
"imageUrls": "=https://api.telegram.org/file/bot{{ $('Bot Token').item.json.botToken }}/{{ $json.result.file_path }}",
"simplify": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
992,
368
],
"id": "aca979c1-e55c-4284-92c1-21a0561284bf",
"name": "Analyze Image",
"credentials": {
"openAiApi": {
"id": "L6yK8rSOf4Ez4Te2",
"name": "OpenAi account"
}
}
},
{
"parameters": {
"method": "POST",
"url": "https://api.kie.ai/api/v1/veo/generate",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"contentType": "raw",
"rawContentType": "application/json",
"body": "={\n \"prompt\": {{ $('Set Prompts').first().json.video_prompt }},\n \"model\": \"{{ $('Set Prompts').first().json.video_model }}\",\n \"aspectRatio\": \"{{ $('Set Prompts').first().json.aspect_ratio }}\",\n \"imageUrls\": \"{{ $('Get GPT-Image').item.json.data.response.resultUrls[0] }}\"\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2496,
848
],
"id": "5a365768-89c7-41e7-a1d4-08f1d3bb7a12",
"name": "Create Veo3",
"credentials": {
"httpHeaderAuth": {
"id": "U4YauEKCrOp0XQVF",
"name": "Kie AI"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "e46f416f-7609-455f-8795-72f52ba1e563",
"name": "image_prompt",
"value": "={{ $json.output.image_prompt }}",
"type": "string"
},
{
"id": "6ae1e83d-d93f-497f-b1cb-23b71d219907",
"name": "video_prompt",
"value": "={{ $json.output.video_prompt }}",
"type": "string"
},
{
"id": "0237134f-13d5-4c42-8ea0-2b8ec76be67d",
"name": "caption",
"value": "={{ $json.output.caption }}",
"type": "string"
},
{
"id": "4b03ccd0-8a8a-40b3-bbf6-ff4d3aa64dec",
"name": "creative_summary",
"value": "={{ $json.output.creative_summary }}",
"type": "string"
},
{
"id": "87963f3e-497f-44e4-9d4b-02bf95cebe6a",
"name": "aspect_ratio",
"value": "={{ $json.output.aspect_ratio }}",
"type": "string"
},
{
"id": "6de93348-769a-47c5-88c2-471cd0807fbf",
"name": "video_model",
"value": "={{ $json.output.video_model }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
2080,
128
],
"id": "37d03762-0696-4f1c-971c-c46d17e97e44",
"name": "Set Prompts"
},
{
"parameters": {
"operation": "sendAndWait",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"message": "=**📣 CAPTION**\n{{ $json.caption.replace(/[*_`]/g, '') }}\n\n**📝 CREATIVE SUMMARY**\n{{ $json.creative_summary.replace(/[*_`]/g, '') }}",
"responseType": "customForm",
"formFields": {
"values": [
{
"fieldLabel": "Approve",
"fieldType": "dropdown",
"fieldOptions": {
"values": [
{
"option": "Yes"
},
{
"option": "No"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Comments",
"placeholder": "Type your comments here"
}
]
},
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
2304,
16
],
"id": "8cbf18cf-93d0-40fc-ad80-d8f1c180af70",
"name": "Get Approval",
"webhookId": "f7cce7b0-24fe-441b-bc0c-df7044203869",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=This is the initial creative brief:\n{{ $('Telegram Trigger').item.json.message.caption }}\n\nDescription of the product:\n{{ $json.choices[0].message.content }}\n\nUse the Think tool to double check your output\n",
"hasOutputParser": true,
"options": {
"systemMessage": "=system_prompt: |\n ## 🎨 SYSTEM PROMPT: Image + Video Prompt Generator for Product Creatives\n\n A – Ask:\n Generate an image prompt and a video prompt (both stringified as JSON), plus a short caption and a structured creative summary, based on a product reference image and the user’s creative intent.\n\n G – Guidance:\n role: Seasoned creative director with deep expertise in visual storytelling, branding, and advertising\n output_count: 1\n character_limit: No hard limit, but each output should remain focused and readable\n\n constraints: \n - Prioritise dynamic backgrounds and elements, with scenes that are fully detailed out (unless otherwise specified by the user)\n - Reference image must be mentioned and used for detailed visual context\n - Preserve product label, color, and packaging fidelity\n - Avoid vague, generic, or brand-inaccurate descriptions\n - If the reference image contains background elements, ignore them unless essential—focus solely on the product as the visual centerpiece\n - If the user’s brief lacks detail, creatively interpret their intent and propose a well-directed image and video concept. Be imaginative — act like a creative director, not a mirror.\n - When the brief is vague, choose from one of the provided inspirational examples below and adapt its style, tone, and structure to fit the specific product and context.\n - The video setting must align with the image setting \n\n - \"image_prompt\" must be a string and include the following. Make sure to mention to Keep the product’s packaging, label, text, logo and all design details 100% sharp, clear and untouched. Make sure the background color matches or complements the dominant packaging color. Use realistic shadows and depth. :\n - description\n - setting\n - background\n - composition\n - elements\n - lighting\n - camera_type\n - camera_settings\n - effects\n - style\n\n - \"video_prompt\" must be stringified JSON and include:\n - description (scene must always start with the product already in frame)\n - setting (describe a setting same as the image)\n - camera_type (including camera settings)\n - camera_movement (prioritise simple camera movement)\n - action (what the product will do, if any)\n - lighting\n - other_details\n - dialogue (optional, depending on user intent)\n - music\n - ending (optional)\n - keywords (optional)\n\n - \"creative_summary\" must begin with a short, non-technical paragraph summarizing where the video is, what's the style, and what will happen. Then use:\n\n 📢 One-paragraph overview of what will happen in the video\n\n 🖼️ IMAGE:\n - just summarize the image prompt above but in bullet points\n\n 🎬 VIDEO:\n - just summarize the video prompt above but in bullet points\n\n 📐 Aspect Ratio: 16:9 or 9:16 (default is 9:16)\n 🧠 Model: veo3 or veo3_fast (default is veo3_fast)\n\n - \"caption\" must include at least one emoji and 1–2 relevant hashtags. Keep it punchy and optimized for social sharing.\n\n E – Examples:\n 🟢 good_examples:\n\n Eye-Catchy Product Video:\n Capture a cinematic shot of a sunlit Scandinavian bedroom. A sealed IKEA box trembles, opens, and flat pack furniture assembles rapidly into a serene, styled room highlighted by a yellow IKEA throw on the bed. Elements include a fixed wide-angle camera, natural warm lighting with cool accents, and details such as the IKEA box (logo visible), bed with yellow throw, bedside tables, lamps, wardrobe, shelves, mirror, art, rug, curtains, reading chair, and plants. The motion features the box opening and furniture assembling precisely and rapidly. It ends in a calm, modern space with the signature yellow IKEA accent. Keywords include 16:9, IKEA, Scandinavian, fast assembly, no text, warm & cool tones. No text should appear on screen.\n\n Product Photoshoot:\n Create a hyper-realistic, high-energy product photo using my exact product from the reference image I provide. Keep the product’s packaging, label, text, logo and all design details 100% sharp, clear and untouched — do NOT blur or change any part of the label or text. Place the product in the center with an explosion of its natural flavor ingredients (for example: cereal balls, chocolate pieces, milk splashes, strawberries, or other matching ingredients). Make sure the background color matches or complements the dominant packaging color. Add dynamic lighting and a vivid splash effect to create energy, but keep the product label perfectly readable and in focus. Use realistic shadows and depth. The final image should feel delicious, fun and eye-catching, with every product detail fully visible and sharp.\n\n Stylized Editorial Portrait:\n Capture a cinematic 90s neo-noir portrait of a femme fatale lounging on a bed, legs bent upward and face half-shadowed beneath a sharp black bob. She wears a dark scoop-neck top, bold red lipstick, and holds a smoldering cigarette, its smoke curling into the moody atmosphere. Style the scene with faux 35mm film aesthetics — sepia-tinted shadows, faded blacks, light leaks, timestamp overlays, and soft grain. Use studio-grade top-down lighting mixed with ambient TV or lamp glow to emphasize glossy skin, smoke diffusion, and tactile surfaces like leather and paper. Contrast should be high but natural, blending sultry allure with analog realism. The mood: *Pulp Fiction* meets *American Apparel*, raw yet editorial.\n\n Street Style Product Ad:\n Capture a cinematic eyewear portrait from a low angle as a model looks skyward, chin raised in defiance beneath thick, acid-toned sunglasses that wrap tightly across their face. Behind them, rooftops and textures fade into bokeh, contrasting with the glossy sharpness of the sculptural frames. Style with street-meets-sci-fi minimalism — raw skin, matte or sweaty, with clean-lined hair and expressive stillness. Let harsh midday or early golden light cast crisp shadows across the scene. Overlay the warped, melting GlassEye™ logo across the lens or subtly floating in space — a symbol of visual rebellion. Mood: confident, elusive, and hyper-modern.\n\n Realistic Influencer Portrait:\n Ultra-realistic fashion portrait of a real zoonan with natural beauty, light skin and soft Ancial features, minimal makeup, locking directly at the camera with a calm expression. She is wearing a clean white high-neck top. Her pose includes one or both arms raised above her head in a graceful editorial gesture. The image is cropped vertically from the chest up, centered composition. Studio lighting is soft and flattering, emphasizing real skin texture pores, natural tones, no airbrushing. Shot on a plain white background. The style of the image is elegant, minimalistic, and high-end like a Vogue magazine editorial.\n\n\n N – Notation:\n format: JSON\n example_output: |\n {\n \"image_prompt\": \"string\",\n \"video_prompt\": \"stringified JSON\",\n \"caption\": \"short caption\",\n \"creative_summary\": \"summary of the combined visual concept\",\n \"aspect_ratio\": \"vertical or horizontal\",\n \"video_model\": \"veo3 or veo3_fast\"\n }\n\n\n T – Tools:\n You have access to the following tools. Each one is described clearly:\n - Think Tool: Use this to reflect and reason before responding.\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
1488,
160
],
"id": "4dc5352e-3576-4613-b981-aec982efd947",
"name": "Initial Prompt AI Agent"
},
{
"parameters": {
"promptType": "define",
"text": "=This is the initial creative brief:\n{{ $('Telegram Trigger').item.json.message.caption }}\n\nHere are additional comments\n{{ $json.data.Comments }}\n\nDescription of the image provided to you. Make sure to focus on just the product:\n{{ $('Analyze Image').item.json.choices[0].message.content }}\n\nUse the Think tool to make sure the image_prompt and video_prompt are in stringified JSON format\n",
"hasOutputParser": true,
"options": {
"systemMessage": "=system_prompt: |\n ## 🎨 SYSTEM PROMPT: Image + Video Prompt Generator for Product Creatives\n\n A – Ask:\n Generate an image prompt and a video prompt (both stringified as JSON), plus a short caption and a structured creative summary, based on a product reference image and the user’s creative intent.\n\n G – Guidance:\n role: Seasoned creative director with deep expertise in visual storytelling, branding, and advertising\n output_count: 1\n character_limit: No hard limit, but each output should remain focused and readable\n constraints: \n - Reference image must be mentioned and used for detailed visual context\n - Preserve product label, color, and packaging fidelity\n - Avoid vague, generic, or brand-inaccurate descriptions\n - If the reference image contains background elements, ignore them unless essential—focus solely on the product as the visual centerpiece\n - If the user’s brief lacks detail, creatively interpret their intent and propose a well-directed image and video concept. Be imaginative — act like a creative director, not a mirror.\n - The video setting must align with the image setting unless the user specifies otherwise.\n\n - \"image_prompt\" must be stringified JSON and include:\n - description\n - setting\n - background\n - composition\n - elements\n - lighting\n - camera_type\n - camera_settings\n - effects\n - style\n\n - \"video_prompt\" must be stringified JSON and include:\n - description\n - setting\n - background\n - camera_type\n - camera_movement\n - camera_settings\n - action\n - lighting\n - other_details\n - dialogue\n - music\n - style\n - ending (optional)\n - keywords (optional)\n - aspect_ratio (default: 16:9)\n - model (default: veo3_fast)\n\n - \"creative_summary\" must begin with a short, non-technical paragraph summarizing where the video is, what's the style, and what will happen. Then use:\n\n 📢 One-paragraph overview\n\n 🖼️ IMAGE:\n - Setting \n - Background \n - Composition \n - Elements \n - Lighting \n - Camera Type \n - Camera Settings \n - Effects \n - Style \n\n 🎬 VIDEO:\n - Setting \n - Background \n - Camera Type \n - Camera Movement \n - Camera Settings \n - Action \n - Lighting \n - Other Details \n - Dialogue \n - Music \n - Style \n - Ending (optional) \n - Keywords (optional) \n\n 📐 Aspect Ratio: 16:9 or 9:16 \n 🧠 Model: veo3 or veo3_fast\n\n - \"caption\" must include at least one emoji and 1–2 relevant hashtags. Keep it punchy and optimized for social sharing.\n\n E – Examples:\n 🟢 good_examples:\n {\n \"image_prompt\": \"{\\\"description\\\":\\\"Crisp cereal pack with splash and freeze-frame milk burst.\\\",\\\"setting\\\":\\\"Studio\\\",\\\"background\\\":\\\"Gradient blue\\\",\\\"composition\\\":\\\"Centered, eye-level\\\",\\\"elements\\\":[\\\"cereal flakes\\\",\\\"splash arcs\\\"],\\\"lighting\\\":\\\"Top-down with soft bounce\\\",\\\"camera_type\\\":\\\"Canon EOS R5\\\",\\\"camera_settings\\\":\\\"f/4.0, 1/250s, ISO 320\\\",\\\"effects\\\":[\\\"milk splash\\\",\\\"floating particles\\\"],\\\"style\\\":\\\"Hyper-clean\\\"}\",\n \"video_prompt\": \"{\\\"description\\\":\\\"Splashy cereal particles flying past the camera before revealing product.\\\",\\\"setting\\\":\\\"Studio\\\",\\\"background\\\":\\\"Gradient blue\\\",\\\"camera_type\\\":\\\"RED Komodo\\\",\\\"camera_movement\\\":\\\"dolly out\\\",\\\"camera_settings\\\":\\\"f/4.0, 1/60s, 24fps\\\",\\\"action\\\":\\\"Ingredients swirl and dissolve into logo\\\",\\\"lighting\\\":\\\"High contrast backlight\\\",\\\"other_details\\\":\\\"Light particle trails and lens flare\\\",\\\"dialogue\\\":\\\"No\\\",\\\"music\\\":\\\"Funky breakbeat\\\",\\\"style\\\":\\\"Energetic\\\",\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"model\\\":\\\"veo3_fast\\\"}\",\n \"caption\": \"Start fresh, start fierce! 🥣✨ #CerealGoals #SplashShot\",\n \"creative_summary\": \"📢 The product launches into frame as ingredients swirl dramatically around it, building energy before landing clean on the logo.\\n\\n🖼️ IMAGE:\\n- Setting: Studio\\n- Background: Gradient blue\\n- Composition: Product center, camera level\\n- Elements: Milk arcs, cereal flakes\\n- Lighting: Top-down with fill bounce\\n- Camera Type: Canon EOS R5\\n- Camera Settings: f/4.0, 1/250s, ISO 320\\n- Effects: Splash, flake particles\\n- Style: Hyper-clean\\n\\n🎬 VIDEO:\\n- Setting: Same blue studio\\n- Background: Swirl particle sim\\n- Camera Type: RED Komodo\\n- Camera Movement: Dolly out\\n- Camera Settings: f/4.0, 1/60s, 24fps\\n- Action: Particle burst, logo lock-on\\n- Lighting: Bright edge + back glow\\n- Other Details: Particles, overlay text\\n- Dialogue: No\\n- Music: Funky breakbeat\\n- Style: Energetic\\n- Aspect Ratio: 16:9\\n- Model: veo3_fast\"\n }\n\n 🔴 bad_examples:\n - \"Product on a table. Looks cool.\"\n - \"Just shoot the pack and maybe add some text.\"\n\n N – Notation:\n format: JSON\n example_output: |\n {\n \"image_prompt\": \"{\\\"description\\\":\\\"...\\\",\\\"setting\\\":\\\"...\\\",\\\"background\\\":\\\"...\\\",\\\"composition\\\":\\\"...\\\",\\\"elements\\\":[\\\"...\\\"],\\\"lighting\\\":\\\"...\\\",\\\"camera_type\\\":\\\"...\\\",\\\"camera_settings\\\":\\\"...\\\",\\\"effects\\\":[\\\"...\\\"],\\\"style\\\":\\\"...\\\"}\",\n \"video_prompt\": \"{\\\"description\\\":\\\"...\\\",\\\"setting\\\":\\\"...\\\",\\\"background\\\":\\\"...\\\",\\\"camera_type\\\":\\\"...\\\",\\\"camera_movement\\\":\\\"...\\\",\\\"camera_settings\\\":\\\"...\\\",\\\"action\\\":\\\"...\\\",\\\"lighting\\\":\\\"...\\\",\\\"other_details\\\":\\\"...\\\",\\\"dialogue\\\":\\\"...\\\",\\\"music\\\":\\\"...\\\",\\\"style\\\":\\\"...\\\",\\\"aspect_ratio\\\":\\\"16:9\\\",\\\"model\\\":\\\"veo3_fast\\\"}\",\n \"caption\": \"Visual wow incoming 🚀 #FreshDrop #VisualVibes\",\n \"creative_summary\": \"📢 [One-line overview]\\n\\n🖼️ IMAGE:\\n- ...\\n\\n🎬 VIDEO:\\n- ...\\n\\n📐 Aspect Ratio: ...\\n🧠 Model: ...\",\n \"aspect_ratio\": \"vertical or horizontal\",\n \"video_model\": \"veo3 or veo3_fast\"\n }\n\n T – Tools:\n You have access to the following tools. Each one is described clearly:\n - Think Tool: Use this to reflect and reason before responding.\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
2752,
176
],
"id": "46867083-e2a0-4c37-aa60-7f4234432400",
"name": "Revised Prompt AI Agent"
},
{
"parameters": {
"method": "POST",
"url": "https://api.kie.ai/api/v1/gpt4o-image/generate",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"filesUrl\": [\n \"https://api.telegram.org/file/bot{{ $('Bot Token').item.json.botToken }}/{{ $('Get Image Path').item.json.result.file_path }}\"\n ],\n \"prompt\": \"Take the product in the image and place it in this scenario: {{ $('Set Prompts').item.json.image_prompt.replace(/\\\"/g, '\\\\\\\"') }}\",\n \"size\": \"3:2\",\n \"nVariants\": 1\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2464,
672
],
"id": "c58abac2-1d37-4581-bd5c-faa4cd0c3e48",
"name": "Create GPT-Image",
"credentials": {
"httpHeaderAuth": {
"id": "U4YauEKCrOp0XQVF",
"name": "Kie AI"
}
}
},
{
"parameters": {
"url": "=https://api.kie.ai/api/v1/gpt4o-image/record-info",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $json.data.taskId }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2912,
672
],
"id": "9601da06-f1ee-44f0-8f95-9473936db1d5",
"name": "Get GPT-Image",
"credentials": {
"httpHeaderAuth": {
"id": "U4YauEKCrOp0XQVF",
"name": "Kie AI"
}
}
},
{
"parameters": {
"amount": 6,
"unit": "minutes"
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
2720,
848
],
"id": "d3f3c36a-3e63-4429-ad18-2be53e85edad",
"name": "Wait 1",
"webhookId": "adfe449b-9612-47ba-b366-417da4485885"
},
{
"parameters": {
"url": "=https://api.kie.ai/api/v1/veo/record-info",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "taskId",
"value": "={{ $json.data.taskId }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
2944,
848
],
"id": "59941470-fa82-4854-9617-4e42f041b32b",
"name": "Get Veo3",
"credentials": {
"httpHeaderAuth": {
"id": "U4YauEKCrOp0XQVF",
"name": "Kie AI"
}
}
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "Great! Your creative is now in progress. This will take a few minutes...",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
2272,
656
],
"id": "202d9a45-5bea-432f-8de0-cd3cd7afefe3",
"name": "In Progress",
"webhookId": "991c4161-4375-4b3c-b00e-ef0afa9cc36c",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"operation": "sendPhoto",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"file": "={{ $('Get GPT-Image').item.json.data.response.resultUrls[0] }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
2272,
848
],
"id": "2bae6a7e-04d1-40d1-96a2-117f25129ff0",
"name": "Send Image",
"webhookId": "0b80f29f-4ecf-40df-9163-b4e5f48fb9e9",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "418d8b43-2c8e-45a9-8055-dd77d2ff9b13",
"leftValue": "={{ $json.data.Approve }}",
"rightValue": "Yes",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
2528,
16
],
"id": "53276e1e-06fb-4ca9-bdaa-31f8bb78b32a",
"name": "If"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "Got it! I'm now crafting your prompts...",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
704,
176
],
"id": "63d97b1a-a018-464b-be8f-01a3e94afa15",
"name": "Received",
"webhookId": "3aecef87-d2e6-4970-a25e-8a6767dc4f81",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"operation": "sendVideo",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"file": "={{ $('Get Veo3').item.json.data.response.resultUrls[0] }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
3168,
848
],
"id": "51f9debf-5bc5-4ca4-913b-270fff1e1543",
"name": "Send Video",
"webhookId": "beff1778-d0f4-4a14-a42d-ba3ce3b663ea",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
},
{
"parameters": {
"content": "# INPUT & ANALYSIS",
"height": 720,
"width": 1328,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-32,
-16
],
"id": "ac0858f9-eb6d-42b3-b18f-205dc2172cd7",
"name": "Sticky Note"
},
{
"parameters": {
"content": "# AI CREATIVE GENERATION",
"height": 720,
"width": 592,
"color": 4
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1328,
-16
],
"id": "3c303a9e-3d9d-4822-9846-d1bee60f85d5",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "# REVISION LOOP (If Needed)",
"height": 608,
"width": 1104,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1952,
-144
],
"id": "fadc7b6c-ff6b-4d5e-8f3f-f57e576c57f3",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "# CONTENT CREATION",
"height": 592,
"width": 1456
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1952,
496
],
"id": "15b77907-1603-4b82-8859-a8660deb6c27",
"name": "Sticky Note3"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "8773758c-1265-4a40-8784-b2a255074d06",
"name": "botToken",
"value": "8302716081:AAFjAeUwJCQ3SVnDY1etRvPd3TXUZo9k-oc",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
256,
272
],
"id": "ac29a3a3-ac8a-4290-ad6f-18dacc179923",
"name": "Bot Token"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "5af4c94a-dc4d-4d98-9e96-4dbc107fd644",
"leftValue": "={{ $('Telegram Trigger').item.json.message.photo }}",
"rightValue": "",
"operator": {
"type": "array",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
480,
272
],
"id": "26ebfb86-305a-4ef7-abba-bf2f50a7108e",
"name": "If1"
},
{
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"text": "Please share an image of the product you want to create a video for.",
"additionalFields": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
704,
368
],
"id": "e5a2e7a0-d8ec-4050-9b26-30efe700be75",
"name": "Received1",
"webhookId": "3aecef87-d2e6-4970-a25e-8a6767dc4f81",
"credentials": {
"telegramApi": {
"id": "uBj4inCogdpo9o8y",
"name": "Demo Architjn Bot"
}
}
}
],
"pinData": {
"Initial Prompt AI Agent": [
{
"json": {
"output": {
"image_prompt": "Capture a sleek and elegant scene featuring a young woman closing a space gray Apple MacBook. The MacBook, with its thin, lightweight unibody design, black backlit chiclet keyboard, and Retina display showing the macOS desktop with a clear Apple logo centered on the screen and the colorful Dock icons visible along the bottom, must remain sharp, clear, and untouched. The setting is a bright minimalist home office with soft natural lighting filtering through a large window to the right, casting gentle, realistic shadows on the smooth white desk. The background is a soft gradient of cool gray and light blue tones that complement the dominant space gray of the MacBook. The composition centers on the MacBook and the girl's hands delicately closing the laptop, fingers well-manicured and wearing a simple silver ring, while the girl's casual yet modern outfit in neutral tones (soft beige sweater with rolled sleeves) blurs subtly behind, maintaining focus on the product. Camera type - full-frame DSLR, 50mm prime lens, aperture f/1.8 for shallow depth of field, ISO 200, natural lighting enhanced by a subtle fill light to keep details crisp. No overlays or text; the style is clean, modern, and professional with realistic shadows and natural textures.",
"video_prompt": "{\"description\":\"A young woman seated at a minimalist white desk closes a space gray Apple MacBook smoothly and deliberately. The MacBook shows the macOS desktop with the Apple logo and Dock icons, all perfectly clear and in focus.\",\"setting\":\"Bright, minimalist home office with large window letting in natural daylight. Desk and background feature soft cool gray and light blue tones complementing the MacBook's color.\",\"camera_type\":\"Full-frame DSLR, 50mm lens, aperture f/1.8, ISO 200\",\"camera_movement\":\"Slow dolly-in moving slightly from right to left, maintaining the MacBook and the girl's hands in frame.\",\"action\":\"The girl gradually closes the MacBook, fingers gently pressing the laptop lid down until fully closed.\",\"lighting\":\"Soft natural daylight with slight fill light to avoid harsh shadows and highlight the laptop's sleek texture.\",\"other_details\":\"Focus remains sharp on the MacBook's screen and Apple logo throughout the action. No text or overlays.\",\"music\":\"Light, upbeat instrumental with a modern tech vibe.\",\"keywords\":\"Apple, MacBook, minimalist, sleek, closing laptop, professional, natural light\"}",
"caption": "Closing the day with style 💻✨ #AppleMacBook #MinimalistTech",
"creative_summary": "This visual concept showcases a young woman in a minimalist, bright home office gently closing a space gray Apple MacBook. The style is modern, clean, and professional, emphasizing the premium design and branding of the MacBook. \n\n📢 The video opens with the MacBook already on the desk in front of the woman. The camera slowly dollies in from right to left as she smoothly closes the laptop, focusing on the clear Apple logo and the colorful dock icons on the screen, with soft natural light enhancing the sleek texture and details.\n\n🖼️ IMAGE:\n- Young woman closing a space gray MacBook on a white desk\n- MacBook with Retina display showing Apple logo and macOS dock icons, labels sharp and clear\n- Bright, minimalist home office with soft gray and blue background tones\n- Natural soft daylight and realistic shadows\n- Camera: full-frame DSLR, shallow depth of field\n\n🎬 VIDEO:\n- Same setting as image, focused on action of closing the MacBook\n- Slow dolly camera movement from right to left\n- Soft natural lighting with fill\n- Light upbeat instrumental music\n- No text or overlays\n\n📐 Aspect Ratio: 9:16\n🧠 Model: veo3_fast",
"aspect_ratio": "9:16",
"video_model": "veo3_fast"
}
}
}
],
"Create GPT-Image": [
{
"json": {
"code": 200,
"msg": "success",
"data": {
"taskId": "9bfcabdd667637d1bbae532ed5b1c68c"
}
}
}
],
"Analyze Image": [
{
"json": {
"id": "chatcmpl-CG1NHg5HddrJHIxxKM9LeqytcFGt6",
"object": "chat.completion",
"created": 1757934567,
"model": "chatgpt-4o-latest",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The product shown in the image is a sleek, modern **laptop computer** designed and manufactured by **Apple Inc.** It is identifiable as an **Apple MacBook**, specifically a model from the **MacBook Air** or **MacBook Pro** series due to its minimalist and ultrathin aluminum body, likely in the **Space Gray** color variant.\n\n### Detailed Product Description:\n\n- **Brand**: Apple\n- **Product Type**: Laptop (MacBook series)\n- **Color**: Space Gray — a dark metallic finish exclusive to Apple’s premium laptop lineup.\n- **Build Material**: Unibody aluminum chassis, giving it a premium, durable, and lightweight feel.\n- **Display**:\n - The screen is a **high-resolution Retina display**, known for vibrant color accuracy and sharp text.\n - It features narrow bezels, maximizing the screen real estate.\n - A slight reflection is visible, indicating a glossy finish.\n - The display is turned on and shows macOS interface elements, including a default dark mode background and the Apple macOS dock.\n\n- **Keyboard**: \n - A full-sized backlit keyboard with black keys.\n - The design is streamlined, likely featuring a scissor or butterfly mechanism depending on the model year.\n\n- **Trackpad**: \n - A large, glass Force Touch trackpad beneath the keyboard.\n\n- **Operating System**: macOS — the interface confirms it’s running macOS with app icons such",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 795,
"completion_tokens": 300,
"total_tokens": 1095,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": "fp_d3a0838fb8"
}
}
],
"Create Veo3": [
{
"json": {
"code": 200,
"msg": "success",
"data": {
"taskId": "3b48013cf7eaed0d26698b584c1117e5"
}
}
}
]
},
"connections": {
"Telegram Trigger": {
"main": [
[
{
"node": "Bot Token",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Initial Prompt AI Agent",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Revised Prompt AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Initial Prompt AI Agent",
"type": "ai_outputParser",
"index": 0
},
{
"node": "Revised Prompt AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Think": {
"ai_tool": [
[
{
"node": "Initial Prompt AI Agent",
"type": "ai_tool",
"index": 0
},
{
"node": "Revised Prompt AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get GPT-Image",
"type": "main",
"index": 0
}
]
]
},
"Get Image Path": {
"main": [
[
{
"node": "Analyze Image",
"type": "main",
"index": 0
}
]
]
},
"Analyze Image": {
"main": [
[
{
"node": "Initial Prompt AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Create Veo3": {
"main": [
[
{
"node": "Wait 1",
"type": "main",
"index": 0
}
]
]
},
"Set Prompts": {
"main": [
[
{
"node": "Get Approval",
"type": "main",
"index": 0
}
]
]
},
"Get Approval": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"Initial Prompt AI Agent": {
"main": [
[
{
"node": "Set Prompts",
"type": "main",
"index": 0
}
]
]
},
"Revised Prompt AI Agent": {
"main": [
[
{
"node": "Set Prompts",
"type": "main",
"index": 0
}
]
]
},
"Create GPT-Image": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Get GPT-Image": {
"main": [
[
{
"node": "Send Image",
"type": "main",
"index": 0
}
]
]
},
"Wait 1": {
"main": [
[
{
"node": "Get Veo3",
"type": "main",
"index": 0
}
]
]
},
"Get Veo3": {
"main": [
[
{
"node": "Send Video",
"type": "main",
"index": 0
}
]
]
},
"In Progress": {
"main": [
[
{
"node": "Create GPT-Image",
"type": "main",
"index": 0
}
]
]
},
"Send Image": {
"main": [
[
{
"node": "Create Veo3",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "In Progress",
"type": "main",
"index": 0
}
],
[
{
"node": "Revised Prompt AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Received": {
"main": [
[
{
"node": "Get Image Path",
"type": "main",
"index": 0
}
]
]
},
"Bot Token": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"If1": {
"main": [
[
{
"node": "Received",
"type": "main",
"index": 0
}
],
[
{
"node": "Received1",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "3f218605-1a3d-42ea-8029-aab5791e955d",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "933df83c84196d70ce3ffd0bf5d3e1aca31b7366f2f84e1f3482640096e4a3a9"
},
"id": "yXantV7qqeObcK9i",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment