Case studyAutomation · AI median8n + Kie.ai

AI Video Factory:
image + prompt → finished video.

A content studio was turning product photos into short promo videos by hand — uploading each image to a generation service, pasting a prompt, waiting, downloading. We turned the whole routine into one unattended pipeline.

n8nKie.ai APIGrok video modelJavaScriptWebhookscron 02:00
Inside the pipeline

Eight nodes.
Zero clicks.

The same route a person used to walk through by hand — now traced by the workflow for every image in the batch.

01 · INPUT

Two parallel reads

The workflow starts on a schedule (or a Telegram command) and forks: one branch pulls the night's images from a folder, the other reads the prompts file — a simple table of "image → what the video should show".

02 · PREP

Extract & parse

Each branch cleans its own data: image IDs are extracted from filenames, prompts are parsed and validated. Broken rows don't kill the batch — they're logged and skipped.

03 · MERGE

Pairing

The two branches meet in a Merge node that matches every image with its prompt. From here on, each pair travels the pipeline as one item.

04 · REQUEST

Create generation task

An HTTP node POSTs the pair to the Kie.ai API, which queues a Grok video-generation task and returns a task ID. The pipeline fires all pairs without waiting.

05 · POLLING LOOP

Wait ↔ Get status

Video generation takes minutes, so the workflow enters a patient loop: wait 30 seconds, GET the task status, and repeat until the API answers "ready". The amber return wire on the diagram is exactly this loop.

06 · PROCESS

JavaScript post-step

A code node extracts the video URL from the response, builds a clean filename from the prompt, and prepares metadata for the studio's asset catalog.

07 · DELIVERY

Download & save

The finished MP4 is downloaded and written to the studio's network drive, sorted by date and campaign. A Telegram message with a preview link confirms each completed video.

08 · RESILIENCE

Retries & alerts

Failed generations retry twice with backoff; anything still failing lands in an "attention" folder with the API error attached — so mornings start with results, not debugging.

Results

The studio sleeps.
The factory doesn't.

Batches run at 02:00. By morning the drive holds finished videos, a log, and a short Telegram digest.

0+
videos generated per night
faster than the manual routine
0
clicks required
Available for new projects

Have a routine
like this one?

Describe it in two sentences — we reply within a day with a pipeline sketch.

hello@wireclad.com