This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
hi,
I have a requirement where I need to download the attachment from Salesforce. I ran the query from the Attachment table. I can see the details like file name, etc from the below column.
I am not sure how to download the files or retreive the data from the file name.
I'm not sure if attachments can be downloaded directly from the SalesForce input tool (someone please correct me if this is possible). However, SalesForce has the SObjects API endpoints where attachments can be downloaded from: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_blob_retr...
Here is an example of using this endpoint for pulling an attachment: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_blob_retrieve....
This Alteryx link covers how to do it: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Salesforce-blobs/td-p/31200
This comment in particular:
ParentId | Id | Name | ContentType | Body |
001a000001JsueBAAX | 00Pa000000cuTnJXXX | Cover.jpg | image/jpeg | /services/data/v20.0/sobjects/Attachment/00Pa000000cuTnJXXX/Body |
https://csXX.salesforce.com/services/data/v20.0/sobjects/Attachment/00Pa000000cuTnJXXX/Body
So I think that you could pull the authentication step out of the deprecated SalesForce macro to get your bearer token and then pass that into a subsequent download tool to pull all of the files that you need.