---
title: How to trigger workflow agents with Content Marketing Platform webhooks
slug: agent-platform/docs/how-to-trigger-workflow-agents-with-content-marketing-platform-webhooks
docTags: 
createdAt: 2026-08-12T15:37:06.000Z
---

Webhooks let [Optimizely Content Marketing Platform (CMP)](https://www.optimizely.com/products/content-marketing/) notify [Optimizely Agent Platform](https://www.optimizely.com/ai/) automatically when something changes in CMP, such as [task](docId\:W7zf5eJAPZhHgHjzWK_m2), [campaign](docId:8UYnEjnQ6qE-7LSSLMZtT), [asset](docId\:B91HhZUvrUnZUlPzNrTfh), or [work request](docId\:HJW-2rjcgHjgyAtt3WM5n). For example, CMP can send a webhook when a task starts, when a task moves to a new workflow step, or when a work request is created.

This guide walks through connecting a CMP webhook to an Agent Platform workflow agent. The example uses the `external_sub_step_started` event, but you can apply the same pattern to any [CMP webhook event](docId\:W0i3KGEit8_rj22tDS7co).

The following steps describe the end-to-end flow:

1. A user advances a CMP task to an external workflow step.
2. CMP sends a webhook to Agent Platform with the task context.
3. The Agent Platform workflow agent receives the webhook and routes it to the correct specialized agent.
4. That agent performs the work. For example, updating the task brief.
5. Another agent completes the CMP workflow step, advancing the task automatically.

The following diagram shows the end-to-end flow from a CMP task advancing to an external step through Agent Platform completing the automation.

![Diagram of the end-to-end flow from a CMP task advancing to an external step through Opal routing, brief updating, and step completion"](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/pLBC5z27dacB_w4CMEz8K-20260720-145024.png)

Use this pattern as the foundation for AI-powered content automation with Agent Platform. Apply it to content generation, compliance checks, and approval workflows.

## Prerequisites

Ensure you have the following before starting:

- [Agent Platform administrator or Agent Builder role](docId\:kwj5GClJJTxjDSdDQSd-o) in Agent Platform.
- [Administrator access](docId\:DRP19GsHfHR6-3o0SCAwi) in CMP to create [webhooks](docId\:kRmBdOtag7105U_C_70QA) and [CMP workflows](docId\:z4qRq7wJIEQt3sS3PK_jn).
- Access to the CMP instance you want to connect.
- Agent Platform connected to your CMP instance (with [Agent Platform connections](docId\:pe0pbUJveWrG8ewvZWDRE)).

## Architecture

### How external steps work

[CMP workflows](docId\:z4qRq7wJIEQt3sS3PK_jn) move [tasks](docId\:W7zf5eJAPZhHgHjzWK_m2) through internal steps handled by team members. External steps defer processing to systems outside CMP, in this case, an Agent Platform workflow agent.

When a task reaches an external step, the following occurs:

1. CMP fires a webhook with the event `external_sub_step_started`.
2. The webhook payload includes the `task_id`, `step_id`, `sub_step_id`, and the external system name.
3. The Agent Platform workflow agent receives this payload and uses the external system name to route to the correct processing logic.
4. When processing is complete, Agent Platform calls back to CMP to mark the step as done.

### Key components

| Component                  | Platform       | Purpose                                          |
| -------------------------- | -------------- | ------------------------------------------------ |
| Webhook                    | CMP            | Sends notification when external step starts.    |
| External system            | CMP            | Labels and identifies the type of external work. |
| Workflow agent             | Agent Platform | Orchestrates the multi-step automation.          |
| External step router agent | Agent Platform | Routes webhook to correct processing branch.     |
| Specialized agents         | Agent Platform | Perform the actual work and complete the step.   |

## Create the Agent Platform webhook trigger

Before configuring CMP, create the Agent Platform workflow agent and webhook trigger to generate the webhook URL you need for the CMP configuration.

### Create a workflow agent

Follow these steps in Agent Platform:

1. Go to **Agents > Your Agents**.
2. Click **Add Agent > Workflow Agent**.

   ![Screenshot of the Opal Agents page showing the Add Agent menu expanded with Workflow Agent highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/2v3gGWQSGxRM7o72fXBTH-20260720-145024.png)
3. Enter *CMP External Step Handler* for the **Name**.
4. Enter *cmp\_external\_handler* for the **Id**.
5. Enter *Handles CMP external workflow steps by routing to appropriate agents and completing steps.* for the **Description**.
6. Click **Apply**.

   ![Screenshot of the Opal workflow agent configuration panel with Name, Id, and Description fields completed](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/TdgkFTnfm8xD_IAD6ps89-20260720-145024.png)
7. Click **Save**.

### Add the webhook trigger

Follow these steps in Agent Platform:

1. Drag and drop a **Webhook** trigger into the editor.

   ![Screenshot of the Opal workflow editor showing a Webhook trigger block added to the canvas](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/hq7UsTzoD6MKwo_NTAC5u-20260720-145024.png)
2. Enter *CMP External Step Webhook* for the **Name**.
3. Enter *Receives webhooks when CMP external step starts.* for the **Description**.
4. Select the CMP product instance you connected in the prerequisites from the **Product Instance** drop-down list.
5. Keep **application/json** selected for the **Payload Content Type** drop-down list.
6. Enter a secure secret for the **Auth Key**. Enter this same value as the **Secret** when creating the CMP webhook in the next section.
7. Select **Custom** for the **Auth Header Name** drop-down list.
8. Enter *Callback-Secret* in the **Enter custom header name** field.
9. Enter  for the **Auth Header Format**.
10. Click **Save**.

    ![Screenshot of the Opal Webhook trigger configuration panel with all fields completed, including Auth Key, Auth Header Name set to Custom, and Auth Header Format set to token](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/yYYVnJxFGO_lE2O6BXNoG-20260720-145024.png)

Click **Copy to clipboard** for the generated **Webhook URL**.

![Screenshot of the Opal webhook URL field with the Copy to clipboard button](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/c4xkjblrpyaPqwZf348Ul-20260720-145024.png)

The URL displays in the following format: [`https://webhook.opal.optimizely.com/webhooks/UUID/UUID`](https://webhook.opal.optimizely.com/webhooks/UUID/UUID).

Click **Save** on the Agent Platform workflow agent. Keep this browser tab open. Return to it after completing the CMP configuration.

![Screenshot of the Opal workflow agent editor with the Save button highlighted in the top toolbar](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/wjG7MXgz4o3tTLcPJkOsm-20260720-145024.png)

## CMP configuration

### Create the webhook

Register a webhook in CMP that notifies the Agent Platform workflow agent when external steps start. CMP supports many webhook events. This guide uses `external_sub_step_started` as an example. Find all available events on the webhook registration page in CMP or see the list of webhooks in the [CMP developer documentation](https://docs.developers.optimizely.com/content-marketing-platform/reference/get-started).

1. Go to **Settings** (your profile picture) **> Apps & Webhooks**.
2. Go to the **Webhooks** tab.
3. Click **Register New > General Webhook**.

   ![Screenshot of the CMP Webhooks tab showing the Register New button with the General Webhook option highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/66JxKkUDGuG8MUgxVSNLL-20260720-145024.png)
4. Enter *Agent Platform External Step Automation* for the **Name**.
5. Enter *Triggers Agent Platform workflow agent when external steps start.* for the **Description**.
6. Paste the webhook URL you copied from Agent Platform into the **Callback URL** field.
7. Enter the same secret you entered as the **Auth Key** in Agent Platform for the **Secret**. This value must match exactly.

   ![Screenshot of the CMP General Webhook configuration form showing the Callback URL and Secret fields completed](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/M2M-dvWzq4amfcUZAEGKK-20260720-145024.png)
8. Select the **external\_sub\_step\_started** checkbox. Select additional events on this page as needed.

   ![Screenshot of the CMP webhook event list with the external_sub_step_started checkbox selected](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/1YARNo_K_b6Fn5WaEguES-20260720-145024.png)
9. Click **Create Webhook**.

:::hint{type="info"}
**Note**

The **Auth Key** in Agent Platform must exactly match the **Secret** you entered when creating the webhook in CMP. If the values do not match, the webhook is rejected.
:::

## Create a CMP workflow with an external step

Create a CMP workflow template that includes an external step.

### Create the CMP workflow

1. Open a new browser tab and go to CMP.
2. Go to **Settings > Workflows**.

   ![Screenshot of the CMP Settings menu with Workflows highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Umwy2YvObLPQKObPBA2LM-20260720-145024.png)
3. Click **Add Workflow** (or edit an existing one).
4. Enter *AI-Assisted Content Workflow* for the **Workflow Title**.

   ![Screenshot of the CMP Add Workflow form with AI-Assisted Content Workflow entered in the Workflow Title field](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/BaYAxHrZ9PrvQsDUFAZLw-20260720-145024.png)
5. Go to the **Steps** tab.
6. Click **Add Step** to create your workflow structure.

### Add a step and convert to external

1. Enter *AI Brief Enhancement* for the **Title** for your step.
2. Expand the step to see configuration options.
3. Click **More (...) > Convert to External Step**.

   ![Screenshot of the CMP workflow step configuration showing the More menu expanded with Convert to External Step highlighted](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/68JS9hCvCqGGCkfpyyKX0-20260720-145024.png)

### Configure the external system

The external system name is what the Agent Platform workflow agent uses to route the webhook to the correct processing logic. This value must match the value referenced in the External Step Router agent prompt.

1. Click **Manage external systems**.

   ![Screenshot of the CMP workflow step editor showing the Manage external systems link](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/bKKReJqtsnhVOpeLgiiOr-20260720-145024.png)
2. Click **Add External System**.

   ![Screenshot of the CMP Add External System dialog with a text field for the external system name](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sdTfGxtIBqVJhRtFhzUh1-20260720-145025.png)
3. Enter *AI\_Brief\_Enhancement* for the **External System**.
4. Click **Save**.
5. Select **AI\_Brief\_Enhancement** from the **Select external system** drop-down list.
6. Click **Save** to save the entire CMP workflow.

### Webhook payload reference

When the external step starts, CMP sends a webhook payload like the following:

```json
{
   "data": {
      "task_id": "abc123-task-guid",
      "step_id": "step-guid",
      "sub_step_id": "sub-step-guid",
      "status": "started",
      "external_system": "AI_Brief_Enhancement"
   },
   "event": "external_sub_step_started",
   "timestamp": "2026-01-31T10:30:00Z"
}
```

The `external_system` value is what the External Step Router agent in Agent Platform uses to determine which processing branch to run.

## Build the Agent Platform workflow agent

Return to Agent Platform to create the specialized agents and assemble the full workflow.

### Create the External Step Router agent

The External Step Router specialized agent extracts the external system name from the webhook payload and outputs a routing value. The routing value is a string you define. It is what you reference in the following **Condition** node to decide which agent runs next.

For example, if the external system is *AI\_Brief\_Enhancement*, you can output *BRIEF\_UPDATE* and then add a condition that checks for *BRIEF\_UPDATE* to route to the Task Brief Updater agent.

To create the External Step Router specialized agent using JSON import, see [Import a specialized agent from JSON](docId\:tZPJWDyE1GSB-epLsUh5S) and paste the following JSON:

```json
{
  "schema_version": "1.0",
  "agent_type": "specialized",
  "name": "External Step Router",
  "output": {
    "type": "text",
    "schema": null,
    "description": null
  },
  "version": "1.0.0",
  "agent_id": "external_step_router",
  "file_urls": [],
  "is_active": true,
  "creativity": 0.1,
  "is_deleted": false,
  "parameters": [
    {
      "name": "external_system",
      "type": "string",
      "default": null,
      "required": true,
      "description": "The external system name from the CMP webhook payload "
    }
  ],
  "description": "Routes external step web hooks to the correct processing agent based on external system name.",
  "prompt_pills": null,
  "enabled_tools": null,
  "agent_metadata": null,
  "inference_type": "rudimentary",
  "initial_message": null,
  "prompt_template": "You are a router agent. Your only job is to output a routing value based on the external system name provided.\\nThe external system is: [[external_system]]\\nOutput ONLY the routing value according to this logic:\\n\\\\- If external_system equals \\"AI_Brief_Enhancement\\" → output \\"BRIEF_UPDATE\\"\\n\\\\- If external_system does not match any known value → output \\"UNKNOWN\\"\\nProvide only the routing value with no additional text or explanation.",
  "internal_version": 1,
  "conversation_mode": false,
  "first_prompt_mode": "open",
  "is_enabled_in_chat": true,
  "memory_token_limit": 8000,
  "evaluation_criteria": null,
  "system_prompt_template": ""
}
```

Alternatively, follow these steps in Agent Platform to create it manually:

1. Go to **Agents > Your Agents**.
2. Click **Add Agent > Specialized Agent**.
3. Enter *External Step Router* for the **Name**.
4. Enter *external\_step\_router* for the **Id**.
5. Enter *Routes external step webhooks to the correct processing agent based on external system name.* for the **Description**.
6. Enter the following for the **Prompt Template**. Update the routing logic to match the external system names you configured in CMP and the output values you want to use in your **Condition** nodes. The external system name must exactly match the value you entered in the CMP external system setup.

```text
You are a router agent. Your only job is to output a routing value based on the external system name provided.
The external system is: [[external_system]]
Output ONLY the routing value according to this logic:
- If external_system equals "AI_Brief_Enhancement" → output "BRIEF_UPDATE"
- If external_system does not match any known value → output "UNKNOWN"
Provide only the routing value with no additional text or explanation.
```

7. Click **Add variable**.
   1. Select **String** for the **Type**.
   2. Enter *external\_system* for the **Name**.
   3. Enter *The external system name from the CMP webhook payload.* for the **Description**.
   4. Select the **Required?** checkbox.
   5. Click **Save Variable**.
8. Select **Quick** for the **Inference Level**.
9. Click **Save**.

### Create the Task Brief Updater agent

The Task Brief Updater specialized agent updates the task brief with AI-generated content. To create the Task Brief Updater agent using JSON import, paste the following:

```json
{
  "schema_version": "1.0",
  "agent_type": "specialized",
  "name": "Task Brief Updater",
  "output": {
    "type": "text",
    "schema": null,
    "description": null
  },
  "version": "1.0.0",
  "agent_id": "task_brief_updater",
  "file_urls": [],
  "is_active": true,
  "creativity": 0.5,
  "is_deleted": false,
  "parameters": [
    {
      "name": "task_id_or_url",
      "type": "string",
      "default": null,
      "required": false,
      "description": "The task ID from the task."
    }
  ],
  "description": "Updates a CMP task brief with AI-generated content.",
  "prompt_pills": null,
  "enabled_tools": [
    "get_cmp_resource",
    "update_task_brief"
  ],
  "agent_metadata": null,
  "inference_type": "simple_with_thinking",
  "initial_message": null,
  "prompt_template": "\\\\## Role\\n\\nYou are a Task Brief Enhancement agent. Your job is to read an existing task brief and enhance it with additional context.\\n\\n\\\\## Process\\n\\n1\\\\. Use `get_cmp_resource` with resource_type \\"task\\" and the provided [[task_id_or_url]] to retrieve the current task details and brief.\\n\\n2\\\\. Review the existing brief content.\\n\\n3\\\\. Use `update_task_brief` to append a confirmation message to the brief:\\n\\n   Add the following at the end of the existing brief content:\\n\\n   ---\\n\\n   \\n\\n   \\\\## AI Processing Complete\\n\\n   \\n\\n   ✅ This task was processed by the External Step Workflow automation.\\n\\n   \\n\\n   **Processed at:** [current timestamp]\\n\\n   **Status:** Enhancement complete\\n\\n   \\n\\n   ---\\n\\n4\\\\. Preserve ALL existing brief content—only append the new section.\\n\\n\\\\## Output\\n\\nConfirm that the brief was updated successfully and provide the task URL.",
  "internal_version": 1,
  "conversation_mode": false,
  "first_prompt_mode": "open",
  "is_enabled_in_chat": true,
  "memory_token_limit": 8000,
  "evaluation_criteria": null,
  "system_prompt_template": ""
}
```

Alternatively, follow these steps in Agent Platform to create it manually:

1. Go to **Agents > Your Agents** in Agent Platform.
2. Click **Add Agent > Specialized Agent**.
3. Enter *Task Brief Updater* for the **Name**.
4. Enter *task\_brief\_updater* for the **Id**.
5. Enter *Updates a CMP task brief with AI-generated content.* for the **Description**.
6. Enter the following in the **Prompt Template**:

```text
## Role
You are a Task Brief Enhancement agent. Your job is to read an existing task brief and enhance it with additional context.
## Process
1. Use `get_cmp_resource` with resource_type "task" and the provided [[task_id_or_url]] to retrieve the current task details and brief.
2. Review the existing brief content.
3. Use `update_task_brief` to append a confirmation message to the brief:
   Add the following at the end of the existing brief content:
   ---
   ## AI Processing Complete
   ✅ This task was processed by the External Step Workflow automation.
   **Processed at:** [current timestamp]
   **Status:** Enhancement complete
   ---
4. Preserve ALL existing brief content — only append the new section.
## Output
Confirm that the brief was updated and provide the task URL.
```

7. Click **Add Variable**.
   1. Select **String** for the **Type**.
   2. Enter *task\_id\_or\_url* for the **Name**.
   3. Enter *The task ID from the task.* for the **Description**.
   4. Select the **Required?** checkbox.
   5. Click **Save Variable**.
8. Click **Add tool**.
   1. Search for and select the following tools:
      - `get_cmp_resource`
      - `update_task_brief`
   2. Click **Add selected**.
9. Select **Balanced** for the **Inference Level**.
10. Click **Save**.

### Create the Workflow Step Completer agent

The Workflow Step Completer specialized agent marks the CMP workflow step as complete. To create the Workflow Step Completer agent using JSON import, paste the following:

```json
{
  "schema_version": "1.0",
  "agent_type": "specialized",
  "name": "Workflow Step Completer",
  "output": {
    "type": "text",
    "schema": null,
    "description": null
  },
  "version": "1.0.0",
  "agent_id": "workflow_step_completer",
  "file_urls": [],
  "is_active": true,
  "creativity": 0.1,
  "is_deleted": false,
  "parameters": [
    {
      "name": "task_id_or_url",
      "type": "string",
      "default": null,
      "required": false,
      "description": "The task ID containing the step to complete."
    }
  ],
  "description": "Completes an external workflow step in CMP",
  "enabled_tools": [
    "update_task_substep"
  ],
  "agent_metadata": null,
  "inference_type": "rudimentary",
  "prompt_template": "You are a Workflow Step Completer agent. Your job is to mark the current workflow step as complete in CMP.\\n\\n\\\\## Process\\n\\n1\\\\. Use `update_task_substep` with the provided [[task_id_or_url]] the **step_name** is \\"AI Brief Enhancement\\".\\n\\n2\\\\. Set the action to \\"complete\\".\\n\\n3\\\\. This will advance the task to the next workflow step.\\n\\n\\\\## Output\\n\\nConfirm that the step was completed successfully.",
  "internal_version": 1,
  "is_enabled_in_chat": true
}
```

Alternatively, follow these steps in Agent Platform to create it manually:

1. Go to **Agents > Your Agents**.
2. Click **Add Agent > Specialized Agent**.
3. Enter *Workflow Step Completer* for the **Name**.
4. Enter *workflow\_step\_completer* for the **Id**.
5. Enter *Completes an external workflow step in CMP.* for the **Description**.
6. Enter the following for the **Prompt Template**:

```text
## Role
You are a Workflow Step Completer agent. Your job is to mark the current workflow step as complete in CMP.
## Process
1. Use `update_task_substep` with the provided [[task_id_or_url]].
2. Set the action to "complete".
3. This advances the task to the next CMP workflow step.
## Output
Confirm that the step was completed.
```

7. Click **Add Variable**.
   1. Select **String** for the **Type**.
   2. Enter *task\_id\_or\_url* for the **Name**.
   3. Enter *The task ID containing the step to complete.* for the **Description**.
   4. Select the **Required?** checkbox.
   5. Click **Save Variable**.
8. Click **Add tool**.
   1. Search for and select the `update_task_substep` tool.
   2. Click **Add selected**.
9. Select **Standard** for the **Inference Level**.
10. Click **Save**.

### Assemble the workflow agent

Connect all the specialized agents in your Agent Platform workflow agent.

**Access your workflow agent**

Follow these steps in Agent Platform:

1. Go to **Agents > Your Agents**.
2. Click the **CMP External Step Handler** agent you created in the [Create a workflow agent](docId\:DRP19GsHfHR6-3o0SCAwi) section.

**Add your first agent**

1. Drag and drop the **External Step Router** agent into the editor below the **CMP External Step Handler** webhook.
2. Connect the **CMP External Step Handler** webhook and **External Step Router** agent. To do so, click the **CMP External Step Handler's** connector circle.

   ![Screenshot of the Opal workflow editor showing the CMP External Step Handler webhook with its connector circle highlighted for dragging](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/gM071w5pZQRKS45A-BDff-20260720-145024.png)

:::Paragraph{indent="1"}
Drag the connector to the **External Step Router** agent.
:::

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/mtNgXCGN8MojfYVhdvZHh-20260720-145024.png" size="100" alt="Screenshot of the Opal workflow editor showing the connector being dragged from the CMP External Step Handler webhook to the External Step Router agent" isUploading="false" showCaption="false" width="626" height="720" darkWidth="626" darkHeight="720" indent="2"}

**Add a condition**

The **Condition** node reads the output value from the External Step Router agent and directs the workflow to the correct next agent. The value you enter in **Matching Condition** must match the routing value output by the router, for this example, *BRIEF\_UPDATE*.

1. Drag and drop a **Condition** into the editor adjacent to the **External Step Router** agent.
2. Click the **Condition** to edit it.
3. Click **Add Condition**.
4. Select **Equals** for the **Match Type**.
5. Enter *BRIEF\_UPDATE* for the **Matching Condition**.

   ![Screenshot of the Opal Condition editor showing Match Type set to Equals and Matching Condition set to BRIEF_UPDATE](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ItfIB_-8QY5wYse_0umNf-20260720-145024.png)
6. Connect the **External Step Router** agent to the **Condition**. To do so, click the **External Step Router's** connector circle and drag the connector to the **Condition**.

**Add the remaining agents**

1. Drag and drop the **Task Brief Updater** agent into the editor in the **Drag and drop step** area.
2. Drag and drop the **Workflow Step Completer** agent into the editor below the **Task Brief Updater** agent.
3. Connect the **Task Brief Updater** agent and **Workflow Step Completer** agent. To do so, click the **Task Brief Updater's** connector circle and drag the connector to the **Workflow Step Completer** agent.
4. Click **Save**.

   ![Screenshot of the completed Opal workflow agent canvas showing the full agent chain: CMP External Step Handler webhook connected to External Step Router, then to a Condition, then to Task Brief Updater, and finally to Workflow Step Completer](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/NTPMOZ2yJlkMxjIZ70EHi-20260720-145024.png)

## Test your workflow

### Run the test

Follow these steps in CMP:

1. Click **Create New > Task**.
2. Enter *AI-Assisted Content Workflow* for the **Title**.
3. Select **AI-Assisted Content Workflow** you created in the [Create a CMP workflow with an external step](docId\:DRP19GsHfHR6-3o0SCAwi) section for the **Workflow**.

   ![Screenshot of the CMP new task creation dialog showing the Workflow field with AI-Assisted Content Workflow selected](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/57qVzgGl1SF00Sc3_w5-E-20260720-145024.png)
4. Enter a **Due Date**.
5. (Optional) Enter additional information to the task.
6. Click **Create**.

Advance the task to the **AI Brief Enhancement** external step. To do so, click on the step and select **In progress** or advance through the previous steps.

### Verify the results

Confirm the workflow ran end to end by checking both Agent Platform and CMP.

Follow these steps in Agent Platform to review the workflow logs:

1. Go to **Agents > Workflow Logs**.
2. Click the latest execution of the **CMP External Step Handler** Agent Platform workflow agent.
3. Select each individual workflow agent and verify everything ran correctly.
4. Verify the **Workflow Execution** is **Completed**.

   ![Screenshot of Opal Workflow Logs showing the CMP External Step Handler execution with Completed status displayed](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ov_aXWH2nQBll0FkdoB6F-20260720-145025.png)

Follow these steps in CMP to review the task brief updates:

1. Go to **Plan**.
2. Click your **AI-Assisted Content Workflow** task.
3. Verify the task brief was updated by the Agent Platform workflow agent and the AI Brief Enhancement step is marked complete.

   ![Screenshot of CMP task view showing the AI Brief Enhancement workflow step marked complete and the task brief updated with the AI processing confirmation section](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/zO_lveCf8uTe4HZIVQOqT-20260720-145025.png)

The following are points to check and their expected results:

- **Webhook received** – Execution displays in Agent Platform history.
- **Router output** – Displays the routing value you defined in the router prompt.
- **Brief updated** – Task brief contains the appended AI processing message.
- **Step completed** – CMP shows the external step as complete.
- **Task advanced** – Task is on the next CMP workflow step or the CMP workflow is complete.

## Troubleshoot

### Webhook does not trigger

Check the following if the webhook does not trigger:

- **Callback URL incorrect** – Verify you copied the URL exactly from Agent Platform.
- **Event not selected** – Confirm you selected `external_sub_step_started`.
- **Workflow agent not active** – Toggle the Agent Platform workflow agent to active.

### Router does not match

Check the following if the router does not return the expected value:

- **External system name typo** – Verify the exact spelling in CMP matches the router logic.
- **Case sensitivity** – External system names are case-sensitive.
- **Missing condition** – Add a condition for your external system in the router prompt.

### Step does not complete

Check the following if the CMP workflow step does not advance:

- **Tool not enabled** – Ensure you added the `update_task_substep` tool to the specialized agent.
- **Task ID not passed** – Verify the `task_id_or_url` variable is flowing through the Agent Platform workflow agent.
- **Permission error** – Check that Agent Platform is connected to the correct CMP instance. See [Product connections](docId\:pe0pbUJveWrG8ewvZWDRE).

## Next steps

When you have the basic workflow running, expand your Agent Platform workflow agent by implementing the following:

- **Add more external systems** – Expand your router to handle different CMP workflow step types.
- **Build specialized agents** – Create agents for content generation, compliance checks, and translations.
- **Update the Condition for additional options** – Add conditions for other `external_system` values, such as `COMPLIANCE_CHECK` and `UNKNOWN`.
- **Implement error handling** – Add conditional branches for failure scenarios.
- **Configure notifications** – Use the `send_email` tool to notify users of completion.

:::hint{type="info"}
**Note**

If you use Opti ID, administrators can turn off generative AI in the Opti ID Admin Center. See [Turn generative AI off across Optimizely applications](docId\:X5U0kKD2azV5cIdNqwGNj).
:::
