meta.content.publish-with-approval
Draft Meta organic content and open a staff inbox review envelope. Does not publish — after approve, call meta.content.publish with the approval_envelope_uuid (SOCIAL-004 hard gate).
Overview
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-meta |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
connection_uuid | string | Yes | — | — |
actor_uuid | string | Yes | — | — |
channel | string | Yes | — | — |
caption | string | No | — | — |
message | string | No | — | — |
page_id | string | No | — | — |
instagram_business_account_id | string | No | — | — |
media_id | string | No | — | — |
image_url | string | No | — | — |
storage_object_uuid | string | No | — | — |
storage_object_uuids | json | No | — | — |
kind | string | No | — | image |
items | json | No | — | — |
video_url | string | No | — | — |
file_url | string | No | — | — |
description | string | No | — | — |
link | string | No | — | — |
title | string | No | — | — |
review_title | string | No | — | — |
review_reason | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
connection_uuid | string | Yes | — | — |
actor_uuid | string | Yes | — | — |
channel | string | Yes | — | — |
caption | string | No | — | — |
message | string | No | — | — |
page_id | string | No | — | — |
instagram_business_account_id | string | No | — | — |
media_id | string | No | — | — |
image_url | string | No | — | — |
storage_object_uuid | string | No | — | — |
storage_object_uuids | json | No | — | — |
kind | string | No | — | image |
items | json | No | — | — |
video_url | string | No | — | — |
file_url | string | No | — | — |
description | string | No | — | — |
link | string | No | — | — |
title | string | No | — | — |
review_title | string | No | — | — |
review_reason | string | No | — | — |
failure_reason | string | No | — | Engine-stamped human-readable failure reason |
failed_at | string | No | — | ISO timestamp when the workflow failed |
failed_at_state | string | No | — | Engine-stamped state when the workflow failed |
failed_step | string | No | — | Engine-stamped step name (DAG path) |
failed_layer | integer | No | — | Engine-stamped layer index (DAG path) |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
draft_id | string | No | — | — |
approval_envelope_uuid | string | No | — | — |
status | string | No | — | — |
draft | json | No | — | — |
request_review | json | No | — | — |
completed_at | string | No | — | — |
DAG Layers
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | draft | meta.content.draft | meta.compensation.noop |
| 2 | request_review | meta.content.request-review | meta.compensation.noop |
Execution Flow
Compensation
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows
| Sub-workflow | Step name |
|---|---|
meta.content.draft | draft |
meta.content.request-review | request_review |
meta.compensation.noop | abandon_draft |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
review_requested | SUCCESS | Draft stamped and inbox review envelope opened | draft_id, approval_envelope_uuid |
failed | FAILURE | Meta publish-with-approval DAG failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "meta.content.publish-with-approval",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"actor_uuid": "value",
"channel": "value"
}
}