N
n8n Store
Workflow Market
Visual Storytelling Content Factory: Gemini & Replicate AI with Human-in-the-loop Publishing

Visual Storytelling Content Factory: Gemini & Replicate AI with Human-in-the-loop Publishing

by nadiap0 views

Description

Categories

🤖 AI & Machine Learning

Nodes Used

n8n-nodes-base.ifn8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.sortn8n-nodes-base.limitn8n-nodes-base.slackn8n-nodes-base.slack
PriceKostenlos
Views0
Last Updated11/28/2025
workflow.json
{
  "meta": {
    "instanceId": "632f65756c0dfa07ac80bbf68a720ffbe7ae34338cadcb46b58428622d4ef469",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "073907b9-ee66-4475-9076-7231edfd2f41",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -128,
        -144
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "838da680-2c22-4525-bce6-436478935e3e",
      "name": "Creative Director",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        144,
        -32
      ],
      "parameters": {
        "text": "={\n\"prompt_title\": \"Creative Director Brief: 'A Day in the Life' of a Serene Skeleton\",\n\"instruction_for_director\": \"Your task is to conceptualize a narrative collection of 5-8 unique scenes that follow a serene skeleton through a single, peaceful day, from dawn until night. This collection, titled 'A Day in the Life,' should feel like a cohesive story told through quiet moments. We are seeking your creative interpretation of what a perfectly tranquil day looks like in this universe, allowing you to generate a new, unique 'day' each time you approach this brief. Take into account current season or day and create a narrative that fits that day: {{$now.format('dd LLLL')}}\",\n\"project_vision\": {\n\"theme\": \"Finding beauty and mindfulness in the simple, moment-to-moment flow of a single day. The collection should romanticize daily routines and the quiet connection with self and nature.\",\n\"tone\": \"Calm, contemplative, soothing, and comforting. The mood should evolve naturally with the time of day, from the gentle hope of morning to the peaceful introspection of night. But you must start with a dynamic interesting scene, so you can skip typical routine activities and pick something slightly controvercial and unusual\",\n\"narrative_arc\": \"Follow a loose narrative from morning to evening activities. The scenes should feel connected, as if we are observing one character's activities through their day.\"\n},\n\"character_and_universe_guide\": {\n\"main_character\": \"A single serene skeleton (or a small skeletal family of 2, with a furry Colli dog and 2 fluffy white cats). Their 'personality' is expressed through their mindful actions and peaceful interactions with their environment.\",\n\"universe_setting\": \"A consistent, nature-rich environment that the skeleton inhabits. This could be a cabin in the woods, a cottage by a lake, a home in a meadow, a cosy cafe at dusk, a tiny house during the rain, etc. The setting should feel like a safe, personal sanctuary.\"\n},\n\"inspirational_framework_a_day_in_the_life\": \"Use the following time blocks as a guide to structure your day's narrative. For each block, create one or two scenes that capture its unique feeling. The specific activities are up to you; the goal is to be creative and generate a new sequence of events each time.\",\n\"time_blocks\": {\n\"morning_dawn_to_midday\": {\n\"mood\": \"quiet beginnings, fresh potential.\",\n\"activity_ideas\": [\n\"A mindful morning ritual: making tea, stretching, watering a plant.\",\n\"A quiet breakfast, watching the sunrise.\",\n\"A gentle walk in the dewy morning air with a skeletal pet.\",\n\"A quiet ritual of bread baking\",\n\"looking outside during the rain\"\n]\n},\n\"afternoon_midday_to_dusk\": {\n\"mood\": \"Peaceful productivity, creative flow, gentle activity.\",\n\"activity_ideas\": [\n\"Engaging in a quiet craft: pottery, painting, tending a garden.\",\n\"Reading a book in a sunbeam or under a shady tree.\",\n\"Preparing a simple, wholesome lunch.\",\n\"Lying in the grass and watching the clouds drift by.\"\n]\n},\n\"evening_dusk_to_night\": {\n\"mood\": \"Winding down, warmth, reflection, cozy comfort.\",\n\"activity_ideas\": [\n\"Watching the sunset from a porch or viewpoint.\",\n\"Lighting a campfire or fireplace as the air cools.\",\n\"Cooking a warm, comforting dinner.\",\n\"Stargazing or listening to the sounds of the night.\",\n\"Preparing for sleep, perhaps writing in a journal by candlelight.\"\n]\n}\n},\n\"quote_requirement\": \"For each scene, create a concise, life-reassuring quote that aligns with the activity and the time of day. The quote should feel like a gentle thought or observation from the skeleton's mindful perspective.\",\n\"output_requirement\": \"Generate your unique 'Day in the Life' as a JSON array of scene objects. Each object must contain the following keys, filled with your detailed, creative descriptions for that specific moment in the day.\",\n\"output_format_example\": [\n{\n\"scene_number\": 1,\n\"scene_description\": \"[Your unique, detailed description of a morning scene. Focus on sensory details: the quality of light, the texture of objects, the slow, deliberate movements of the skeleton.]\",\n\"main_activity\": \"[A concise summary of the core morning activity.]\",\n\"setting\": \"[The specific location for this scene, e.g., 'A sun-filled rustic bedroom'].\",\n\"time_of_day\": \"Morning\",\n\"life_reassuring_quote\": \"[Your unique quote for this morning moment.]\"\n},\n{\n\"scene_number\": 2,\n\"scene_description\": \"[Your unique, detailed description of an afternoon scene...]\",\n\"main_activity\": \"[A concise summary of the core afternoon activity.]\",\n\"setting\": \"[The specific location for this scene, e.g., 'A tranquil vegetable garden'].\",\n\"time_of_day\": \"Afternoon\",\n\"life_reassuring_quote\": \"[Your unique quote for this afternoon moment.]\"\n}\n]\n}",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "d9a1e3f0-8098-4632-baaf-e64fca9a2456",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        80,
        208
      ],
      "parameters": {
        "model": "google/gemini-2.5-flash",
        "options": {
          "temperature": 0.9,
          "responseFormat": "json_object"
        }
      },
      "credentials": {
        "openRouterApi": {
          "id": "M75Q6e0xrP9D36yn",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ed91556a-065d-41ce-8be4-96ba30592a94",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        416,
        208
      ],
      "parameters": {
        "model": "google/gemini-2.5-flash",
        "options": {
          "temperature": 0.9,
          "responseFormat": "json_object"
        }
      },
      "credentials": {
        "openRouterApi": {
          "id": "M75Q6e0xrP9D36yn",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "03126cf6-8e3e-4930-8214-d32fd5f12007",
      "name": "Creative Technician Brief",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        528,
        -32
      ],
      "parameters": {
        "text": "={\n  \"prompt_title\": \"Creative Technician Brief: AI Prompt Generation for 'A Day in the Life'\",\n  \"instruction_for_technician\": \"You will receive a JSON array from the Creative Director detailing a series of scenes that form a 'Day in the Life' narrative for a serene skeleton. Your task is to translate this narrative collection into a cohesive set of text-to-image and text-to-video prompts for generative AI. It is crucial to maintain visual consistency and a natural progression of light and mood from morning to night to ensure the scenes feel like they belong to the same day and the same world.\",\n  \"project_overview\": {\n    \"goal\": \"For each scene in a narrative, create 2 prompts. Prompts for each scene should be independent from each other - describe the character and all the elements in each prompt. Referencing previous scenes is not allowed because all prompts will be used in isolation. The prompts are static, so separate static scenes from any action that should go into the video prompt. Remove character names if any becaue they don't make sense for an image generator.\",\n    \"narrative_consistency_is_key\": \"Pay close attention to the 'time_of_day' key in the director's input. Your AI prompts must reflect the changing light, shadows, and color palette appropriate for that time.\"\n  },\n  \"universe_and_style_guide_for_ai_prompts\": {\n    \"art_style\": \"Digital painting with brush strokes, warm and inviting, slightly stylized and whimsical. Consistent style is paramount. All text must be in a hand-drawn style. Keywords: cozy, tranquil, Artistic color drawing. 2D flat Painterly brush digital illustration.\",\n    \"character_and_setting_consistency\": \"Ensure the skeleton character and the core setting (e.g., the cabin, the forest) are described consistently across all prompts to maintain visual continuity. Repeat details in subsequent prompts instead of referencing them (e.g., 'A full human skeleton (white, no hard outlines, schematic, kind) stands on ...' and 'A fluffy Border Collie dog with white and black fur sits...').\",\n    \"lighting_and_time_of_day_guide\": {\n      \"morning\": \"Use keywords like 'soft golden hour light,' 'long soft shadows,' 'dewy,' 'misty morning air,' 'sunbeams streaming through window.'\",\n      \"afternoon\": \"Use keywords like 'bright but gentle midday sun,' 'dappled sunlight through leaves,' 'warm, clear light,' 'vibrant natural colors.'\",\n      \"evening_dusk\": \"Use keywords like 'warm golden hour glow,' 'long, stretching shadows,' 'sky with hues of orange, pink, and purple,' 'low sun.'\",\n      \"night\": \"Use keywords like 'deep indigo and purple sky,' 'soft moonlight,' 'intimate warm light from a campfire, lantern, or candle,' 'glowing stars,' 'fireflies.'\"\n    }\n  },\n  \"ai_prompt_generation_guidelines\": {\n    \"image_prompt_structure\": \"Craft a detailed text-to-image prompt for each scene. Incorporate the art style, the consistent character/setting, the specific activity, and crucially, the lighting and mood keywords that match the 'time_of_day'. Put any text in quotation marks exactly as it must appear. Make sure text color and background colors are contrasting and text is readable. For that use proper layout or specify text color and background shades\",\n    \"video_prompt_structure\": \"Craft a corresponding text-to-video prompt. This should focus *only* on the subtle, continuous, animations that bring the static scene to life. The animated elements should enhance the tranquil mood of that specific time of day (e.g., morning steam, afternoon leaf sway, evening fire crackle). Text on the image should remain still untill the end. Base prompt: asmr video, relaxed and peaceful movements: skeleton [action] slowly\",\n  },\n  \"input_example_from_creative_director\": {\n    \"scene_number\": 1,\n    \"scene_description\": \"As dusk settles, the skeleton sits on the wooden porch of their cabin, holding a warm mug. The sky is a gradient of orange and purple. A single lantern on the porch rail begins to glow, casting a warm, intimate light. Fireflies are starting to appear over the nearby meadow.\",\n    \"main_activity\": \"Watching the sunset with a lantern.\",\n    \"setting\": \"Cabin porch at dusk.\",\n    \"time_of_day\": \"Evening\",\n    \"life_reassuring_quote\": \"Let the day end gently.\"\n  },\n  \"expected_output_for_example_scene\": {\n    \"scene_number\": 1,\n    \"text_to_image_prompt\": \"Artistic color drawing. 2D flat Painterly brush digital illustration. A serene skeleton (white, no hard outlines, schematic, kind) sits on the wooden porch of a rustic cabin, holding a warm mug. It is dusk, and the sky is a beautiful gradient of deep orange and purple. A single lantern on the porch rail casts a warm, intimate glow on the skeleton. The first fireflies are beginning to glow over a quiet meadow in the background. The mood is peaceful, reflective, and cozy. Hand-drawn off-white text at the top: \"LET SILENCE DO THE TELLING\". Mid-key values, low contrast, soft vignette.\",\n    \"text_to_video_prompt\": \"asmr video, relaxed and peaceful movements: the skeleton breathes slowly. The lantern light has a soft, gentle flicker. The fireflies in the background slowly pulse with light and drift gently. A very subtle wisp of steam rises from the skeleton's mug.\"\n  },\n  \"final_output_format\": \"Please provide your generated AI prompts as a JSON array, with each object containing the 'scene_number', 'text_to_image_prompt', and 'text_to_video_prompt' for each scene in the 'Day in the Life' collection.\"\n}",
        "batching": {},
        "messages": {
          "messageValues": [
            {
              "type": "HumanMessagePromptTemplate",
              "message": "={{ $json.data.toJsonString() }}"
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "a788f509-3e79-459c-b512-3f3dc40f4a3c",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        912,
        -32
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "c3b5ef6f-3bc8-47f0-b8cf-5a921f0c2d82",
      "name": "Generate an Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        -16
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/models/qwen/qwen-image/predictions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"input\": {\n    \"prompt\": {{ JSON.stringify($json.text_to_image_prompt) }},\n    \"go_fast\": true,\n    \"guidance\": 4,\n    \"strength\": 0.9,\n    \"image_size\": \"optimize_for_quality\",\n    \"lora_scale\": 0.4,\n    \"aspect_ratio\": \"3:4\",\n    \"lora_weights\": \"https://huggingface.co/thinkingkoala/lorawatercolor/resolve/main/watercolor_strokes.safetensors\",\n    \"output_format\": \"jpg\",\n    \"enhance_prompt\": false,\n    \"output_quality\": 100,\n    \"negative_prompt\": \" \",\n    \"num_inference_steps\": 50\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "epwYCnuDmS6pzUUb",
          "name": "Replicate"
        }
      },
      "retryOnFail": false,
      "typeVersion": 4.2
    },
    {
      "id": "f1d91425-c2d7-4982-b84c-2bf610f08046",
      "name": "Request Approval",
      "type": "n8n-nodes-base.slack",
      "position": [
        1824,
        -16
      ],
      "webhookId": "663a7147-22a3-4ab9-9a72-a6b9e645da8f",
      "parameters": {
        "select": "channel",
        "message": "=Approval required for an image: {{ $json.output[0] }}",
        "options": {
          "appendAttribution": false
        },
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#content-automation-approvals"
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "disapproveLabel": "Regenerate"
          }
        }
      },
      "credentials": {
        "slackApi": {
          "id": "zuumuR8EgUiRRxZi",
          "name": "Slack-human-in-the-loop"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7be21ba6-b8a4-47c5-90cd-b671f023120f",
      "name": "If: Approved",
      "type": "n8n-nodes-base.if",
      "position": [
        2016,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3ab0b82e-a04b-4853-98f3-44e7e1317498",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "34385336-ae24-413d-87b7-e9cfe74f654c",
      "name": "Reset Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        2224,
        80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3113b351-a373-4965-a5d6-6ff9587b6f6a",
              "name": "text_to_image_prompt",
              "type": "string",
              "value": "={{ $('Generate an Image').item.json.input.prompt}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "769d9724-4ad3-477d-8f52-e2a620efee3a",
      "name": "Generate a video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        496
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/models/bytedance/seedance-1-lite/predictions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"input\": {\n      \"fps\": 24,\n      \"image\": \"{{ $json.image }}\",\n      \"prompt\": {{ JSON.stringify($json.text_to_video_prompt) }},\n      \"duration\": 5,\n      \"resolution\": \"480p\",\n      \"aspect_ratio\": \"3:4\",\n      \"camera_fixed\": true\n    }\n  }",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "epwYCnuDmS6pzUUb",
          "name": "Replicate"
        }
      },
      "retryOnFail": false,
      "typeVersion": 4.2
    },
    {
      "id": "64723d9a-aa68-4d78-afea-e280067deed5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 240,
        "content": "## Generate a Story"
      },
      "typeVersion": 1
    },
    {
      "id": "f6e49644-a48a-47b9-8341-4be9e37a981b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 240,
        "content": "## Convert the Story to prompts"
      },
      "typeVersion": 1
    },
    {
      "id": "35960bb2-fc8b-4ffd-bfda-abd060c07edc",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        -112
      ],
      "parameters": {
        "color": 5,
        "width": 1712,
        "height": 464,
        "content": "## Generate and Approve images"
      },
      "typeVersion": 1
    },
    {
      "id": "520f663f-c876-42e0-a4fa-daa629ce8641",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "disabled": true,
      "position": [
        1104,
        -32
      ],
      "parameters": {
        "maxItems": 3
      },
      "typeVersion": 1
    },
    {
      "id": "0ab181df-bbfc-4679-8651-f257746c81f8",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1296,
        -32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "0b73e7b1-3cec-4602-8184-3595b48a62b4",
      "name": "Set Scene Image",
      "type": "n8n-nodes-base.set",
      "position": [
        2704,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8b799f02-0232-4404-a365-6190c1d64d15",
              "name": "scene_number",
              "type": "number",
              "value": "={{ $('Loop Over Items').item.json.scene_number }}"
            },
            {
              "id": "77091477-0452-46c0-87c2-d82a67d3b999",
              "name": "image",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "5c3026c4-87aa-4dbb-8d2d-06cd7c847485",
              "name": "text_to_video_prompt",
              "type": "string",
              "value": "={{ $('Loop Over Items').item.json.text_to_video_prompt }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "bdff72bc-0704-44d3-ae0e-cbcf14aa96d8",
      "name": "If: Approved2",
      "type": "n8n-nodes-base.if",
      "position": [
        2048,
        496
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3ab0b82e-a04b-4853-98f3-44e7e1317498",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9cacc4b9-4e45-4e7e-b34d-959f10ce666c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        400
      ],
      "parameters": {
        "color": 6,
        "width": 1696,
        "height": 464,
        "content": "## Generate and Approve videos"
      },
      "typeVersion": 1
    },
    {
      "id": "1685ce8a-9cb4-466e-aa02-81b353ba1a9c",
      "name": "Loop Over Images",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1328,
        480
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "86f0fdf6-3087-4d12-9f22-579a133db0e9",
      "name": "Request Approval for Video",
      "type": "n8n-nodes-base.slack",
      "position": [
        1856,
        496
      ],
      "webhookId": "1e656f4e-e3d7-4901-8539-c8bd2e1c377e",
      "parameters": {
        "select": "channel",
        "message": "=Approval required for a video: {{ $json.output }}",
        "options": {
          "appendAttribution": false
        },
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#content-automation-approvals"
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double",
            "disapproveLabel": "Regenerate"
          }
        }
      },
      "credentials": {
        "slackApi": {
          "id": "zuumuR8EgUiRRxZi",
          "name": "Slack-human-in-the-loop"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "d91b2d75-7354-4288-854a-55ecf204692e",
      "name": "Set Scene Video",
      "type": "n8n-nodes-base.set",
      "position": [
        2720,
        640
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8b799f02-0232-4404-a365-6190c1d64d15",
              "name": "scene_number",
              "type": "number",
              "value": "={{ $('Loop Over Images').item.json.scene_number }}"
            },
            {
              "id": "77091477-0452-46c0-87c2-d82a67d3b999",
              "name": "video",
              "type": "string",
              "value": "={{ $json.url }}"
            },
            {
              "id": "0bcf6126-11eb-4a82-9f81-fbc35c71f8a1",
              "name": "image",
              "type": "string",
              "value": "={{ $('Loop Over Images').item.json.image }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "d4e612c5-087b-4a2a-8f37-574ebba938bb",
      "name": "Reset Video Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        2256,
        592
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3113b351-a373-4965-a5d6-6ff9587b6f6a",
              "name": "text_to_video_prompt",
              "type": "string",
              "value": "={{ $('Generate a video').item.json.input.prompt}}"
            },
            {
              "id": "310a805c-f2f0-4498-8ad2-205d1d16ef1c",
              "name": "image",
              "type": "string",
              "value": "={{ $('Generate a video').item.json.input.image }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "83e64c48-a3b8-491d-bf78-ec0905ea4d01",
      "name": "Sort",
      "type": "n8n-nodes-base.sort",
      "position": [
        1344,
        1040
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "scene_number"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "9d442363-cd07-47a5-a871-cbaf4db2073f",
      "name": "Summarize",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1536,
        1040
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "video",
              "separateBy": ", ",
              "aggregation": "concatenate"
            },
            {
              "field": "image",
              "separateBy": ", ",
              "aggregation": "concatenate"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "69c9e53d-da1d-4e9f-9017-4bb8f5c4190c",
      "name": "Create TikTok Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1904,
        1328
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "13396",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/13396",
          "cachedResultName": "nadiawealth"
        },
        "postContentText": "=skeletal life",
        "postContentMediaUrls": "={{ $json.concatenated_url }}",
        "postCreateTiktokOptionAutoAddMusic": true,
        "postCreateTiktokOptionDisabledDuet": true,
        "postCreateTiktokOptionPrivacyLevel": "SELF_ONLY",
        "postCreateTiktokOptionIsAiGenerated": true
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c9b642d9-5f17-4c2e-8a41-2a28b4ab9f9b",
      "name": "Create Instagram Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1760,
        912
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "12109",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/12109",
          "cachedResultName": "mrboneslife"
        },
        "postContentText": "={{ $('Creative Director').item.json.data[0].life_reassuring_quote }}",
        "postContentMediaUrls": "={{ $json.concatenated_video }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c61655c9-8adc-4556-bb3f-7b3983e24d10",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        880
      ],
      "parameters": {
        "color": 4,
        "width": 1088,
        "height": 416,
        "content": "## Publish: Instagram, Facebook"
      },
      "typeVersion": 1
    },
    {
      "id": "8cebd32f-2f5e-48ac-b6d2-d4810a73ec56",
      "name": "Create Facebook Post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1760,
        1120
      ],
      "parameters": {
        "options": {},
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "8120",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/8120",
          "cachedResultName": "Nadia Privalikhina"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "110037418539464",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/8120/subaccounts/110037418539464",
          "cachedResultName": "Inloveinc - Gift Shop"
        },
        "postContentText": "={{ $('Creative Director').item.json.data[0].life_reassuring_quote }}",
        "postContentMediaUrls": "={{ $json.concatenated_video }}"
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "be6adb46-29df-4eb7-aa86-0375af2a4655",
      "name": "Upload videos",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2464,
        576
      ],
      "parameters": {
        "mediaUrl": "={{ $('Generate a video').item.json.output }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "98e5323f-96cd-4a44-9bb6-9d344a43c52b",
      "name": "Upload images",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2432,
        80
      ],
      "parameters": {
        "mediaUrl": "={{ $('Generate an Image').item.json.output.first() }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "2f283481-f9f7-4489-aa9e-43975feb8dab",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1504,
        1424
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "003e1034-a90b-446a-99ec-0694b9b4ea48",
      "name": "Resize Image1",
      "type": "n8n-nodes-base.editImage",
      "position": [
        2096,
        1536
      ],
      "parameters": {
        "width": 1080,
        "height": 1920,
        "options": {},
        "operation": "crop"
      },
      "typeVersion": 1
    },
    {
      "id": "c3d92aee-c950-4f61-a829-524f5fc2fa57",
      "name": "Upload images1",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2304,
        1536
      ],
      "parameters": {
        "resource": "media",
        "useBinaryData": true
      },
      "credentials": {
        "blotatoApi": {
          "id": "aMt0VjPWpOAa8l26",
          "name": "Blotato account"
        }
      },
      "retryOnFail": true,
      "typeVersion": 2
    },
    {
      "id": "6b33aa62-7e47-4b19-a45f-d2b7c66f4d07",
      "name": "Get Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1728,
        1536
      ],
      "parameters": {
        "url": "={{ $json.image }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "274cfbd3-3480-41ab-813b-25fb9aaaec50",
      "name": "Resize Image: Add Borders",
      "type": "n8n-nodes-base.editImage",
      "position": [
        1920,
        1536
      ],
      "parameters": {
        "options": {},
        "borderWidth": 0,
        "borderHeight": 230
      },
      "typeVersion": 1
    },
    {
      "id": "6620d3fb-1ff9-4b96-a743-3148fc3b6b3f",
      "name": "Summarize1",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1712,
        1328
      ],
      "parameters": {
        "options": {},
        "fieldsToSummarize": {
          "values": [
            {
              "field": "url",
              "separateBy": ", ",
              "aggregation": "concatenate"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "f69507f0-ac0d-4a9d-84ea-4d43a0165862",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        1312
      ],
      "parameters": {
        "color": 4,
        "width": 1312,
        "height": 448,
        "content": "## Publish: TikTok slideshow"
      },
      "typeVersion": 1
    },
    {
      "id": "33535b64-8558-42e8-9647-4fac259c8c92",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -96
      ],
      "parameters": {
        "color": 2,
        "width": 400,
        "height": 528,
        "content": "## SetUp:\n1. Create accounts on [Replicate](https://replicate.com/) and [Blotato](https://tinyurl.com/blotatoapp)\n2. You'll also need to connect an LLM. This example uses gemini 2.5 flash via [OpenRouter](https://openrouter.ai/)\n3. Create a Slack account and a Slack Bot\n4. Install Blotato community node here in n8n\n\n\nCreate Credentials and update:\n- OpenRouter Chat Model nodes\n- Slack nodes\n- Blotato nodes\n- HTTP nodes (use replicate credentials in \"Generate an Image\" and \"Generate a video\")\n\n\nModify:\n- Make sure Slack node references an existing slack channel, or create and modify the name in both slack nodes\n- You can connect more social media channels (blotato supports 9 channels and you can connect more than 1 account for each of them)\n- You can modify story line in the first 2 LLM blocks"
      },
      "typeVersion": 1
    },
    {
      "id": "6a4e98ef-1e1f-4070-9fab-c5657e87ae43",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -416
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 288,
        "content": "## YouTube Tutorial:\n@[youtube](F4MWgsftNWE)"
      },
      "typeVersion": 1
    },
    {
      "id": "c409d7f4-3bac-48c7-b038-45cdd020d1c4",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 176,
        "height": 256,
        "content": "## Limit images\nactivate this during testing"
      },
      "typeVersion": 1
    },
    {
      "id": "37de574b-1048-4e16-96d5-0abd3c81b9d8",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "disabled": true,
      "position": [
        -128,
        64
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "Sort": {
      "main": [
        [
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          },
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Image": {
      "main": [
        [
          {
            "node": "Resize Image: Add Borders",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "Create Instagram Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "Create Facebook Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize1": {
      "main": [
        [
          {
            "node": "Create TikTok Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Approved": {
      "main": [
        [
          {
            "node": "Upload images",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reset Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reset Prompt": {
      "main": [
        [
          {
            "node": "Generate an Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Approved2": {
      "main": [
        [
          {
            "node": "Upload videos",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reset Video Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resize Image1": {
      "main": [
        [
          {
            "node": "Upload images1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload images": {
      "main": [
        [
          {
            "node": "Set Scene Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload videos": {
      "main": [
        [
          {
            "node": "Set Scene Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload images1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Loop Over Images",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate an Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Scene Image": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Scene Video": {
      "main": [
        [
          {
            "node": "Loop Over Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a video": {
      "main": [
        [
          {
            "node": "Request Approval for Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Images": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate a video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Summarize1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Approval": {
      "main": [
        [
          {
            "node": "If: Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Creative Director",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creative Director": {
      "main": [
        [
          {
            "node": "Creative Technician Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an Image": {
      "main": [
        [
          {
            "node": "Request Approval",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reset Video Prompt": {
      "main": [
        [
          {
            "node": "Generate a video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Creative Director",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Creative Technician Brief",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Creative Technician Brief": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resize Image: Add Borders": {
      "main": [
        [
          {
            "node": "Resize Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Approval for Video": {
      "main": [
        [
          {
            "node": "If: Approved2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Creative Director",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

相关工作流