Our Work
AI AutomationMarketing / Social Media4 weeks

AI Content Factory — Automated Social Media Pipeline

The AI Content Factory is a fully automated content production and publishing pipeline that generates, processes, and schedules social media content across Instagram, Facebook, and YouTube without any manual intervention. The system produces over 30 pieces of content daily — including posts with AI-generated captions, stock video with music overlays, branded text graphics, and stories — all following strict brand guidelines for visual consistency. The pipeline operates on a 24-hour cycle: content is generated and queued each evening at 20:00 UTC, then published the following day starting at 9:00 AM Chicago time with optimized spacing between posts. Every piece of content includes AI-crafted captions with relevant hashtags, properly licensed stock media from Pexels, royalty-free music from a curated library, and brand-consistent text overlays using serif typography. The system completely eliminated the need for a social media manager, freeing over 20 hours per week of manual content work.

!The Challenge

Maintaining a consistent social media presence is one of the most time-consuming aspects of digital marketing. A professional-quality Instagram presence typically requires daily posting of polished content, regular story updates throughout the day, engaging captions with strategic hashtags, and consistent visual branding across all posts. For a small team, this work can consume 20-30 hours per week — time that would be better spent on core business activities. The client needed a social media presence that would establish brand authority, drive organic reach, and support caterer acquisition efforts for their marketplace platform. However, they did not have a dedicated social media team and could not justify hiring one during the early growth phase. They needed a system that could produce professional-quality content at volume, maintain brand consistency, and publish it on an optimized schedule — all running autonomously. The technical challenge was significant: the system needed to source properly licensed media (avoiding copyright issues), generate contextually relevant captions (not generic filler text), process videos with music and text overlays (requiring FFmpeg media processing), manage a publishing schedule that respects platform rate limits, and track which media had already been used to avoid repetition. All of this needed to run reliably via CRON without manual oversight.

Our Approach

1

We designed the pipeline as a series of independent, composable stages: media sourcing, caption generation, media processing (video + music + text overlay), scheduling, and publishing. Each stage can run independently and has its own error handling and retry logic, making the overall system resilient to individual failures.

2

Media sourcing uses the Pexels API to find high-quality stock videos and images related to food, catering, and events. The system maintains a database of previously used Pexels media IDs to ensure no asset is repeated. A proxy server is used for API requests to manage rate limits and ensure consistent availability.

3

Caption generation uses Claude API with brand-specific prompts that incorporate the company's tone of voice, key messages, and target audience. Each caption is generated with relevant hashtags selected from a curated list of high-performing tags in the catering and food niche. The AI ensures variety in post themes while maintaining brand voice consistency.

4

Video processing uses FFmpeg to combine stock video footage with royalty-free music from a curated library of 20 tracks (sourced from Pixabay) and branded text overlays. Text is rendered in Playfair Display serif font at 64-140px depending on text length, positioned for maximum readability over the video content.

5

The publishing schedule is managed by CRON jobs: content generation runs at 20:00 UTC (10 PM Spain time), and publishing begins the next day at 9:00 AM Chicago time. Posts are spaced 5 hours apart (3 posts per day), while stories are published every 45 minutes (10 stories per day), following Instagram's best practices for engagement.

The Solution

AI Content Generation Engine

Claude API powers the caption and content ideation layer. Each day, the system generates a batch of captions covering different content themes: industry insights, tips for event planners, behind-the-scenes catering content, seasonal food trends, and promotional messaging. The AI operates within strict brand guidelines — defined tone of voice, approved messaging pillars, and a curated hashtag strategy. Generated captions are stored in a queue with metadata including target platform, content type (post vs. story), and publication timestamp. The system ensures thematic variety across the week while maintaining consistent brand voice.

Media Processing Pipeline

The media processing stage takes raw stock video from Pexels and transforms it into branded, ready-to-publish content using FFmpeg. Each video receives a music track selected from a library of 20 royalty-free tracks (rotated to avoid repetition), and every second post receives a text overlay rendered in Playfair Display serif font. The overlay system handles variable text lengths by automatically adjusting font size between 64px and 140px, with shadow effects for readability over diverse video backgrounds. Stories are processed as video-only content with music — no photo stories are produced, following the strategy that video stories consistently outperform static images in engagement.

Content Import & Sourcing

Beyond stock media, the system can import existing content from Instagram via a Telegram userbot built with gramjs. This allows curating and repurposing high-performing content from industry accounts (with proper attribution), expanding the content library beyond stock footage. The Pexels integration includes intelligent query generation — the system varies search terms to access different content pools rather than repeatedly pulling the same type of footage. Each used media ID is tracked in the database, ensuring no video or image is ever used twice, maintaining content freshness across weeks and months of automated publishing.

Scheduling & Publishing Automation

The CRON-based scheduling system orchestrates the entire daily cycle. At 20:00 UTC each evening, the generation pipeline activates: AI captions are produced, stock media is sourced and matched to captions, videos are processed with music and overlays, and the complete content package is queued for the next day. Publishing begins at 9:00 AM Chicago time with three feed posts spaced 5 hours apart and ten stories published every 45 minutes starting from the first post. The system respects platform rate limits and includes retry logic for failed publishes. A monitoring dashboard tracks successful publications, failed attempts, and content performance metrics.

Results & Impact

30+
Daily Content Pieces
20+ hrs
Weekly Time Saved
0
Manual Work Required
24/7
Autonomous Operation
The system produces over 30 pieces of content daily (3 feed posts + 10 stories) with professional-quality visuals, AI-generated captions, music overlays, and branded text — all without any human intervention.
Freed over 20 hours per week of manual content creation and scheduling work, allowing the team to focus entirely on business development and caterer onboarding.
Brand consistency is maintained automatically through the AI's adherence to defined brand guidelines, curated font and color choices, and a controlled library of music and visual assets.
The content tracking system ensures no media asset is ever repeated, maintaining freshness and variety across months of continuous automated publishing.
The modular pipeline architecture allows each stage (sourcing, generation, processing, publishing) to be updated or extended independently — for example, adding a new platform requires only a new publishing adapter.

Technology Stack

C

Claude API

AI-powered caption and content generation

P

Pexels API

Licensed stock video and image sourcing

F

FFmpeg

Video processing, music overlay, and text rendering

N

Node.js

Pipeline orchestration and CRON scheduling

P

Pixabay Music

Royalty-free music library (20 curated tracks)

g

gramjs

Telegram userbot for Instagram content import

P

PostgreSQL

Content queue, media tracking, and analytics

C

CRON

Automated daily generation and publishing schedule

Team Involved

Automation EngineerAI/ML EngineerDevOps EngineerBrand Strategist

Have a Project in Mind?

Let's discuss how we can bring your idea to life.