N
n8n Store
Workflow Market
UGC Video Generation with Wan 2.5 on Replicate

UGC Video Generation with Wan 2.5 on Replicate

by yaron-nofluff•0 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.setn8n-nodes-base.coden8n-nodes-base.waitn8n-nodes-base.wait
PriceGratis
Views0
Last Updated11/28/2025
workflow.json
{
  "meta": {
    "instanceId": "12e6f290a974a1eee154f8d915aade185e90e826260e6aeab8a087ba7386a1bc"
  },
  "nodes": [
    {
      "id": "9e9e3163-7fe1-4fe7-8123-a57397e21ccd",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1024,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e22274c3-af22-4fab-9094-452bfcd8f0ff",
      "name": "Set API Token",
      "type": "n8n-nodes-base.set",
      "position": [
        -656,
        -48
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "=YOUR_REPLICATE_API"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "5a16dd08-746e-493a-8fd3-fd733ec4cc9b",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        240,
        -32
      ],
      "webhookId": "d2c4ca16-0eb2-45b4-8a2d-eec2f99df89c",
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "5bc13e03-b6b2-495a-8b53-ec82e69dba0c",
      "name": "Check Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        432,
        -32
      ],
      "parameters": {
        "url": "=https://api.replicate.com/v1/predictions/{{ $('Create Video').item.json.id }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "1b0a24be-a1eb-4289-ba63-d0733220275d",
      "name": "Is Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        672,
        -112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7bd9709d-50d9-4884-9b17-c9d8114abfb9",
      "name": "Has Failed?",
      "type": "n8n-nodes-base.if",
      "position": [
        928,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bfd044-3a07-4c18-b55f-72d192596139",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "69b0068c-89d0-494c-b2eb-c4bcc4ff7830",
      "name": "Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        912,
        -224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: true, result_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Other generated successfully' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "428b52fb-ef45-481b-b7be-3669173d8d9f",
      "name": "Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1424,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: false, error: $json.error || 'Other generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate other' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "190eab8d-bdb5-4649-b0e4-03af2df26e75",
      "name": "Display Result",
      "type": "n8n-nodes-base.set",
      "position": [
        1728,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "final-result",
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "e64a49e0-6233-483e-b28f-769826cf9585",
      "name": "Log Request",
      "type": "n8n-nodes-base.code",
      "position": [
        240,
        -224
      ],
      "parameters": {
        "jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('digitalhera/heranathalie Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'other'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "6f057fbe-173a-41db-af95-eaf01134da0c",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        -208
      ],
      "parameters": {
        "color": 4,
        "width": 804,
        "height": 432,
        "content": "=======================================\n        IMAGE TO VIDEO GENERATOR\n=======================================\nFor any questions or support, please contact:\n    [email protected]\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n\nšŸš€ Need a scalable solution for generating \n   and automating media buying?\n   Check out ROASPIG.com\n======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "22f27f0a-4405-4584-83a3-65129c738032",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        288
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## šŸŽ¬ **WAN-VIDEO 2.5 - IMAGE TO VIDEO WORKFLOW**\n\n**šŸ”„ Powered by Replicate API and n8n Automation**\n\n---\n\n### šŸ“ **Model Overview**\n\n- **Owner**: wan-video\n- **Model**: wan-2.5-i2v\n- **Type**: Image to Video Generation\n- **API Endpoint**: https://api.replicate.com/v1/models/wan-video/wan-2.5-i2v/predictions\n\n**šŸŽÆ What This Model Does:**\nTransforms static images into dynamic videos using AI. Perfect for creating promotional videos, social media content, and animated presentations from single images.\n\n---\n\n### šŸ“‹ **Parameter Reference**\n\n**šŸ”“ Required Parameters:** \n- **image** (string): Input image URL to animate\n- **prompt** (string): Description of the desired video motion and action\n\n**šŸ”µ Optional Parameters:** \n- **seed** (integer): Random seed for reproducible generation\n- **num_frames** (integer): Number of frames to generate (affects video length)\n- **guidance_scale** (number): How closely to follow the prompt (7-15 typical)\n- **num_inference_steps** (integer): Quality vs speed tradeoff (20-50 typical)\n- *Additional parameters available in API documentation*\n\n---\n\n### šŸ”§ **Workflow Components Explained**\n\n**šŸŽÆ Manual Trigger**\n- Starts the workflow execution\n- Click to begin video generation process\n\n**šŸ” Set API Token** \n- Configures your Replicate API authentication\n- Replace with your actual Replicate API token\n- Essential for accessing the wan-video model\n\n**āš™ļø Add Seed Image and Prompt**\n- Sets the input image URL and video prompt\n- Properly formats the prompt to handle quotes\n- Pre-configured with AG1 marketing video example\n\n**šŸš€ Create Video**\n- Sends the generation request to Replicate API\n- Uses wan-video/wan-2.5-i2v model\n- Returns a prediction ID for status tracking\n\n**ā³ Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**āœ… Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with video URL or errors\n\n**šŸ“Š Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### 🌟 **Key Benefits**\n\n- **šŸŽ¬ AI Video Generation**: Transform static images into engaging videos\n- **šŸ“± Perfect for Social Media**: Create dynamic content for TikTok, Instagram, YouTube\n- **šŸ”„ Automated Workflow**: Handles the complete generation pipeline automatically\n- **šŸ›”ļø Error Resilience**: Built-in retry logic and comprehensive error handling\n- **šŸ“ˆ Production Ready**: Includes logging, monitoring, and structured responses\n- **⚔ Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### šŸš€ **Quick Start Instructions**\n\n1. **šŸ”‘ Get Your API Key**\n   - Sign up at https://replicate.com\n   - Navigate to your account settings\n   - Copy your API token\n\n2. **šŸ”§ Configure the Workflow**\n   - Replace the API token in \"Set API Token\" node\n   - Update image URL in \"Add Seed Image and Prompt\" node\n   - Customize the prompt for your desired video motion\n\n3. **ā–¶ļø Execute the Workflow**\n   - Click the 'Manual Trigger' to start\n   - Monitor the execution in the n8n interface\n   - Check logs for detailed execution information\n\n4. **šŸ“„ Get Your Results**\n   - Successful generations return a URL to your video\n   - Download the MP4 file from the provided URL\n   - Video typically ready in 30-120 seconds\n\n---\n\n### šŸ” **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Image URL Issues**: Verify the image URL is publicly accessible\n- **Prompt Formatting**: Use single quotes inside prompts to avoid JSON errors\n- **Generation Timeout**: Video generation can take 1-3 minutes - be patient\n\n**Best Practices:**\n- Use high-quality input images (minimum 512x512)\n- Write detailed, specific prompts for better results\n- Test with shorter prompts first, then add complexity\n- Keep API tokens secure - use n8n credentials feature\n- Monitor your Replicate usage and billing\n\n---\n\n### šŸ“ **Example Use Cases**\n\n- **Product Demos**: Animate product images with usage demonstrations\n- **Social Media Ads**: Create eye-catching video ads from product photos\n- **Story Telling**: Bring illustrations to life with motion\n- **Marketing Content**: Transform static campaigns into dynamic videos\n- **Educational Content**: Animate diagrams and infographics\n\n---\n\n**šŸ”— Additional Resources:**\n- Model Documentation: https://replicate.com/wan-video/wan-2.5-i2v\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "1ff77c8a-fe78-4d16-b394-6ece7807c13a",
      "name": "Create Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -96,
        -48
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/models/wan-video/wan-2.5-i2v/predictions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"input\": {\n    \"image\": \"{{ $json.Seed_image }}\",\n    \"prompt\": \"{{ $json.Prompt }}\"\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer  {{ $('Set API Token').item.json.api_token }}"
            },
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "f33f16a7-5e34-42c6-8c05-ae88775f1dd7",
      "name": "Add Seed Image and Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        -352,
        -32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "924b6590-46a4-4ad5-b58d-0804991c633e",
              "name": "Seed_image",
              "type": "string",
              "value": "https://replicate.delivery/pbxt/NllgibhEDDtjRmPSLSDvXnkiobQCJDeoI4PwWdJ0bdXIeZbP/AG1_1.png"
            },
            {
              "id": "76ad3bd8-da89-413b-b5ab-f031d4d221f4",
              "name": "Prompt",
              "type": "string",
              "value": "5-Second AG1 'Game Changer' Video Prompt Scene Setup: Woman in modern kitchen (white cropped hoodie, olive green leggings), holding AG1 package with both hands at chest level, green smoothie in blender visible to the side Action (0-5 seconds): 0-1 sec: Start with her looking down at the AG1 package 1-2 sec: She looks up at camera with growing smile (like discovering something amazing) 2-4 sec: Holds package up slightly higher, direct eye contact: 'This is an absolute GAME changer!' 4-5 sec: Quick confident nod while bringing package back to chest level, maintaining smile Camera: Static shot or very subtle push-in Frame from waist up (like reference photo) Bright, natural lighting Kitchen background slightly blurred for focus on her and product Energy: Authentic excitement, like she's sharing a secret with her best friend - natural, not overly polished"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e7fec34c-0237-4fea-8ca6-d45400082db5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -144
      ],
      "parameters": {
        "height": 416,
        "content": "Add Your Replicate API"
      },
      "typeVersion": 1
    },
    {
      "id": "7caa345e-4986-48fa-a13f-6ff37afa1b48",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -144
      ],
      "parameters": {
        "height": 336,
        "content": "1- Add a link to your Seed image. If you dont have one, you can generate it using OpenAI or Nano Banana\n\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "366a180c-cc7b-419a-bdde-cf0e454375f8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        192
      ],
      "parameters": {
        "height": 400,
        "content": "\n\n## šŸ“ **PROMPT WRITING GUIDELINES**\n\n### āŒ **AVOID These Characters:**\n- Double quotes (`\"`) - Will break JSON parsing\n- Backslashes (`\\`) - Can cause escape sequence issues\n- Line breaks/Enter key - Makes JSON invalid\n"
      },
      "typeVersion": 1
    },
    {
      "id": "2f1c8f38-2973-49cc-afc2-45f03c35a46d",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -928,
        1072
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "9c6d90f8-e1ae-4f6d-815a-1c613972f77d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        -208
      ],
      "parameters": {
        "height": 432,
        "content": "Connect this node to your storage in order to save the predictions\n"
      },
      "typeVersion": 1
    },
    {
      "id": "173e58da-2595-499c-a2e6-072c0cc3873d",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1216,
        528
      ],
      "parameters": {
        "width": 544,
        "height": 752,
        "content": "## Batch Processing Guide\n\n## šŸ”„ Optional: Generate Multiple Videos\n\nConnect the \"Batch Process Videos\" node after \"Set API Token\" for bulk generation.\n\n### Three Options:\n\n**Option 1: Same Image + Same Prompt = Multiple Videos**\n- Get different variations from identical inputs\n- Example: 1 product photo → 5 unique videos\n\n**Option 2: Same Image + Different Prompts = Multiple Videos**\n- Test different animations on one image  \n- Example: 1 photo with 10 different prompts\n\n**Option 3: Different Images + Different Prompts = Multiple Videos**\n- Bulk create unique content\n- Example: 50 products, each with custom prompt"
      },
      "typeVersion": 1
    },
    {
      "id": "9fe706b2-a214-4165-8cd7-e1af7c3e4a41",
      "name": "Wait 90s",
      "type": "n8n-nodes-base.wait",
      "position": [
        800,
        224
      ],
      "webhookId": "51a05aef-e220-406d-8c2c-e59c82c3e26e",
      "parameters": {
        "unit": "seconds",
        "amount": 90
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 90s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Failed?": {
      "main": [
        [
          {
            "node": "Error Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 90s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Request": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Is Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video": {
      "main": [
        [
          {
            "node": "Log Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Complete?": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Has Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API Token": {
      "main": [
        [
          {
            "node": "Add Seed Image and Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Display Result": {
      "main": [
        []
      ]
    },
    "Error Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set API Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Seed Image and Prompt": {
      "main": [
        [
          {
            "node": "Create Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

ē›øå…³å·„ä½œęµ