Overview
docuWeaver provides several Apex actions to automate various document processes. For migrating Salesforce files, docuWeaver includes an Apex action called “Migrate to docuWeaver.”
The Migrate to docuWeaver Apex action allows you to migrate existing Salesforce files from your current Salesforce org to the following locations:
Amazon S3
Azure
SharePoint
External Salesforce org
Google Drive
The migration process keeps the record–file association intact.
This action supports migrating files uploaded via Lightning Files only. Classic Attachments are not supported.
Pre-requisites
Required storage profile for storing migrated files must be created in Advance.
Ensure the running user has access to the Apex Action through the appropriate profile or permission set.
Flow Configuration Steps
Open Flow Builder and add an Action element after your desired step (e.g., trigger or screen).
Search for and select your Apex action method (e.g., "Migrate to docuWeaver").
Map Flow variables or static values to input parameters (for example, provide multiple comma separated source content document Ids, assign the record Id, specify the base path, and other settings).
Under Advanced > "Manually assign variables", store outputs in a Flow variable (e.g., collection for
List<Result>).Connect to next elements and activate/debug the Flow.
Test in a Screen Flow or Record-Triggered Flow.
Refer to the Apex Action Documentation for detailed input parameters, including Template Name, Record ID, and optional settings.
Note:
Migration of Salesforce Files depends on the heap size limits provided by Salesforce. Although Salesforce provides a standard heap size 12 MB limit for migrations, files that are close to this limit cannot be migrated reliably because other Salesforce processes also consume a significant portion of heap memory due to governor limits.
Additionally, there are file size limitations based on the storage server being used, as each storage provider processes files differently and consumes heap memory accordingly. For example, when migrating files to Amazon S3, files up to 8-9 MB per file can typically be migrated. However, this limit may vary depending on the storage server in use.


