How Gears Garage runs itself
Gears Garage is an Amazon Associates store for car accessories. Behind it is an automated pipeline I designed and run: it sources products, lists them in WooCommerce, writes AI marketing copy, generates short promo videos and publishes them to Facebook, Instagram and TikTok, with a human approving every step from Telegram.
What the pipeline does
Product discovery
A weekly schedule checks a curated list of Amazon ASINs through CanopyAPI (title, brand, price, rating, images).
Human approval
Each candidate is sent to Telegram with Approve / Reject buttons. A duplicate check blocks products already in the store.
Store listing
Approved products are created in WooCommerce as drafts with an affiliate link.
AI copywriting
An LLM returns strict JSON: review title, a 150–200 word review and Instagram, TikTok and Facebook captions.
AI video
Scene prompts are built from the real product image, turned into clips with an image-to-video model and stitched with burned-in captions.
Video review loop
The finished video comes back to Telegram with Regenerate / Discard / Approve / Post actions.
Social publishing
Meta Graph API for Facebook and Instagram Reels, and the TikTok Content Posting API with chunked upload.
Nightly digest
Every night at 9 PM, a Telegram summary reports draft products and their content and video status.
Architecture
Design decisions
Human in the loop where it matters
Automation does the repetitive work, but a person approves the product before it is listed and the video before it is published. AI output is never posted without review.
Idempotent approvals
A duplicate check on every approval keeps a double-tap or a re-sent Telegram message from creating the same product twice.
Cost guardrails in code
A monthly request counter caps CanopyAPI usage (about 590 calls) and stops cleanly at the limit. Video generation runs on a cheaper model, keeping the whole pipeline around $5/month.
Defensive LLM parsing
The model is asked for JSON; the parser accepts several response shapes, extracts JSON from extra text and falls back safely, so one bad AI response does not break the run.
Single source of truth
Captions, video URLs and status flags are stored as WooCommerce product metadata, so the store itself is the state the nightly digest reports from.
Right-sized infrastructure
I migrated from n8n Cloud to a self-hosted instance by scaling up an existing Lightsail server instead of adding EC2: simpler and cheaper for a single-project workload.