> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryprofound.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Amplience in Workflows

> Use Amplience nodes in Profound Workflows to list, read, create, update, and publish content items

After you connect Amplience, the following nodes become available in Profound Workflows under the **Amplience** group. All operations use Amplience's Content Management API with the permissions of the connected personal access token.

Every node requires a [connected Amplience account](https://docs.tryprofound.com/integrations/amplience/connect-amplience-to-profound.md) and returns two outputs: `json` (the result object) and `text` (the same result as compact JSON, for text inputs).

## Available nodes

> [tab] List Content Items
>
> ### List Content Items
>
> List one page of content items from an Amplience repository.
>
> #### Required inputs
>
> * **Amplience Connection**
> * **Content repository**
>
> #### Optional inputs
>
> * **Page** (default `0`): the page of results to return, starting at `0` for the first page
> * **Page Size** (default `20`, maximum `100`): number of items to request
>
> #### Output
>
> The **Amplience Response** contains:
>
> * `items`: each item includes `id`, `label`, `body`, `version`, and Amplience metadata
> * `page`: `number`, `size`, `total_elements`, and `total_pages`
>
> The node returns one page. To read more, run it again with the next page number. An empty final page is valid.

> [tab] Get Content Item
>
> ### Get Content Item
>
> Read an Amplience content item and its version.
>
> #### Required inputs
>
> * **Amplience Connection**
> * **Content Item ID**: the content item to read
>
> #### Output
>
> The **Content Item** includes `id`, `label`, `body`, `version`, and other Amplience fields. Pass `version` to the **Update Content Item** node.

> [tab] Create Content Item
>
> ### Create Content Item
>
> Create a draft content item in Amplience.
>
> #### Required inputs
>
> * **Amplience Connection**
> * **Content repository**
> * **Label**: the content item label, up to 1,000 characters
> * **Name**: the content name, written to `_meta.name`
> * **Content type**: the URL of the Amplience content type schema, written to `_meta.schema`
> * **Content fields**: the fields defined by your schema
>
> #### Output
>
> The **Content Item**, in the same shape as the **Get Content Item** output.
>
> > [!NOTE]
> >
> > This node creates a draft only. It doesn't publish the item.

> [tab] Update Content Item
>
> ### Update Content Item
>
> Update an Amplience content item using its current version.
>
> #### Required inputs
>
> * **Amplience Connection**
>
> * **Content Item ID**: the content item to update
>
> * **Version**: the version from a recent **Get Content Item** result.
>
> > [!TIP]
> >
> > If the item has changed, get the latest version before trying again.
>
> #### Optional inputs
>
> * **Label**: leave blank to keep the existing label or supply a label or **Content fields** to make an update
>
> * **Name** and **Content type**: required when you supply **Content fields**
>
> * **Content fields**: leave blank to keep the existing content or enter all replacement fields
>
> > [!WARNING]
> >
> > **Content fields** replace the whole body. The node doesn't support partial field updates, so send every field.
>
> #### Output
>
> The **Content Item**, in the same shape as the **Get Content Item** output. This node doesn't publish the item.

> [tab] Publish Content Item
>
> ### Publish Content Item
>
> Publish an Amplience content item and check its status.
>
> #### Required inputs
>
> * **Amplience Connection**
>
> * **Content Item ID**: the item to publish
>
> > [!NOTE]
> >
> > The node publishes the item's current state, not a specific version.
>
> #### Output
>
> The **Publication** contains:
>
> * `content_item_id` and `job_id`
> * `state`: `CREATED`, `PREPARING`, `WAITING`, `PUBLISHING`, or `COMPLETED`
> * `published`: `true` when Amplience confirms publication
> * `pending`: `true` when Amplience accepted the job but didn't confirm it within 20 seconds
> * `observation`
>
> Profound submits the publish job, then checks its status every 2 seconds for up to 20 seconds. If `pending` is `true`, don't rerun the node. Check the job in Amplience using `job_id`. To continue a Workflow only after publication, gate downstream steps on `published` being `true`.

***

## Key concepts

### Hub

The Amplience hub that contains your repositories. Learn more in Amplience's [account structure guide](https://amplience.com/docs/intro/hubsandrepositories.html). In the **Create Content Item** and **List Content Items** nodes, the **Hub** picker only helps you browse repositories. Profound doesn't save it on the node, and selects it automatically when the connection has one hub.

### Content repository

Where content items live. Select a repository from the dropdown, enter a repository ID, or use a variable. Learn more in Amplience's [Managing repositories](https://amplience.com/developers/docs/accounts/repositories/) guide.

### Content Item ID

Enter the ID or use a variable from a previous node's output, for example **Create Content Item** or **List Content Items**. This field has no picker.

### Content type and schema

A JSON schema URL defines each content type. Learn more in Amplience's [Working with content types](https://amplience.com/developers/docs/dev-tools/guides-tutorials/content-types/) guide. When you select a content type, its fields load into the editor. If you enter a schema URL manually, use JSON mode. Schema changes in Amplience appear only after Amplience refreshes its cached schema.

### Content fields

The content item's JSON body: the fields from the content type schema plus `_meta`. **Name** and **Content type** fill `_meta.name` and `_meta.schema`. Other `_meta` keys, such as `deliveryKey`, stay unchanged.

### Structured and JSON mode

Structured mode shows simple top-level fields (text, number, boolean, and dropdowns for enums) for schemas with up to 200 fields. Complex fields such as objects, arrays, and references get a per-field JSON editor. Use JSON mode when fields can't load or when the body comes from a variable.

### Version

Amplience's optimistic lock. Get the version from the **Get Content Item** node and pass it to the **Update Content Item** node. If the item changed since then, get it again. Learn more about versions in Amplience's [Versioning](https://amplience.com/developers/docs/concepts/versioning/) guide.

### Drafts and published content

The **Create Content Item** and **Update Content Item** nodes produce drafts. Only the **Publish Content Item** node makes content live. Learn more in Amplience's [Publishing and scheduling](https://amplience.com/developers/docs/concepts/publishing-scheduling/) guide. Add a [Human Review step](https://docs.tryprofound.com/agents/workflows/nodes/human-review.md) before **Publish Content Item** when the content comes from an LLM or external input.

### Failed writes

Profound doesn't retry failed writes, and a failed write may still have completed. Check Amplience before you rerun a write node. Reads retry automatically on temporary errors.

### Locales

Nodes have no locale setting. Put localized fields in the body JSON. Learn more in Amplience's [Localizing content](https://amplience.com/developers/docs/user-guides/produce-content/localize/) guide.

## Example Workflows

Create and publish a content item:

1. Generate content with a [Prompt LLM](https://docs.tryprofound.com/agents/workflows/nodes/prompt-llm.md) node.
2. Add a **Create Content Item** node to draft a content item in Amplience.
3. Add a [Human Review](https://docs.tryprofound.com/agents/workflows/nodes/human-review.md) step for a team member to review the content.
4. Add a **Publish Content Item** node to publish the item to Amplience. Continue only if `published` is `true`.

Update a content item:

1. Add a **Get Content Item** node to retrieve the item's fields and `version`.
2. Edit the fields with the [Prompt LLM](https://docs.tryprofound.com/agents/workflows/nodes/prompt-llm.md) node. Type `/` in the prompt to insert the `body` from the **Get Content Item** node's results, and describe the change you want. Ask for the complete updated fields, since **Content fields** replace the whole body.
3. Add an **Update Content Item** node. Pass it the `version` from the **Get Content Item** node's results, and the Prompt LLM output as **Content fields** in JSON mode.
4. Add a [Human Review](https://docs.tryprofound.com/agents/workflows/nodes/human-review.md) step for a team member to review the updated content.
5. Add a **Publish Content Item** node to publish the updated item to Amplience.

***

## Troubleshooting

The following error messages can appear when you run Amplience nodes. Each entry lists the cause and solution.

> [accordion] This connection cannot list hubs. Check its permissions in Amplience.
>
> The token lacks permission to read hubs, so the node can't show the hub list. Adjust its [permissions](https://amplience.com/developers/docs/user-guides/manage-accounts/set-permissions/) in Amplience. See [Permissions and security](https://docs.tryprofound.com/integrations/amplience/amplience-permissions-and-security.md) for what the token needs.

> [accordion] This connection cannot list repositories. Ask your Amplience administrator to allow repository read access.
>
> The token lacks permission to read content repositories, so the node can't show the repository list. Ask your Amplience administrator to allow repository read access, or enter a [repository ID](#content-repository) yourself.

> [accordion] Content fields could not be loaded. Check the connection permissions or use JSON.
>
> Profound couldn't load the [schema](#content-type-and-schema) for the selected content type, so it can't show the structured fields. Try again, check the connection's permissions, or switch to [JSON mode](#structured-and-json-mode).

> [accordion] Amplience rejected the content. Check its schema and required fields.
>
> The body of the **Create Content Item** node doesn't match the [content type schema](#content-type-and-schema), for example because a required field is missing or a value has the wrong type. Fix the content fields and run the node again.

> [accordion] Amplience rejected the update. Check the content body and the version from a recent Get Content Item result.
>
> The new body doesn't match the schema, or the [version](#version) you passed is out of date. Run the **Get Content Item** node again, then pass its `version` and a valid body to the **Update Content Item** node.

> [accordion] Amplience reported a content conflict
>
> Someone changed the content item after your Workflow read it, so the [version](#version) no longer matches. Run the **Get Content Item** node again and retry the update with the new version.

> [accordion] Supply a label or content fields to update Amplience.
>
> The **Update Content Item** node has nothing to change. Enter a new label or content fields, or both.

> [accordion] Supply Name and Schema URL with the content fields.
>
> You entered **Content fields** without **Name** and **Content type**. Amplience needs both to create the content item. See [Content type and schema](#content-type-and-schema).

> [accordion] Amplience resource is unavailable
>
> The hub, repository, or [content item ID](#content-item-id) doesn't exist, or the token can't see it. Check the ID, and check that the token has access to that hub and repository in Amplience.

> [accordion] Amplience access denied
>
> The token was revoked or lost permissions in Amplience. Connect a new token as instructed in [the integration setup guide](https://docs.tryprofound.com/integrations/amplience/connect-amplience-to-profound.md), or adjust the token's [permissions](https://amplience.com/developers/docs/user-guides/manage-accounts/set-permissions/).

> [accordion] Amplience publication FAILED. Inspect Amplience before taking another action.
>
> Amplience accepted the publish request, but the publish job failed. Open the content item in Amplience, check its publishing status, and fix the problem before you run the node again. See [Drafts and published content](#drafts-and-published-content).

> [accordion] Publication was accepted but could not be tracked. Inspect Amplience before retrying.
>
> Amplience accepted the publish request, but Profound couldn't confirm the result. Check the publishing status in Amplience before you retry.

> [accordion] Amplience write outcome is unknown. Inspect Amplience before rerunning. or Amplience did not confirm the action. It may have completed; inspect Amplience before retrying.
>
> The request timed out or returned an unclear result, so the write may or may not have gone through. Check the content item in Amplience before you retry. See [Failed writes](#failed-writes).

> [accordion] Content Fields must fit within 256 KiB, 32 nesting levels, and 5,000 object keys.
>
> The content body is larger or more deeply nested than the node accepts. Shorten the content or reduce its nesting, then run the node again.

> [accordion] Amplience rate limit reached
>
> Amplience rejected the request because your account sent too many requests in a short time. Wait a few minutes, then try again.

> [accordion] Set up the Amplience connection before running this node.
>
> The node has no Amplience connection selected. Select a connection in the node, or connect Amplience as instructed in [Connect Amplience to Profound](https://docs.tryprofound.com/integrations/amplience/connect-amplience-to-profound.md).
