Import Form PDF as Content Document using Flow (Admin-Oriented)
Overview
Input Parameters
Below are the inputs required when using the FormResponseContentDocAutomation invocable method in a Salesforce Flow. These parameters must be provided to successfully import the PDF as a Content Document on Salesforce.
formResponsePublicId
The ID of the Form_Response__c record from which the PDF will be imported. (Required)
recordId
The ID of the Salesforce Record the Content Document will be linked to. (Required)
filename
The Filename to be assigned to the Content Document.
Flow Setup
This flow is setup to be triggered when a SharinPix Form Response record is created or updated with a value set for ProcessedAt__c and does the following:
Generates a Content Document of the response
Imports the Content Document on Salesforce
Links it to the Form Response's parent record
Step 1: Configure a Record-Triggered Flow
Go to Setup > Flows > Click New Flow
Choose Record-Triggered Flow and click Create
Set the following values:
Object
SharinPix Form Response
Trigger
A record is created or updated
Condition Requirements
All Conditions Are Met (AND)
Field
ProcessedAt
Operator
Is Null
Value
False
When to Run
Only when a record is updated to meet the condition requirements
Optimize Flow For
Actions and Related Records
Add Asynchronous Path
On

This configuration ensures the Flow runs only when the ProcessedAt field on the SharinPix Form Response has a value.
Step 2: Add the Import Action
Add an Action element
Search for
Sharinpix__FormResponseContentDocAutomationSet the input values:
Salesforce record ID to which the Content Document will be linked
{!$Record.sharinpix__ParentRecordId__c}
SharinPix Form Response Public ID
{!$Record.sharinpix__PublicId__c}
Filename of the Content Document
{!$Record.Name}

This step ensures the inspection report PDF is imported directly into the Salesforce Record where the form was launched.
Step 3: Save and Activate
Save the Flow
Click Activate to begin automating PDF imports as Content Documents.

Step 4: Fill and Submit the Form
Once the form has been submitted with the value set for ProcessedAt__c. The Content Document is generated and linked to the parent Salesforce record (where the form was launched) in the Notes & Attachments section.



