Skip to content

Publishing Workflow

The publishing workflow handles distributing content from EspoCRM to multiple platforms via the Bridge API and X Server.

Overview

Step-by-Step Flow

1. Create ContentProduction

2. Create PlatformPublish Records

For each target platform, create a PlatformPublish record:

Important: Set dependsOnPlatform for platforms that need RTMP from another:

PlatformDepends OnReason
BoxcastRumbleUses Rumble's RTMP
RestreamRumbleSimulcasts Rumble stream
BrighteonCreates own stream
YouTubeCreates own stream

3. Queue the Primary Platform

4. Cascade to Dependent Platforms

5. Verify All Published

Platform Route Configuration

The Bridge determines which X Server endpoint to call:

javascript
const PLATFORM_ROUTES = {
  'Rumble': { 
    livestream: '/rumble-create', 
    upload: '/rumble-episode' 
  },
  'YouTube': { 
    livestream: '/youtube-create', 
    upload: null 
  },
  'Boxcast': { 
    livestream: '/boxcast-livestream', 
    upload: '/boxcast-media-upload' 
  },
  'Brighteon': { 
    livestream: '/brighteon-create', 
    upload: '/brighteon-upload' 
  },
  'Odysee': { 
    livestream: '/odysee-create', 
    upload: '/odysee-upload' 
  },
  'Banned.Video': { 
    livestream: null, 
    upload: '/banned-create' 
  },
  'Bitchute': { 
    livestream: null, 
    upload: '/bitchute-create' 
  },
  'Transistor': { 
    livestream: null, 
    upload: '/transistor-upload' 
  },
  'Substack': { 
    livestream: null, 
    upload: '/substack-create' 
  },
  'Restream': { 
    livestream: '/restream-create', 
    upload: null 
  },
  'Facebook': { 
    livestream: '/facebook-create', 
    upload: null 
  }
};

Error Handling

Checking Failed Publishes

When a publish fails, check the apiResponse field:

json
{
  "status": "Failed",
  "apiResponse": "{\"error\":\"Authentication failed\",\"code\":401}"
}

Retrying

Simply update the status back to "Queued":

http
PUT /api/v1/PlatformPublish/{id}
Content-Type: application/json

{
  "status": "Queued"
}

n8n Workflow Triggers

The Bridge triggers n8n webhooks at key points:

WebhookTriggered When
content-createdNew ContentProduction
content-scheduledStage → Scheduled
content-recordingStage → Recording
content-publishStage → Publishing
content-publishedStage → Published
platform-liveLivestream is live

Typical Livestream Setup

Best Practices

Primary Platform First

Always queue your primary platform (usually Rumble) first to get RTMP credentials for dependents.

Use Dependencies

Set dependsOnPlatform correctly to automate the cascade without manual intervention.

Don't Queue Dependents

Let the cascade system auto-queue dependent platforms. Manually queuing may cause issues.

Monitor Status

Watch the status field and apiResponse for any platforms stuck or failed.

MediaMagic CRM Documentation