Skip to main content

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.

TypeRequired
TextYes

Description

The description field on the created File.

Type
Text

File Name (with extension)

The name of the File with the file extension.

info

The file extension is required so that Salesforce knows what type of File to create.

TypeRequired
TextYes

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.

TypeRequired
IDNo, 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.

TypeVariable Name
IDfileId

File IDs

The record ids of the Files created. These IDs refers to a ContentDocument object.

TypeVariable Name
ID CollectionfileIds

File Name

The name of the file created. This is the Title field on the File record.

TypeVariable Name
TextfileName

File Name

The names of the files created. These are the Title field on the File record.

TypeVariable Name
Text CollectionfileNames

Public Distribution URL

This public url provides a preview page for the file where they can view or download the file.

TypeVariable Name
TextpublicDistributionUrl

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.

TypeVariable Name
TextpublicDownloadUrl