← Back to home Case Study — Ongoing

Brand Operating System for Medical Aesthetics

A 3-brand medical aesthetics group, running autonomously on a custom pipeline I built from scratch.

某醫美集團・三品牌同時代管・全自動運轉.我親手打造的 pipeline。

Industry Medical Aesthetics 醫美產業
Scope 3 Brands in Parallel 三品牌平行
Duration Ongoing 持續進行中
Role Architect + Builder 架構 + 實作
01

The Challenge

面對的挑戰

A medical aesthetics group needed to run three brands in parallel under Taiwan's strict advertising regulations — a regulatory environment where a single wrong word can trigger fines and forced takedowns.

The output requirement was 60+ content pieces per month, every month: 18 feed posts, 30 stories, 12 short videos. Three brand voices. Two platforms (Facebook + Instagram). Zero tolerance for compliance violations.

Traditional agencies faced an impossible trade-off: either they scaled up headcount to meet the volume (expensive, inconsistent), or they automated naively and violated compliance (fines, reputation damage). Both failure modes were unacceptable.

某醫美集團需要同時代管三個品牌,而台灣醫美廣告法規嚴格——一個用字錯誤就可能觸發罰款與下架。每月要產出 60+ 則內容:18 篇貼文、30 則限動、12 支短影音,涵蓋三個品牌語氣、兩個平台、絕對零違規。傳統代操要不是人力堆砌(貴、不一致),就是粗暴自動化(踩線、傷品牌),兩種失敗模式都不能接受。

02

The Architecture

系統架構

A

Content Brief

Monthly strategy + topic planning per brand

B

AI Generation

Veo 3.1 · custom prompt templates · ffmpeg

C

Compliance Agent

32-term regex · LLM review · pre-publish gate

D

Auto Publish

Cloudflare Worker cron → Meta Graph API

E

Insights Loop

D1 / D3 / D7 / Final snapshots → dashboard

The system runs on Cloudflare Workers + R2 + Meta Graph API + Google Veo 3.1. Every component is orchestrated by a cron schedule; nothing requires human intervention after the monthly content brief is locked.

系統跑在 Cloudflare Workers + R2 + Meta Graph API + Google Veo 3.1 上。所有組件由 cron 自動編排,月度企劃確認後就完全無需人工介入。

03

The Numbers

量化成果

60+ Content pieces / mo 內容/月
3 Brands in parallel 品牌平行
32 Compliance terms 合規詞彙監控
0 Violations 違規件數

18 feed posts · 30 stories · 12 short videos — every month.
Automated publishing across Facebook + Instagram, for three brand voices, through a single system.

每月 18 篇貼文、30 則限動、12 支短影音——三個品牌語氣、跨 FB+IG 平台,全由一套系統自動運轉。

04

Technical Deep Dive

技術細節

Auto-Publisher Worker

Cloudflare Worker running a 5-minute cron. Reads Google Sheets schedule, finds due items, fetches assets from Drive, publishes to FB + IG via the Meta Graph API, writes results back to dual sheets (internal + client-facing).

Handles partial failures with explicit status tracking. Uses R2 as a staging bucket for video uploads (Google Drive's public URLs return thumbnails for video files, not streams). Token caching reduces Google OAuth calls by 98%.

Compliance Agent

A pre-publish gate enforcing 32 regulatory terms across medical and brand-positioning dimensions. Runs on every caption before the Worker touches Meta.

Strict regex dictionary + LLM review catches edge cases like forbidden terms inside negations. 365 days of zero violations.

AI Video Pipeline

Veo 3.1 generates 8-second base clips from product photography. ffmpeg merges two clips with a 1.5-second crossfade and upscales to 1080×1920. Output feeds directly into Reels pipeline.

Product form preservation — rigid wording constraints to prevent the model from "creatively" morphing physical devices. Learned the hard way during 8 iterations of a single client spot.

Insights Collection

Daily cron at 18:00 Taipei time (optimized for 23-hour story window) collects D1 / D3 / D7 / Final snapshots per post, plus daily follower count per brand across both platforms.

Deduplication via composite key. Month-end "Final" writes to a separate sheet that rewrites in full — no append accumulation. Feeds monthly performance reports.

Concurrency & Safety

Claim-pattern locking prevents duplicate publishing when cron windows overlap. HTTP endpoints (manual triggers) require a worker secret header. Token redaction in all error paths.

Strict cron-string matching so adding new schedules can't silently trigger the wrong handler. IG container polling handles EXPIRED and PUBLISHED states beyond the default FINISHED/ERROR.

Dual Sheet Sync

Two spreadsheets kept in sync: an internal schedule (engineering source of truth) and a client-facing proposal deck. Every publish updates both atomically.

Column-aware updates — tolerates schema drift when client-facing sheets get new columns added. Safer string matching to prevent cross-row contamination.

05

What This Proves

這套系統證明了什麼

  • Scale is a system problem, not a headcount problem. Running 60+ monthly pieces across 3 brands on 2 platforms isn't a staffing exercise — it's an architecture exercise.
  • Compliance can be engineered. Strict dictionaries + LLM review at the right stage of the pipeline makes "zero violations in 365 days" a default, not an achievement.
  • Automation requires discipline. Every silent failure mode I've seen in the wild has been fixed in this system — claim locks, partial-failure markers, deduplication, cron-string strictness, HTTP-status checks on every Sheets call.
  • The moat is the pipeline, not the tools. Veo, Cloudflare, Meta APIs are public. The orchestration, failure handling, and domain-specific tuning are where the work lives.

Need a system like this?

需要一套這樣的系統嗎?

Get in touch →