Skip to Content
Content ToolkitContent Repurposing Pipeline

Content Repurposing Pipeline

[To Build] · agent__content-repurposer · Claude Sonnet 4.6

Automatically transforms an approved blog post into platform-ready variants: social media posts (per platform), an email newsletter draft, and ads copy. Each format is produced as a separate child activity that flows through the standard review and approval workflow.

Related: Blog Writer · Social Post Writer · Email Writer · Content Repurposer Agent · Social Publishing · Credits · Content Toolkit Overview


Overview

FunctionTransform an approved blog post into social, email, and ads content variants
TypeWorker — Content
StatusTo Build
PriorityP1 — Table-Stakes
Queueagent__content-repurposer
Concurrency4
Timeout6 min
Est. cost / task~$0.40 per format
Credits0.5 cr per repurposed format
PlanPro+

Why This Is Needed

Every content type in Leadmetrics is currently created from scratch — blog posts, social posts, and emails are independent agent runs that start from a brief, not from each other. This misses the natural leverage point: a published blog post already contains all the information, angles, and key claims that social posts and emails need. Repurposing multiplies output per credit spent and keeps messaging consistent across channels.


What Gets Repurposed

SourceTarget FormatAgent InvolvedOutput
Published blog postSocial post — LinkedIncontent-repurposerProfessional long-form post, key takeaways format
Published blog postSocial post — Instagramcontent-repurposerShort punchy text + image brief for designer
Published blog postSocial post — Facebookcontent-repurposerMid-length conversational post
Published blog postSocial post — Xcontent-repurposerThread (3–5 tweets)
Published blog postEmail newslettercontent-repurposerFull newsletter: subject line, preview text, body sections, CTA
Published blog postGoogle Ads copycontent-repurposer3 headline + description RSA variants
Published blog postMeta Ads copycontent-repurposer2 ad set variants with hook, body, CTA

The tenant selects which formats to repurpose into when triggering the pipeline. All selected formats run as parallel jobs.


How It Differs From Writing From Scratch

The content-repurposer agent is not a general writer. It receives the full published blog post as source material and is instructed to:

  1. Extract the core argument, key claims, and CTA from the post
  2. Select the 3–5 most shareable insights
  3. Reformat for the target channel’s tone, length, and engagement style
  4. Do not introduce new claims, statistics, or arguments not present in the source post

This keeps messaging consistent across channels and ensures the social post or email reflects the exact content that was reviewed and approved.


Trigger Conditions

Automatic Trigger (primary)

When a BlogPost transitions to published status:

BlogPost.status → "published" Activity Planner checks tenant's repurposing configuration: - Which formats are enabled for auto-repurpose? - Does the tenant have enough credits? Creates one child Activity per enabled format - activityType: 'social_post' | 'email' | 'google_ad' | 'meta_ad' - parentActivityId: blog post activity ID - repurposeSourceId: BlogPost.id Enqueues agent__content-repurposer job per format

Manual Trigger (on-demand)

“Repurpose” button on the blog detail page → format selector modal → triggers the same child Activity creation flow for selected formats only.


Input Contract

interface ContentRepurposerInput { tenantId: string; blogPostId: string; // Source content sourcePost: { title: string; metaDescription: string; bodyMarkdown: string; primaryKeyword: string; publishedUrl?: string; }; // Target format for this job targetFormat: RepurposeFormat; // Per-format configuration platform?: 'linkedin' | 'instagram' | 'facebook' | 'x'; // required when targetFormat is 'social_post' emailAudienceId?: string; // Mailchimp audience ID, if connected campaignId?: string; } type RepurposeFormat = | 'social_post' | 'email_newsletter' | 'google_ads' | 'meta_ads';

Output Contract

interface ContentRepurposerOutput { tenantId: string; blogPostId: string; // source targetFormat: RepurposeFormat; platform?: string; // Populated based on targetFormat: socialPost?: { captionText: string; hashtags: string[]; imageBrief?: string; // description for social-post-designer if image is needed }; emailNewsletter?: { subjectLine: string; previewText: string; bodyMarkdown: string; // sections mapped from blog H2s ctaText: string; ctaUrl: string; }; googleAds?: { headlines: string[]; // max 30 chars each, 3–5 variants descriptions: string[]; // max 90 chars each, 2–3 variants finalUrl: string; }; metaAds?: { variants: { hook: string; // first sentence / pattern interrupt body: string; // 2–4 sentences cta: string; // call to action label }[]; }; }

Child Activity States

Each repurposed format becomes a standard Activity that follows the normal review workflow:

generated → dm_review → dm_approved → client_review → client_approved → [published]

For social posts, client_approved triggers the Social Publishing scheduled delivery. For emails, client_approved triggers the Mailchimp push if a Mailchimp channel is connected.


Dashboard UI

Blog Detail Page:

  • “Repurpose” button in the blog post action bar (visible when post is published)
  • Clicking opens a format selector modal:
    • Checkboxes for each format (Social: LinkedIn, Instagram, Facebook, X; Email Newsletter; Google Ads; Meta Ads)
    • Pre-selects formats that are auto-configured in tenant repurposing settings
    • Shows credit cost preview: “3 formats selected = 1.5 cr”
    • “Start Repurposing” button

Repurposed Content Panel (blog detail page):

  • Shows all child activities linked to this blog post
  • Status badges per format (Generating → Review → Approved → Published)
  • Click-through to the individual social/email/ads activity

Tenant Settings — Repurposing Configuration:

  • Toggle per format: enable/disable auto-repurpose on blog publish
  • Default platforms to repurpose into
  • Require human approval before publishing repurposed content (default: on)

Key Design Decisions

DecisionChoiceRationale
One job per formatSeparate BullMQ job per target formatAllows parallel generation; individual format failures do not block others
Source-constrained promptAgent instructed not to introduce new claimsRepurposed content must stay faithful to the approved blog; prevents drift
Same HITL workflowRepurposed activities go through dm_review → client_reviewRepurposed content may be lower-stakes but DM review catches tone/format issues before client sees them
Credits per format0.5 cr per format (not 0 or bundled with blog)Repurposing is a real inference call with real cost; bundling would erode the blog credit value
Platform orderingLinkedIn first → Instagram → Facebook → XLongest to shortest format; the agent naturally narrows its focus in this order

Implementation Phases

Phase 1 — Core Worker + Social Posts

  1. Create docs/agents/content-repurposer.md (agent doc)
  2. Add content-repurposer to AgentRole type union in packages/queue/src/types.ts
  3. Add ContentRepurposerInput / ContentRepurposerOutput types
  4. Create packages/agents/src/workers/content-repurposer.worker.ts
  5. Seed system prompt for content-repurposer in packages/db/src/seed.ts
  6. Add parentActivityId + repurposeSourceId fields to Activity model (migration)
  7. Hook published status transition in apps/api/src/routers/blog.ts to check auto-repurpose config and enqueue jobs
  8. “Repurpose” button + format selector modal in blog detail page

Phase 2 — Email + Ads Formats

  1. Extend ContentRepurposerInput.targetFormat to include email_newsletter, google_ads, meta_ads
  2. Add email newsletter + ads variants to the content-repurposer agent system prompt
  3. Wire email output to create an EmailActivity record (same model as email-writer output)
  4. Wire ads output to create GoogleAdActivity / MetaAdActivity records

Phase 3 — Settings + Auto-Config

  1. Tenant settings page: repurposing configuration (auto-formats, approval toggle)
  2. Store per-tenant repurpose config in TenantSettings JSON field
  3. Activity Planner: read repurpose config before auto-enqueuing on blog publish

© 2026 Leadmetrics — Internal use only