Skip to Content
Activity Typessocial_post — Social Media Post

social_post — Social Media Post

FieldValue
Type keysocial_post
LabelSocial Media Post
Agent queuesocial-post-writer
Plan tierFree+ (starter, growth, professional)
Credits/unit1
Monthly range8–30

What it produces

Per-platform social media post copy (caption, hashtags, call-to-action) plus a designed image slide produced by the social-post-designer sub-agent. The output is a SocialPost record.


Pipeline sequence

social_calendar (prerequisite) ──→ social-post-writer ──→ SocialPost: dm_review [Gate 1: DM Portal — copy review] dm-approve ─────────┼────── dm-reject → re-queued SocialPost: dm_approved social-post-designer enqueued SocialPost: design_pending [designer runs — GPT Image 1.5 / Azure] SocialPost: client_review [Gate 2: Dashboard — full post review] client-approve ──────┼───── client-reject → re-queued SocialPost: client_approved [auto-ingest → scheduled] SocialPost: scheduled

Status machine

StatusSet byNext
dm_reviewsocial-post-writer on completiondm_approved or → rejected
dm_approvedDM approves copy (POST /dm/v1/social/:id/dm-approve)Designer enqueued → design_pending
design_pendingDesigner worker startsclient_review on success
client_reviewDesigner completes slidesclient_approved or → rejected
client_approvedClient approves (POST /client/v1/social/:id/approve)scheduled (auto)
rejectedDM rejects or client rejectsRe-queues appropriate worker with note
scheduledAuto-ingest on client_approvedTerminal

Fields: dmRejectionNote, dmApprovedBy, dmApprovedAt, clientRejectionNote, clientApprovedBy, clientApprovedAt, scheduledAt, version.


HITL gates

GateLocationWhoAction
Gate 1 — CopyDM Portal → ApprovalsReviewerApprove copy (triggers designer) or Reject with note (re-queue writer)
Gate 2 — Full postDashboard → DeliverablesClientApprove (→ client_approved, auto-schedule) or Reject (re-queue)

Known issue: If OPENAI_API_KEY (Azure) is not configured, the designer job fails silently and the post stays stuck at design_pending.


Deliverable status progression

Deliverable statusTrigger
generatingWriter picks up the activity
in_reviewSocialPost created with dm_review
generatingDM approves → designer enqueued
needs_approvalDesigner completes → client_review
approvedClient approves → client_approved
publishedAuto-schedule completes

Dependencies

  • Requires: social_calendar — planner always schedules 1 calendar per month when social posts are planned. The calendar’s slot data is injected into the writer’s input payload (date, platform, topic angle, format).
  • Activity.dependsOn is set so the social-post-writer does not start until the linked social_calendar activity is done.

DB records created

RecordCreated byNotes
DeliverableTemplatedeliverable-plannerMonthly quota (e.g., “12 social posts”)
Activityactivity-plannerOne per post; type = social_post
Deliverablesocial-post-writer workerClient-facing status record
SocialPostsocial-post-writer workerCopy + designed slides + status machine

Channel requirement

Social posts do not require connected channels at scheduling time. Content is drafted and designed first; channels are only needed when the post is published to the platform. The planner always includes social posts regardless of whether the tenant has connected any social accounts.


Auto-ingest

On client_approved, the post moves to scheduled and a PublishedContent record is created. Actual publishing to the social platform occurs when the tenant’s channel credentials are present and the scheduled time arrives.


Platform distribution

Social posts are platform-specific. The platform flows through three stages:

  1. Deliverable Planner (strategy.worker.ts) sets DeliverableTemplate.platforms — an array of all target social platforms (e.g. ["instagram", "linkedin", "facebook"]). Valid slugs: instagram, linkedin, facebook, x, tiktok, google_business_profile. The planner should always include all platforms the strategy targets, not just one.

  2. Activity Planner (activity.worker.ts rule #11) distributes monthlyVolume evenly across platforms and creates one activity per platform per slot, setting inputHints.platform. Example: volume 12 with platforms instagram, linkedin, facebook → 4 activities each = 12 total.

  3. Social Post Writer reads activity.inputPayload.platform and stores it on the SocialPost record. Default fallback is "instagram" if the field is missing.

If all posts appear as a single platform in the DM approvals queue, check DeliverableTemplate.platforms — the deliverable plan likely has only one platform listed. Fix by refreshing the deliverable plan or updating the array directly in the DB.


Key rules

  • The planner must include exactly 1 social_calendar per month when social posts are planned.
  • On copy rejection, the writer is re-queued with the DM’s note.
  • On client rejection, the re-queue target depends on where the fault was identified (copy vs. design).
  • version increments on each re-run after rejection.

© 2026 Leadmetrics — Internal use only