Set up webhooks and workflow
Set up the two outbound connections CM Box makes to your systems: webhooks
that POST to a URL when content changes, and a workflow connection that
drives package approvals through an external workflow engine. This page
covers the admin UI setup; for delivery payloads, event semantics, and the
engine handshake protocol, see
Webhooks and workflow integration.
Before you start: webhook administration requires the admin.webhooks.*
permissions and workflow administration the admin.workflows.* permissions
(see Security). Have the receiving URL ready.
Create a webhook
Section titled “Create a webhook”- In the admin area, open Webhooks.
- Click Add Webhook. In the Add New Webhook dialog, enter a
Name (required), the URL to
POSTto, pick the Repository the webhook listens to, and optionally a description. Click Add. - The new webhook appears as a card in the list — filter by repository or search by name to find it. New webhooks are created disabled, so nothing fires until you finish configuring it.
- Click the card to open the editor and configure:
- URL — the delivery endpoint. The Repository field is read-only after creation.
- Subscribed Events — click Add Event and pick one or more of:
ITEM_CREATED,ITEM_UPDATED,ITEM_DELETED,ITEM_PUBLISHED,ITEM_ARCHIVED,ITEM_UNARCHIVED,ITEM_CATEGORIZED,ITEM_DECATEGORIZED,FOLDER_CREATED,FOLDER_UPDATED,FOLDER_DELETED,SITE_PUBLISHED,PACKAGE_MERGED. - Types Filter — click Add Type to limit the webhook to specific content types; leave it empty to match all types.
- Payload Size — Full, Basic, None, or Custom. See payload sizes for what each body contains.
- Custom Payload Template — shown only for Custom: a JSON
template for the entire request body, with
{{event}},{{data.*}}, and{{webhook.*}}placeholders and a Format JSON button. The template is required and must be valid JSON. - Request Headers — click + Add Header to send extra headers. Check Static Value to send the value as-is; leave it unchecked to resolve the value as a dot-notation path against the item data.
- Payload Mapping — shown for non-Custom sizes: + Add Payload Mapping copies values from the item data to extra top-level keys in the body, with the same Static Value choice.
- Include Extracted Text in Payload — check to keep the item’s extracted full text in deliveries (it is stripped by default).
- Switch Enabled on and click Save.
Verify a webhook
Section titled “Verify a webhook”Perform a matching action in the repository (for example, update an item of
a subscribed type) and confirm your endpoint receives the POST. Deliveries
run on the background queue, so also check the Webhooks queue on the
queue dashboard for failed jobs — see Queues. Each
delivery is attempted once; CM Box does not retry failures.
Connect a workflow engine
Section titled “Connect a workflow engine”A workflow connection points CM Box at your engine; each connection holds one or more workflow definitions that name a flow the engine can run. The handshake the engine must implement is documented in Webhooks and workflow integration.
- In the admin area, open Workflows.
- Click Add Connection. In the Add New Workflow Connection dialog,
enter:
- Name — a label for the engine.
- Base URL — the engine’s API root, for example
https://workflow-engine.example.com/api. - Callback Base URL — the CM Box URL the engine calls back to, for
example
https://cmbox.example.com. - Auth Type — how CM Box authenticates to the engine: None, Bearer Token, Basic Auth, or API Key.
- Click Add, then open the new connection card to finish. The fields
the editor shows depend on the auth type: a Bearer Token, a
Username and Password, or an API Key plus a Header Name
(defaults to
X-API-Key). - Under Workflow Definitions, click + Add Definition and enter a
Name, an optional Description, the Process Definition Key
your engine uses for this flow (for example
content-approval-v1), and the Initial Trigger URL — the engine path, relative to the base URL, that CM Box posts to when starting the flow (for example/webhook/start). - Click Save.
Enable workflow on a repository
Section titled “Enable workflow on a repository”Workflow runs on update packages, so the repository must have the Packaged Updates feature enabled before its workflow settings appear.
- Open the repository’s settings (see Repositories) and expand Workflow Settings.
- Switch Enable Workflow on.
- Choose a Default Workflow and select the Available Workflows authors may pick from — both lists offer the definitions you created above.
- Optionally switch on Auto-merge packages when workflow completes, and then Auto-publish items (and site, if present) after auto-merge if approved content should go live without a manual step.
- Optionally define Auto-Package Rules to route matching content into
packages (and workflow approval) automatically: each rule names the
content types and categories it matches, a package strategy (rolling or
individual), an optional workflow override, whether it triggers on
Create or Update, and whether it is Strict — blocking direct
saves to the main repository. Users holding the
content.skip_workflowpermission can bypass strict rules. - Click Save Config.
Verify the connection
Section titled “Verify the connection”Start a workflow on a test package in that repository. CM Box posts the start call to the engine at the definition’s trigger URL; the package’s workflow state then shows the engine’s steps and status. If the start fails, re-check the Base URL, the auth settings, and that the engine can reach the Callback Base URL.
Troubleshooting
Section titled “Troubleshooting”- Webhook never fires — confirm the Enabled toggle is on (new webhooks start disabled), the event is in Subscribed Events, and the Types Filter is empty or includes the item’s type. The webhook only listens to the repository chosen at creation.
- Custom payload arrives as the full payload — the custom template is missing or invalid JSON; delivery falls back to the full body. Use Format JSON in the editor to validate the template.