This automation workflow turns a podcast to shorts using AI, it's free to use and without watermark.
This agent works seamlessly with these platforms to deliver powerful automation.
Professional cloud-based video editing and rendering API. Create videos programm...
Post videos, photos, and text to 10+ social platforms with one API call.
This powerful automation workflow transforms raw video content into viral-ready TikTok posts with AI-generated captions and titles—all without manual editing. Simply submit your main video clip and background footage, and the agent automatically transcribes your content, generates perfectly-timed captions, assembles a professional video timeline, renders the final product, and publishes directly to TikTok.
Save 2-3 hours per video by eliminating manual caption timing, video editing, and the tedious upload process. This workflow is perfect for content creators, social media managers, and marketing teams who need to maintain a consistent TikTok presence without spending hours in editing software. Whether you're repurposing long-form content, creating educational snippets, or producing entertainment clips, this agent handles the entire production pipeline from raw footage to published post.
Key benefits include: automated caption generation with precise timing, professional video composition with background overlays, AI-powered viral title creation, and seamless TikTok publishing—all executed in a single automated sequence.
Shotstack is a cloud-based video editing API that powers the video processing capabilities of this workflow. You'll need it to ingest video sources, build the timeline with captions and overlays, and render the final TikTok-ready video.
Setup steps:
Important: Sandbox renders include a watermark and have usage limits. Upgrade to production when you're ready to publish watermark-free videos.
UploadPost enables direct publishing to TikTok and other social media platforms. This integration eliminates the need to manually download and upload your rendered videos.
Setup steps:
Note: Ensure your TikTok account has creator permissions and meets TikTok's API access requirements. Business accounts typically have better API support.
This form node collects the necessary inputs to start your workflow. Configure the following fields:
Example configuration:
Field 1: main_video_url (type: text, required: true)
Field 2: background_video_url (type: text, required: true)
Field 3: description (type: textarea, required: false)
The form submission timestamp automatically flows to the next node to initiate processing.
This Shotstack node downloads and prepares your main video for editing.
{{trigger.main_video_url}} from the formvideo
The node outputs a source_id that uniquely identifies your ingested video in Shotstack's system.
Configure identically to the main clip ingestion:
{{trigger.background_video_url}}
video
This creates a second source_id for the background footage.
This AI Agent node uses GPT-4o to transcribe your video and create precisely-timed captions.
Model: gpt-4o (required for accurate timing and transcription)
System Prompt:
You are a video caption specialist. Analyze the provided video content and generate timed captions in JSON format. Each caption should include start time, end time, and text. Format captions for maximum readability on mobile devices (max 15 words per caption). Return ONLY valid JSON.
User Prompt:
Generate timed captions for this video: {{trigger.description}}
Return format:
{
"captions": [
{"start": 0.0, "end": 2.5, "text": "Caption text here"},
{"start": 2.5, "end": 5.0, "text": "Next caption"}
]
}
Input Data: Map the main video source_id: {{ingest_main_clip.source_id}}
The AI will analyze the video and output structured caption data with precise timing.
This Function node constructs the video editing timeline using JavaScript.
Function Code:
const captions = JSON.parse(input.captions);
const mainClip = input.main_source_id;
const bgClip = input.background_source_id;
const timeline = {
tracks: [
{
clips: captions.captions.map(cap => ({
asset: {
type: "html",
html: `<p>${cap.text}</p>`,
css: "p { color: white; font-size: 48px; font-weight: bold; text-align: center; text-shadow: 2px 2px 4px black; }"
},
start: cap.start,
length: cap.end - cap.start,
position: "bottom"
}))
},
{
clips: [{
asset: { type: "video", src: mainClip },
start: 0,
length: "auto"
}]
},
{
clips: [{
asset: { type: "video", src: bgClip },
start: 0,
length: "auto",
fit: "cover",
opacity: 0.3
}]
}
],
output: {
format: "mp4",
resolution: "sd",
aspectRatio: "9:16"
}
};
return { timeline: timeline };
Input Mapping:
captions: {{generate_captions.result}}
main_source_id: {{ingest_main_clip.source_id}}
background_source_id: {{ingest_background.source_id}}
This creates a three-track timeline: captions on top, main video in the middle, and dimmed background video at the bottom.
Configure the Shotstack render node:
{{build_timeline.timeline}}
mp4
sd (standard definition is sufficient for TikTok)9:16 (vertical video for TikTok)The node returns a render_id for tracking the render progress.
This polling node checks render status:
{{render_video.render_id}}
5 seconds60 (allows up to 5 minutes for rendering)The node waits until the status is done before proceeding, then outputs the final video URL.
Another AI Agent node creates an engaging TikTok title:
Model: gpt-4o
System Prompt:
You are a viral TikTok content strategist. Create compelling, attention-grabbing titles that drive engagement. Use hooks, curiosity gaps, and trending language. Keep titles under 100 characters.
User Prompt:
Create a viral TikTok title for this video: {{trigger.description}}
Include relevant hashtags and emojis. Make it scroll-stopping.
The AI generates an optimized title designed to maximize views and engagement.
Final node publishes your video:
{{wait_for_render.url}}
{{generate_title.result}}
public, friends, or private
true (recommended for engagement)true (increases viral potential)true
The workflow completes when the video is successfully posted to TikTok.
After form submission:
During video ingestion:
After caption generation:
During rendering:
Before TikTok posting:
Success indicators:
Error: "Unable to ingest source - invalid URL"
Error: "Source format not supported"
Error: "AI response is not valid JSON"
Problem: Captions are poorly timed or inaccurate
Error: "Render failed - timeline validation error"
Problem: Render stuck in "queued" status
Error: "Authentication failed"
Error: "Video does not meet TikTok requirements"
Problem: Video posts but doesn't appear
Immediate actions:
Improve caption quality:
Enhance video production:
Boost engagement:
Batch processing: Modify the trigger to accept multiple video URLs and use a loop node to process several videos in sequence.
Content repurposing: Connect this workflow to a YouTube download node to automatically convert long-form content into TikTok clips.
Analytics integration: Add a final node that logs video performance data to a spreadsheet or database for tracking ROI.
Multi-platform publishing: Duplicate the UploadPost node to simultaneously publish to Instagram Reels, YouTube Shorts, and other platforms.
Dynamic backgrounds: Create a library of background videos tagged by category, then use AI to select the most appropriate background based on video content.
Custom branding: Modify the timeline function to include your brand colors, fonts, and logo positioning for consistent visual identity across all posts.
This workflow represents a complete video production pipeline that scales with your content needs. Start with the basic configuration, then gradually add sophistication as you identify opportunities for improvement specific to your audience and content strategy.
Explore these powerful automation agents that complement your workflow.
Automatically generate AI-powered blog posts with Claude-written content and custom images, then publish directly to Wor...
Automatically summarize Fireflies meeting transcripts from Outlook emails and receive AI-generated summaries delivered t...