Emelyn

Navigation

Share the article after it is truly published.

Turn one public WordPress post into distinct social drafts with the title, excerpt, link, categories, and proof intact—without firing on revisions or private content.

WordPress publish bridge showing a first-publish transition, revision and private-post filters, distinct social drafts, Application Password, HTTPS, retry, and duplicate handling

React to the first public publish—not every save.

WordPress fires status hooks when a post is saved, even when the status did not truly change. The gate checks old and new status, post type, visibility, and password before Emelyn fetches anything.

add_action(
  'transition_post_status',
  function ($new_status, $old_status, $post) {
    if ($old_status === 'publish' || $new_status !== 'publish') return;
    if ($post->post_type !== 'post') return;
    if (!empty($post->post_password)) return;

    wp_remote_post(EMELYN_WEBHOOK_URL, [
      'headers' => [
        'Content-Type' => 'application/json',
        'X-Emelyn-Signature' => sign_post_id($post->ID),
      ],
      'body' => wp_json_encode(['post_id' => $post->ID]),
    ]);
  },
  10,
  3
);

Webhook recipe revision 1.0 · WordPress 6.9 REST schema · Last tested 29 August 2026.

draft → publish

Accept once and fetch the public post by ID.

publish → publish

Treat as an edit. Do not create a new campaign automatically.

revision or autosave

Ignore. These are editing artifacts, not public moments.

private or password protected

Reject before content leaves WordPress.

A separate account is easier to trust and easier to revoke.

Create a WordPress user for the integration, give it only the role needed to read eligible posts and media, then generate an Application Password. Use HTTPS for every REST request.

Application Passwords are per-application credentials. They can be revoked without changing the person’s main login password.

  1. 01

    Create the connection user

    Do not reuse an administrator account. Confirm it can read the exact post types you selected.

  2. 02

    Generate an Application Password

    Copy it once into Emelyn’s encrypted credential store. Never put it in the webhook body or URL.

  3. 03

    Install the small publish hook

    Set the Emelyn webhook endpoint and signature secret outside the public theme repository.

  4. 04

    Publish a test article

    Confirm the post ID, REST fetch, field map, visibility gate, distinct channel drafts, and review queue.

Fetch the article from WordPress instead of trusting a fat webhook.

The webhook carries a signed post ID. Emelyn then reads the current public REST representation, maps the source, strips unsafe markup, and creates channel-native drafts in review.

REST response

GET /wp-json/wp/v2/posts/87234?context=view

{
  "id": 87234,
  "date_gmt": "2026-08-29T09:30:00",
  "link": "https://example.com/the-small-release",
  "status": "publish",
  "title": { "rendered": "The small release" },
  "excerpt": { "rendered": "What changed and why." },
  "content": { "rendered": "<p>Full article…</p>" },
  "featured_media": 441,
  "categories": [12],
  "tags": [28, 31]
}
WordPressEmelynPurpose
idwordpress.post_idDuplicate and retry key
linksource_urlOriginal article destination
title.renderedsource_titleAngle context
excerpt.renderedsource_summaryShort source explanation
content.renderedsource_textClaims and examples to preserve
featured_mediasource_media_idResolve separately; do not guess
categories and tagssource_topicsOptional filters and context

The WordPress post ID stays the same even when delivery does not.

Every attempt records the post ID, HTTP result, and next step. A retry updates the same intake record; it does not manufacture a second social campaign.

2XX accepted

The signed post ID is queued. WordPress can finish the publish request.

Timeout or 5XX

Retry with backoff up to four times using the same post ID.

401 or 403

Stop. Rotate the Application Password or correct the user role.

404 after publish

Hold for review. A plugin, cache, or custom post type may hide the REST route.

Limits: custom post types must expose REST fields; page-builder content may need a source adapter; protected or private content stays out; media resolution is bounded; and a published article can still require a person to choose the right promotional angle.

The page answers the questions WordPress owners actually ask.

People want reliable first-publish sharing, control over title, summary, link, tags, and channel variations, and a price-safe alternative to stacking plugins. The implementation uses core status hooks, REST fields, and revocable Application Passwords.

Your article is the source. It should not be the caption.

Connect WordPress