Introduction

In this test drive, you will explore how CloudFiles Document AI and Document Management, integrated with Salesforce Flows, can automatically process merged or misorganized PDF documents stored in external storage and intelligently split them into individual files using provided instructions.

The setup enables:

  • Splitting a PDF from external storage (e.g., SharePoint, Google Drive) whether merged or multi-part, based on default or custom instructions
  • Auto-naming the resulting files based on their contents
  • Creating child Result Document records linked to each individual split file

All of this is fully automated using Document AI and Document Management & Sharing and Salesforce Flows. The test drive takes under a minute to complete.

Instructions

Follow the steps below to test the setup:

  1. Go to the Split or Merge Documents tab and create a new record. No additional input is required — just save it.
  2. Navigate to the External Files tab on the record and upload the merged document using the CloudFiles widget. This will directly upload the file into the connected SharePoint folder.

  1. Against the uploaded file, in the dropdown menu, click 'Split with AI'. This will launch a screen flow.

  1. In the flow screen, optionally provide any special instructions for splitting. Example: "Split this file into individual sections based on headers or logical parts."

  1. Click Finish to confirm the split.

  1. Wait a few seconds for the automation to complete. Refresh the page to view updates.

7 - Review AI Output:

  1. The document will be split into multiple child files using AI.
  2. A corresponding Result Document record will be created for each split file.

  1. You'll find the split files organised into a new folder titled "Split - {Original File Name}" in external storage.

  1. Each file is automatically named based on its content and linked in the External Files tab of the record.

Implementation

This solution is powered by Salesforce Flows that invoke the Split Document using AI flow action.

CloudFiles Document AI handles:

  • Detecting content-based split boundaries of the selected external file based on Instructions.
  • Splitting the External file accordingly into multiple parts.
  • Naming each file intelligently based on content
  • Uploading the resulting files into a new folder within the external storage
  • Creating Result Document child records for each output file

Additionally, this setup leverages the ability to add custom buttons to the file dropdown or list view in the CloudFiles component. These buttons can be configured to launch either screen flows or auto-launched flows, providing seamless integration and user-triggered automation directly from the file interface.

Beyond This Test Drive

This test drive shows a basic example—but the Split Document using AI action can be leveraged in various advanced Salesforce automations:

Screen Flows for Business Users

Let agents or partners upload documents directly into connected external storages and supply optional split instructions on-screen.

Example: A partner uploads a contract bundle into a external folder through cloudfiles widget. AI splits it by section and names each split contract with the client name.

Record-Triggered Automations

Trigger splitting automatically when an external file is uploaded or when a record meets certain criteria.

Example: A case record receives a complaint file with multiple documents. It is auto-split and stored under the appropriate child records.

Email-to-Record Processing

Combine with email ingestion to split documents attached in emails automatically.

Example: A vendor emails a combined invoice PDF. Upon ingestion, it is split into separate invoices and linked to the appropriate PO records.

Community or Partner Portal Uploads

Allow external users to upload large files that are split and processed behind the scenes.

Example: A vendor portal allows bulk upload of certificates. Each is split and stored under relevant compliance records.

File Sync from External Storage

Trigger splits when files are synced from Google Drive, SharePoint, or Dropbox.

Example: A monthly batch of compliance forms synced from SharePoint is automatically split and linked to employee records.

AI Metadata Extraction After Split

Post-splitting, chain another Document AI action to extract metadata from each child file.

Example: Split resumes received as a bulk file, then extract candidate name and role applied for from each and map them into Lead records.

Let CloudFiles Document AI + Document Management & Sharing + Salesforce work together to make your document processing workflows intelligent, scalable, and fully automated.