Echo/Docs

CLI command

content repurpose

A published blog post rewritten as a thread, carousel or short video script queued as drafts for a social account, or as a newsletter drafted to a CRM list, each naming the post.

Invocation#

Shell
echo-cli content repurpose run --post <post-id> --account <social-account-id> --formats <thread,carousel,short_script,newsletter> [--list <crm-list-id>] --by <who>
echo-cli content repurpose jobs --post <post-id>

Inputs and output#

run writes the job it stored: id, post_id, social_account_id, formats, route, drafts (per format: format, channel — content_posts for a social format, newsletters for the newsletter — draft_id, text and error — set when the route wrote nothing or the draft could not be stored), requested_by and requested_at. jobs writes { jobs, formats }: the post's jobs, newest first, and every format Echo drafts with what its draft is.

State effect#

Both verbs call Echo Web's authenticated /api/analytics/repurpose with ECHO_INTERNAL_BEARER at ECHO_WEB_BASE_URL; the Repurpose a post section of the blog admin and of Echo Desktop's GEO screen do the same, and echo-mcp runs them as echo_repurpose and echo_repurpose_jobs. run has the route ECHO_REPURPOSE_ROUTE declares rewrite the post through Brama once per format, from its title, description and body only. A social rewrite is queued in content_posts for the account as a draft with content_type the format and metadata naming the post (source blog_post, post_id, its address, format and repurpose_job_id); nothing is posted until the operator schedules it. A newsletter rewrite is stored as a draft newsletter to the --list CRM list, the rewrite's first line its subject and the rest its body, its posts the repurposed post and its period the post's publication — the email campaign the newsletter sender sends once approved, never the social queue. Jobs are kept in repurpose_jobs.

Refusals#

  • A wrong invocation is refused before anything is sent: "content repurpose takes run --post <post-id> --account <social-account-id> --formats <format,...> [--list <crm-list-id>] --by <who>; jobs --post <post-id>; got <word>", "content repurpose <verb> does not take <flag>; it takes …", "<flag> needs a value" and "content repurpose <verb> needs <flag>".
  • Echo Web answers a bad request with "post_id is required: the published blog post to repurpose", "social_account_id is required: the social account the drafts are for", "formats is required: the formats to draft, from thread, carousel, short_script, newsletter", "<formats> is not a format Echo drafts; the formats are thread, carousel, short_script, newsletter", "list_id is required: the CRM list the newsletter draft is addressed to" when newsletter is asked for without --list, "post <id> is <status>, not published; only a published post is repurposed, so its drafts can link to it" or "requested_by is required: an internal caller has no signed-in user, so it names who is acting"; not found with "no blog post has id <id>", "no social account has id <id>" or "the surface <slug> does not exist, so post <id> has no address to link to"; and fails with "ECHO_REPURPOSE_ROUTE is required" when the route is not declared. A format the route could not write is not refused: its draft answers "the route <route> wrote no <format>: <cause>", and a newsletter rewrite with no subject line and body, or one the newsletters table would not take, answers why in its draft. The command prints Echo Web's sentence and exits 1.
  • A rewrite holding one of the banned phrases of the product the post's surface answers to (echo-cli glossary) is not drafted: its entry in drafts keeps the text with error "the <format> was not drafted: \"<phrase>\" in <format> at line <n>, column <n>[; write \"<use instead>\" instead]", every occurrence named, while the other formats are drafted as usual; a surface naming no product leaves each format undrafted with "blog surface <slug> names no product, so no glossary says what its posts may not say; …".