Loading

Downloading Files Linked to a Salesforce Record Using MuleSoft Composer

Udgivelsesdato: Jul 14, 2025
Beskrivelse
Steps below can be used to download files linked to a Salesforce record 
Løsning
  • Add a trigger to your Composer flow as per the requirement.
  • Set action as getRecords to fetch Content Document Link records  from Salesforce with a condition where
    "Linked Entity Id"  Equals to {SF Record Id}.
which fetches all files linked to the Salesforce record.
  • Add a for-each loop with "List of ContentDocumentLink Records" as input list to iterate over these junction object records.
  • Set an action card to getRecords to fetch Content Version records from Salesforce with a condition to where
    "Content Document Id" Equals to {ContentDocumentId} from Step2
  • Add another for-each within the first one with "List of ContentVersion Records" as input list to iterate over the actual content of the files one by one.
  • Add an action to "Download file in Salesforce" inside the for-each and set "object Type" as Content Version, it will download the actual content of the file along with other details.
  • Set "File Id" as "ContentVersion ID".
Note: The "Content" field from the output of "Download file in Salesforce" steps contains the actual content of the file and should be used to upload this file to different platforms. 
Vidensartikelnummer

000395511

 
Indlæser
Salesforce Help | Article