Retrieving Blobs From SalesForce

What is the best way to retrieve a blob from Salesforce. It seems this may require an http connection in order to retrieve this and may not be feasible using the standard Salesforce connector. From what I read online it would appear a request like below would be needed to retrieve the blobkey.

Thanks!

https://yourInstance.salesforce.com/services/data/v54.0/sobjects/ContentVersion/068Pn00000CuiibIAB/VersionData

As a follow-up to this, I wanted to provide a sample payload. Im just not sure the best way to retrieve the blob as I believe it would require a GET request, but didnt know if I could do that with an integrator.io connection or would need an http connection specifically to our Salesforce environment.

As always, thanks for any input!

{
"page_of_records": [
{
"record": {
"attributes": {
"type": "ContentDocumentLink",
"url": "/services/data/v54.0/sobjects/ContentDocumentLink/06APn00000DmPr4MAF"
},
"ContentDocumentId": "069Pn00000CWDfxIAH",
"LinkedEntity": {
"attributes": {
"type": "Name",
"url": "/services/data/v54.0/sobjects/Product_Document__c/a8zPn0000000Vi9IAE"
},
"Name": "Plan Brochure Outline - Dental & Vision"
},
"ContentDocument": {
"attributes": {
"type": "ContentDocument",
"url": "/services/data/v54.0/sobjects/ContentDocument/069Pn00000CWDfxIAH"
},
"Title": "Plan Brochure Outline - Dental & Vision",
"LatestPublishedVersionId": "068Pn00000CuiibIAB",
"LatestPublishedVersion": {
"attributes": {
"type": "ContentVersion",
"url": "/services/data/v54.0/sobjects/ContentVersion/068Pn00000CuiibIAB"
},
"Title": "Plan Brochure Outline - Dental & Vision",
"VersionData": "/services/data/v54.0/sobjects/ContentVersion/068Pn00000CuiibIAB/VersionData"
}
},
"LinkedEntityId": "a8zPn0000000Vi9IAE"
}
}
]
}

Dave it is possible to retrieve a salesforce file without using an HTTP connector.

To get a Salesforce file you will have to get the contentVersion and then do a TRANSFER to get the lastest document version.

In this demo I am pulling an Opportunity with 2 files attached.

Then getting the document details so that I can get the latest document version and then pulling the actual blob and posting it to an FTP site.

Note that in my demo I explicitly set the Opportunity ID in my SOQL but if you had multiple opportunities you would have to modify the flow accordingly to pass in the opportunityIDs dynamically

Here is a video showing the process:

https://app.screencast.com/jdauLDDvuabvx

@daveguderian I'm not sure your full use case, but I created a flow to export all documents on a delta that are attached to opportunities. You would just need to put a final file provider import step to upload the blob to its final destination. Also, if you are using something besides opportunities, you can change the SOQL query filter on the export. Here is the template.

P.S. thanks to @kellyizer for doing the leg work here!

Hey Tyler and Kelly-

Thank you both SO much for this. I am still working through this today.

My first question is why are my options different than what I see in Kelly's video and Tyler template when I select TRANSFER (note how the "Operation" is limited to Insert, Update, Upsert)? This to me looks like integrator.io is asking me where I want to transfer/update records INTO Salesforce and not pull from. Do I need to save this step and then re-open to see what you both had?

Also, Tyler I did want to add on that the ultimate destination for these files are AWS S3.

@daveguderian it's "look up additional files (per record)" and not "transfer files into destination application" like @kellyizer stated.

Dave,

Here is an updated video posting the files to S3 and also highlighting the "Lookup additional files per record" options versus "Transfer" I was just using that as an example to show that you can use the transfer option in the Salesforce connector versus needing a HTTP connection. sorry for the confusion

https://app.screencast.com/DBSXMg3Tu7oUJ