Create File
Overview
This Action creates a File (ContentDocument) record and optionally attaches it to a record.
This Action is commonly used with the Signature Component to attach the captured signature to a record.
Inputs
Base64 File
A Base 64 encoded text value of the File to create.
Type | Required |
---|---|
Text | Yes |
Description
The description field on the created File.
Type |
---|
Text |
File Name (with extension)
The name of the File with the file extension.
The file extension is required so that Salesforce knows what type of File to create.
Type | Required |
---|---|
Text | Yes |
Related Record ID
The ID of the record to which the File should be attached. This field is optional, but it is highly recommended to set this value so the File is attached to a record.
Type | Required |
---|---|
ID | No, but highly recommended |
Content Version Files
A list of Content Version records to insert and optionally attached to a record with the Related Record ID
input.
This input is often used with the Email to Flow functionality to attached files from the email to a record in Salesforce.
Type |
---|
Record Collection (ContentVersion) |
Create Public URLs
If set to true, a ContentDistribution record will be created which makes the files publicly accessible.
This currently only works when creating a single file from a Base64 file, such as the output from the Signature Component.
Type |
---|
Boolean |
Outputs
File ID
The record id of the File created. This ID refers to a ContentDocument object.
Type | Variable Name |
---|---|
ID | fileId |
File IDs
The record ids of the Files created. These IDs refers to a ContentDocument object.
Type | Variable Name |
---|---|
ID Collection | fileIds |
File Name
The name of the file created. This is the Title
field on the File record.
Type | Variable Name |
---|---|
Text | fileName |
File Name
The names of the files created. These are the Title
field on the File record.
Type | Variable Name |
---|---|
Text Collection | fileNames |
Public Distribution URL
This public url provides a preview page for the file where they can view or download the file.
Type | Variable Name |
---|---|
Text | publicDistributionUrl |
Public Download URL
This public url provides a direct download to the file. It can also be used in <img>
tags as the src
value.
Type | Variable Name |
---|---|
Text | publicDownloadUrl |