File Explorer - File Operations
Automate file management from Salesforce Flow with the GM - File Operation action.
Introduction
GM File Connect - File Operations is a GridMate Flow action that lets you manage files from your automations: upload files, attach files to records, and create folders, in Salesforce Files or in a cloud storage like Google Drive, SharePoint, Box, Dropbox, and Amazon S3.
The action is available in Flow Builder as GM - File Operation. Each run returns the IDs of the folders, files, or links it created, so later steps of the same Flow can use them. For example, you can create a folder, then create subfolders or upload files inside it.
Operations
ATTACH_FILE
Salesforce Files
Attaches existing Salesforce files to a record.
UPLOAD_FILE
Salesforce Files
Uploads a new file and attaches it to a record. Optionally adds it to a Library and folder.
CREATE_FOLDER
Salesforce Library
Creates a folder in a Salesforce Library. If the folder already exists, the existing folder is returned.
ATTACH_CLOUD_FILE
Cloud storage
Attaches cloud files to a record.
UPLOAD_CLOUD_FILE
Cloud storage
Uploads a file to the cloud storage.
CREATE_CLOUD_FOLDER
Cloud storage
Creates a folder in the cloud storage. Not supported on Amazon S3.
Inputs
Operation Type
Required. One of the operations listed above.
Record ID
Target record. Required for ATTACH_FILE, ATTACH_CLOUD_FILE and UPLOAD_FILE.
File IDs
Files to attach. Required for ATTACH_FILE and ATTACH_CLOUD_FILE.
File Metadata
JSON describing the file to upload (name, target folder). Required for UPLOAD_FILE and UPLOAD_CLOUD_FILE.
File Content
Base64 encoded file content. Required for UPLOAD_FILE and UPLOAD_CLOUD_FILE.
Folder Name
Name of the folder. Required for CREATE_FOLDER and CREATE_CLOUD_FOLDER.
Library Name
Salesforce Library name. Required for CREATE_FOLDER, optional for UPLOAD_FILE.
Parent Folder ID
Optional. Folder in which the new folder is created. If empty, the folder is created at the root.
Cloud Storage Cfg
Name of the Connect Config record. Required for cloud operations.
Outputs
Success
True when the operation succeeded.
Message
Success or error message.
Created IDs
IDs of the created folders, files, or links, as a text collection. For Amazon S3 uploads, the object key.
Example: Create Project Folders
In this example, a sales rep creates a project folder in Google Drive for an Opportunity, with Contracts and Invoices folders inside it, from a single click on the record page.
The flow: GM - Create Project Folders is a screen flow launched from an Opportunity quick action. It asks for a folder name (the Opportunity name by default), creates the folder in Google Drive, then uses the Created IDs output to create the Contracts and Invoices folders inside it. A final screen confirms the folders are ready, or shows the error message if something went wrong.
Get Records: get the Opportunity using
recordId.Screen: ask for the Folder Name.
Action GM - File Operation: create the project folder.
Operation Type:
CREATE_CLOUD_FOLDERCloud Storage Cfg:
gdriveFolder Name: the folder name from the screen
Decision: check the Success output.
Loop over Created IDs and assign the value to a
ProjectFolderIdvariable.Action GM - File Operation (twice): create the Contracts and Invoices folders.
Operation Type:
CREATE_CLOUD_FOLDERCloud Storage Cfg:
gdriveFolder Name:
Contracts/InvoicesParent Folder ID:
{!ProjectFolderId}
Screen: confirm that the folders are ready.

How to add the action
Next steps
Demo
Below is a quick demo of File Connect - File Operations, where the user creates a project folder and its subfolders in Google Drive from a single Flow, without leaving the Opportunity record page
Last updated
Was this helpful?