Create Animated Stories with GPT-4o-mini, Midjourney & Creatomate APIs

This workflow automates storytelling by generating AI-driven image scenes and animated videos from a text prompt using GPT-4o-mini, Midjourney, Kling, and Creatomate APIs. It streamlines creating animated story content, saving hours of manual work for creatives and marketers.
httpRequest
set
wait
+5
Workflow Identifier: 1297
NODES in Use: set, code, httpRequest, wait, if, switch, stickyNote, manualTrigger

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow changes simple story text into animated videos automatically.
It fixes the problem of spending too much time making images and videos by hand.
The result is a ready video made fast with little effort from the user.

The workflow uses AI tools to write story parts, create pictures, animate them, and join the videos into one story video.


Tools and Services Used

  • GPT-4o-mini: Creates story prompts for three scenes.
  • Midjourney API: Makes three illustrated images from prompts.
  • Kling API: Turns each image into a short animated video with “Natural swing” motion.
  • Creatomate API: Combines three video clips into one final story video.

How This Workflow Works: Inputs, Processing, and Output

Inputs

You enter a basic story description with three parts: style, character, and situation keywords.
You also provide an API key to let the workflow use the AI services.

Processing Steps

First, GPT-4o-mini creates 3 detailed story prompts from your input.
Then, Midjourney makes 3 pictures, one for each story scene.

Next, Kling takes those pictures and makes 3 videos with gentle swinging animations.
The workflow waits and checks until these videos are ready.

Finally, Creatomate puts these three videos together into one smooth story video with text overlay for the story title.

Output

The workflow gives you links for each video clip and the final combined story video.
You get a shareable video ready for publishing or other uses.


Who Should Use This Workflow

This is good for writers, creators, or teachers who want to make animated stories fast.
Users who find manual image creation and video editing slow or tricky will benefit most.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the full workflow file using the Download button here.
  2. Open n8n editor where you want to run this automation.
  3. Use the “Import from File” option to load the workflow JSON file.

Step 2: Configure API Keys and Inputs

  1. Go to the Basic Params node.
  2. Enter your valid x-api-key for the PiAPI services in the key field.
  3. If needed, update story parameters in the JSON: “style”, “character”, and “situational_keywords”.
  4. Check if there are any specific IDs, emails, or template IDs in HTTP request nodes and update them as needed.

Step 3: Test the Workflow

  1. Click the When clicking Test workflow trigger to run once.
  2. Watch the workflow go through generates images, videos, and creates the combined video.
  3. Confirm all nodes run without errors.

Step 4: Activate Workflow for Production

  1. Turn on the workflow by toggling the active switch.
  2. Choose how to trigger it: manually, on schedule, or with a webhook.
  3. Monitor running logs in n8n for any delays or problems during video generation.
  4. Consider self-host n8n for more control and security in production.

Customization Ideas

  • Change the story content by editing the Basic Params JSON fields.
  • Try other animation styles in Kling video nodes by changing the “prompt” like “Smooth zoom”.
  • Adjust Midjourney image aspect ratios in HTTP requests from “2:3” to “16:9” or “1:1”.
  • Use a different Creatomate template by updating the template_id for a new video layout.

Common Problems and Solutions

  • Authentication failed errors happen if the API key is wrong or missing.
    Check and enter the correct x-api-key in the Basic Params node.
  • Sometimes image or video jobs stay pending because of API limits or slow servers.
    Add longer wait times or retry later.
  • Final video errors in Creatomate may happen if video URLs or template IDs are wrong.
    Verify URLs and use an active template ID.

Pre-Production Checklist

  • Test PiAPI keys by calling GPT-4o-mini or Midjourney APIs directly first.
  • Check Creatomate API access and the video template used.
  • Run the full workflow once on default inputs.
  • Confirm generation of all 3 images and videos completes successfully.
  • Save your n8n workflow JSON backup and keep API keys secure.

Summary

✓ Saves time by automating story illustration and video creation.
✓ Needs just simple text inputs to get full animated story videos.
✓ Combines AI writing, image, video, and editing APIs in one flow.
✓ Helps storytellers publish animated content faster and easier.


Important Workflow Code Samples

Below is the JavaScript Code used in the Get Prompt node to parse GPT-4o-mini response:

const content = $input.first().json.choices[0].message.content;
const prompts = JSON.parse(content);
return { prompts };

This code extracts the structured JSON prompts from the AI text reply for image generation.


Example Requests for API Calls

Midjourney image generation request body example:

{
  "model": "midjourney",
  "task_type": "imagine",
  "input": {
    "prompt": "A gentle girl and a fluffy rabbit explore a sunlit forest together, playing by a sparkling stream, [prompt1], a children\u0018s book cover, ages 6-10. --s 500 --sref 4028286908 --niji 6",
    "aspect_ratio": "2:3",
    "process_mode": "turbo",
    "skip_prompt_check": false
  }
}

Kling video generation request example:

{
  "model": "kling",
  "task_type": "video_generation",
  "input": {
    "version": "1.6",
    "mode": "pro",
    "image_url": "[image_url_here]",
    "prompt": "Natural swing"
  }
}

Creatomate final video combination request example:

{
  "template_id": "c10c62b6-d515-4f36-a730-f4646d1b7ee2",
  "modifications": {
    "Video-1.source": "[video1_url]",
    "Video-2.source": "[video2_url]",
    "Video-3.source": "[video3_url]",
    "Text-1.text": "[story_title]"
  }
}

Frequently Asked Questions

Authentication errors happen when the API key is missing or incorrect in the Basic Params node.
Pending status usually means API rate limits or server delays are causing slow processing.
Verify that video URLs are valid and the template_id used is correct and active.
Download the workflow file, import it into n8n, add API keys and settings, test once, then activate it for production.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free