# CloudFiles Preview

Show a file inside a Salesforce Screen Flow with the CloudFiles Preview component, so users can review it, and edit it where you allow, without leaving the flow.

> Kind: Flow action · Updated: Oct 30, 2026

The CloudFiles Preview component shows one file inside a Salesforce Screen Flow. Users can read it, download or print it, and, where you allow it, edit it and save a new version without leaving the flow. It works with files in any connected library, such as SharePoint, Google Drive, AWS S3, Azure Blob and with Salesforce Files.

> **Availability** — CloudFiles Preview is available from CloudFiles package version 5.297 onwards. It is part of Document Management: each user needs a CloudFiles Document Management license. A Document Generation or Document AI license on its own is not enough. See License Management.

![A purchase order PDF previewed in a screen flow on a Case record page](https://media.help.cloudfiles.io/fa-cloudfiles-preview-sf/1dd91961.png)

## 1. Add the component to a screen

In your screen flow, add a Screen element. Search the components for CloudFiles Preview and drag it onto the screen.

Set File to the file you want to show. It takes a Resource variable, for example the output of a CloudFiles flow action. For a Salesforce File, set the variable's Id to the file's ContentDocument Id and its Library to salesforce.

![The CloudFiles Preview component selected in the Flow Builder screen editor, with its inputs in the properties panel](https://media.help.cloudfiles.io/fa-cloudfiles-preview-sf/48026de5.png)

The other inputs control what users see:

| Input | What it does | Default |
|---|---|---|
| Show Download | Shows the Download button. | True |
| Show Print | Shows the Print button. | True |
| Show Open in | Shows the Open in menu, for example to open the file in SharePoint or in a desktop app. | True |
| Allow editing | Lets users edit Word files and annotate PDFs, then save. See step 2. | False |
| Component Height | Height of the preview in pixels. A flow screen does not give components a height of their own, so set the height you want here. | 600 |

## 2. Allow editing (optional)

Set Allow editing to True to let users edit Word files and annotate PDFs. Saving stores the change as a new version of the same file.

With editing on, the component shows its own Previous, Next and Finish buttons and asks before unsaved edits are lost. Open Configure Footer in the screen's properties and hide the footer, so users don't see two sets of buttons.

![A Word file open for editing in the CloudFiles Preview component, with the component's own Previous and Finish buttons](https://media.help.cloudfiles.io/fa-cloudfiles-preview-sf/1cecee06.png)

## 3. Add the flow to a page

Save and activate the flow. Then open the record page or Lightning page where users should see it, click the Gear icon and select Edit Page. Drag the Flow component onto the page and select your flow. If the flow finds the file from the record, tick Pass record ID into this variable for its recordId variable. Save the page and activate it.

## What each user can do

The inputs set the most a user can do. Each user's own access in Salesforce and in the library still applies:

- Download and Print need the Allow Downloading permission.
- Editing needs the Update files & folders permission. For a Salesforce File, the user also needs edit access to that file.
- Salesforce Files open only for users who can see the file in Salesforce.
- Files in other libraries open the same way as in the CloudFiles widget: with the user's own connected account, or with the service account when Use service account for authentication is on, which also covers Experience Cloud users. Open in appears only when the file is opened with the user's own account.

A user without a Document Management license sees: You don't have a CloudFiles license to preview files here. Ask your Salesforce admin to assign one.
