---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "AI ContentVersion Action Flow Reference"
description: "Extract text from a Salesforce File version, retrieve extracted text or request a summary."
contentType: "reference"
audience: "admin,developer"
---

# AI ContentVersion Action

Extract text from a Salesforce File version, retrieve extracted text or request a summary.
The namespaced Apex action name is `rooms__ContentVersionAIAction`.

**Reference status: Limited.** Review the limitations below before using this action in a new Flow.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | Yes, for the selected operation. The action waits for its immediate API response. |
| Record writes | Successful extraction submission updates the ContentVersion text-extract job field. Retrieval and summary do not directly update records in the action step. |
| Platform event | The action does not directly publish a platform event. |
| Background work | Extraction processing continues after the request. Retrieval and summary return their immediate results. |
| Email | No email is sent by this action. |

Select one operation. If more than one is selected, **Extract Text** takes precedence, then **Retrieve Text**, then **Summarize Text**. If all three are false, the action returns no result for that request.

Extraction submission can update the File version before later Flow work runs. A later callout in that transaction must account for this record write.

## Inputs

Required describes the Flow input setting. Additional configuration rules can still require a value.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `recordId` | Record ID (Content Version ID) | Yes | Supply a Salesforce `ContentVersion` ID (`068`). |
| `origin` | Origin | No | Optional record reference for extraction context. |
| `modelId` | AI Agent ID (Optional) | No | Exposed input. It does not select an agent for these operations. |
| `textExtract` | Extract Text (default=False) | No | Defaults to `false`. Set `true` to submit extraction. |
| `textRetrieve` | Retrieve Text (default=False) | No | Defaults to `false`. Set `true` to retrieve previously extracted text. |
| `createEmbeddings` | Create Embeddings (default=False) | No | Defaults to `false`. This input does not start embedding creation in this action. |
| `textSummarize` | Summarize Text (default=False) | No | Defaults to `false`. Set `true` to request a summary. |
| `chunkSize` | Summarize Chunk Size (Words) (default=1000) | No | Defaults to `1000`. This input is not applied to the summary request. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Immediate action status. Also inspect Message and the expected result fields. |
| `message` | Error Message | API response details or an exception message. |
| `recordId` | Record ID (Content Version ID) | The referenced ContentVersion when available. |
| `extractJobId` | Text Extract Job  ID | The accepted text-extract job ID. |
| `textContent` | Text Content | Retrieved text for Retrieve Text. |
| `signedURL` | Signed URL | A returned text-download URL, when available. |
| `wordCount` | Word Count (from retrieve) | The retrieved or summarized word count, when available. |
| `sizeBytes` | Size Bytes (from retrieve) | Retrieved text size in bytes. |
| `chunkSize` | Chunk Size (from summarize) | Summary chunk size reported by the response. |
| `totalChunks` | Total Chunks (from summarize) | Summary chunk count reported by the response. |

## Configure the Flow

1. Select the exact File version and one supported operation.
2. For retrieval or summary, confirm that extraction has completed.
3. Store Message and the result fields required for the selected operation.
4. For extraction, retain Text Extract Job ID and check the later result.
5. Connect the Fault path and handle missing or incomplete result fields.

Confirm the Flow user's Apex action access and access to the records or Files used by this operation. Review the configured Salesforce API connection user's access when the action makes an API request.

## Troubleshooting

**No result is returned.** Select Extract Text, Retrieve Text or Summarize Text. Create Embeddings alone does not select an operation.

**Success is true but data is missing.** Inspect Message and the expected text, job or summary outputs. An unsuccessful API result can leave the default Success value unchanged.

**You have uncommitted work pending.** This action makes a callout and extraction can write a File-version field afterward. Review both earlier and later actions in the same transaction.

See the [Flow action catalog](/content/build/flows/index.md) for related actions and transaction guidance. Confirm that the action and input fields are available in the installed package.
