Skip to main content

Get attachments

List the files and classic attachments on a record, or one file by its id, and optionally download them to a folder.

Command in the Salesforce toolkit · id ooa.salesforce/get_attachments · 10 inputs, 4 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Instance address (URL)StringNoInstance URL, e.g. https://yourcompany.my.salesforce.com.
Access tokenCredentialNoOAuth access token from the vault. Or leave it empty and choose a connection that signs in, which gets and renews the token.
Record IDStringNoId of the record the files belong to. Not needed when content_document_id is filled in.
Download folderFileNoFolder to save the files in; list only when empty.
API versionStringNov61.0REST API version.
KindStringNoallOnly Salesforce Files (file), only classic attachments (attachment), or both.
Name patternStringNoOnly files whose name matches this pattern (* and ?, case ignored); all when empty.
OverwriteBooleanNotrueReplace files of the same name in the folder; when off, a number is put in front of the new file's name.
Content document IDStringNoId of one Salesforce File (starts with 069): only that file is listed or downloaded, without a record id (G6).
ExtensionStringNoOnly files with these extensions, separated by commas (with or without the dot, case ignored); all when empty (G6).

Outputs​

OutputTypeWhat it is
tableTableColumns: id, name, size, content_type, kind (file or attachment), path.
countNumberNumber of files.
filesListPaths of downloaded files (empty when not downloading).
pathFilePath of the first downloaded file, e.g. the one file asked for by content_document_id; empty when nothing was saved (G6).