- Replace Upload-Post with a self-hosted Postiz client (postiz.py) and /api/postiz/* endpoints - Remove AI Shorts, UGC gallery, AI Agent tab, Autopilot, MCP/agent layer, and their UIs - Fix YouTube Studio thumbnail generation (google-genai >=2 Interactions API) and blocking download - Make the video upload size cap configurable/unlimited (MAX_FILE_SIZE_MB, default 0) - Update SEO/marketing/docs to the single-product self-hosted reality; lint+build green |
||
|---|---|---|
| .. | ||
| openshorts-clip-and-notify.json | ||
| openshorts-content-machine.json | ||
| README.md | ||
OpenShorts + n8n
Two importable workflows, from a one-shot clipper to a channel watcher.
Both run against a self-hosted OpenShorts instance (point them at your base URL,
default http://localhost:8000) and publish through a self-hosted
Postiz instance. No API key is required on a
self-hosted instance, but the server needs a Google Gemini key for the AI
stages, and Postiz needs the target channels connected.
| Workflow | What it does | Credentials |
|---|---|---|
openshorts-clip-and-notify.json |
A video URL goes in through a form, clips come back on a signed webhook. No polling. | None (self-hosted) |
openshorts-content-machine.json |
Watches your YouTube channel: daily clipping, approval buttons in Telegram, drip-scheduled posting through Postiz, weekly analytics digest. | Telegram bot |
Shared setup
-
In n8n: Workflows → Import from file → pick the workflow.
-
Set
OPENSHORTS_URL/ the request base URL to your instance (http://localhost:8000). -
Open the Clips ready (webhook) node, copy its production URL, and paste it as
webhook_urlinside the Start OpenShorts job node body. -
Optional: change
webhook_secret. OpenShorts signs the webhook body with HMAC-SHA256 and sends it asX-OpenShorts-Signature: sha256=<hex>; verify it in a Code node with:const crypto = require('crypto'); const expected = 'sha256=' + crypto .createHmac('sha256', 'change-me') .update(JSON.stringify($json.body)) .digest('hex');
The Content Machine
openshorts-content-machine.json runs your channel in four acts:
- Watch — once a day it reads your channel's RSS feed
(
https://www.youtube.com/feeds/videos.xml?channel_id=UC...) and clips one video: the newest upload if there is one, otherwise the next unprocessed video from your back catalog. One video a day keeps processing predictable. - Approve from your phone — every finished clip lands in Telegram with ✅ Publish / ❌ Skip buttons. Clips over Telegram's ~20 MB URL limit fall back to a link message with the same buttons.
- Drip-publish — each approved clip takes the next free daily slot and is
scheduled through
POST /api/postiz/postto every channel connected in Postiz. Approve five clips today, fill five days of content. The slot comes from the queue the server actually holds (GET /api/postiz/scheduled), so two clips approved seconds apart cannot book the same one. - Sunday digest — the machine reads the analytics of what it published
(
GET /api/postiz/analytics/*) and reports total impressions, per-platform split, and your best post of the week.
Machine-specific setup, all inside sticky notes on the canvas:
- Put your channel id in the Channel RSS feed node.
- Create a Telegram bot with @BotFather, add the
Telegram botcredential, and replaceYOUR_TELEGRAM_CHAT_IDin the notification nodes (message your bot, then checkapi.telegram.org/bot<token>/getUpdatesfor your chat id). - Connect your social accounts in your self-hosted Postiz instance — the posting step uses them directly; no extra social credentials in n8n.
Note: the machine remembers which videos it already processed in n8n workflow static data, which only persists for production executions — test runs in the editor won't advance it. Scheduling deliberately does not use that mechanism (see act 3).
Webhook payload
{
"event": "job.completed",
"job_id": "…",
"status": "completed",
"clips": [
{ "index": 0, "title": "…", "video_url": "…", "download_url": "…" }
]
}
Failed jobs fire the same webhook with "event": "job.failed" and an error
field, so the flow never hangs waiting.
download_url is a 24-hour presigned link to the archived clip.
Publishing and analytics API
Direct posting: POST /api/postiz/post (accepts scheduled_date, ISO-8601).
Connected channels: GET /api/postiz/integrations.
Publishing queue: GET /api/postiz/scheduled, and
DELETE /api/postiz/scheduled/{id} to cancel one before it goes out.
Analytics of what you published: GET /api/postiz/analytics (channel totals)
and GET /api/postiz/analytics/posts (per-post metrics).
Full API reference: /docs (OpenAPI) on your instance.