Claude Templates / A-tier · High leverage
Outreach
The Publishing Pipeline Playbook
Scheduled posts, a scheduler tick, provider guards, and per-platform normalization.
PUBLISHING-PIPELINE-PLAYBOOK.md · 17 sections · 3,170 words · 25 KB · markdown
For any app that pushes content to external APIs on a schedule. A scheduled_posts queue, a tick worker that can't double-send, per-platform payload normalization, character and media gates, and failure handling that surfaces in the UI instead of dying silently.
What's inside
- //The scheduled_posts schema with a claim-and-lock dispatch
- //A scheduler-tick worker safe against overlapping runs
- //Provider call guards + per-platform payload normalization
- //Character limits and media-format gates enforced before send
- //Media persistence — never store an expiring provider URL
- //A reconciler for posts whose provider callback never arrived
When to use it
Any app that publishes to third-party APIs.
Build these first
Straight from the file
The browser may dispatch but never await. Manual "Post Now" inserts a scheduled_posts row with publish_at = now() and lets the same worker pick it up — the manual path and scheduled path share one publish surface so they cannot drift apart.
Table of contents
- 0. Use this spec
- 1. Architecture
- 2. The Universal-Worker rule
- 3. Schema
- 4. Cross-instance advisory lock (provider-call-guard)
- 5. Platform-name normalization (wire-platform.ts)
- 6. Per-platform text truncation (platform-limits.ts)
- 7. Reconciler with terminal-history gate
- 8. Stage-failure vs post-call ambiguity (the retry-revert)
- 9. Pre-flight media check
- 10. Media URL handling — never store provider URLs
- 11. Per-gc staging cache (dedupe.ts)
- 12. Generic webhook publisher (HMAC + SSRF)
- 13. Status aggregation (sync-generated-content-status)
- 14. Common pitfalls
- 15. Test plan (smoke)
- 16. Kickoff prompt
How to run it
Drop PUBLISHING-PIPELINE-PLAYBOOK.md into your repo, then tell Claude Code: “Read PUBLISHING-PIPELINE-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.
More outreach playbooks
SMS Copilot Console
Cold-SMS auto-reply: an LLM brain that drafts, and code that decides.
Read + download →A-tierCold Email Campaign
The operational side — folder structure, daily metrics, A/B/C subjects, leak diagnosis.
Read + download →B-tierGoHighLevel Integration
OAuth, contacts, conversations, opportunities — the GHL API gotchas up front.
Read + download →