Preview a File in a Screen Flow | Spring ’26 Release

Spring ’26 introduces a native File Preview component for Screen Flows that displays PDFs and images directly inside a flow screen. This guide explains how it works, when to use it, and step-by-step instructions to wire it into your flows.

What the File Preview component does

The File Preview component allows users to view a file inline inside a Screen Flow. Instead of downloading the file or opening a new tab, users can scroll, review, and continue the flow — ideal for approvals and document verification steps. It supports files stored in Salesforce and requires a ContentDocumentId as input.

When to use File Preview in your flows

  • Approval flows where users must view documents before approving
  • Verification steps that require users to check uploaded files
  • Flows that surface attachments from a related record (e.g., Account, Case)

How the File Preview component works

The component requires a single, required input: ContentDocumentId. Salesforce uses that ID to render the file inline. If you need to preview more than one file on the same screen, place the File Preview component inside a Repeater to show multiple files sequentially.

Step-by-step: Add a File Preview to a Screen Flow

Follow these steps in a Spring ’26 pre-release or production org (when available):

  • Open a record (for example, an Account) and upload a file to the Files related list (PDF or image).
  • Go to Setup → Flows → New Flow and choose Screen Flow.
  • Create a Text variable named recordId and mark it Available for input. This allows the flow to accept the record ID from a record page.
  • Add a Get Records element on ContentDocumentLink and filter by LinkedEntityId = recordId. Store only the first record to retrieve ContentDocumentId.
  • Add a Screen element and drop the File Preview component onto the screen.
  • Set the component’s ContentDocumentId property to the ContentDocumentId returned by the Get Records element.
  • Save and Debug the flow. Provide the Account Id when prompted; the file should display inline on the flow screen.

Previewing multiple files

The File Preview component shows one file per instance. If your flow retrieves multiple ContentDocumentLink records, use a Repeater component and place File Preview inside it. Each file will appear one after another on the same screen.

Requirements & tips

  • The component only accepts ContentDocumentId (passing a different ID type will not work).
  • The running user must have access to the file in Salesforce.
  • In Spring ’26 this feature may be available as a preview in prerelease orgs.

FAQs

  • How do I preview a file inside a Screen Flow? — Add the File Preview component to your Screen and pass a valid ContentDocumentId.
  • Which ID works with the File Preview component? — Only ContentDocumentId works.
  • How do I get the ContentDocumentId? — Use a Get Records element on ContentDocumentLink and read its ContentDocumentId field.
  • Can I show multiple files on one screen? — Yes, by placing the component inside a Repeater.

Conclusion

While not a flashy headline, the inline File Preview component solves a real usability problem by keeping users inside the flow when they need to review documents. For flows that include approvals, verification, or attachments, this feature reduces friction and improves user experience.

Why this matters: For Salesforce admins and developers, inline file preview simplifies flow UX design and reduces context switching for end users. Business users benefit from faster, smoother review and approval experiences.