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
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Instance address (URL) | String | No | Instance URL, e.g. https://yourcompany.my.salesforce.com. | |
| Access token | Credential | No | OAuth access token from the vault. Or leave it empty and choose a connection that signs in, which gets and renews the token. | |
| Record ID | String | No | Id of the record the files belong to. Not needed when content_document_id is filled in. | |
| Download folder | File | No | Folder to save the files in; list only when empty. | |
| API version | String | No | v61.0 | REST API version. |
| Kind | String | No | all | Only Salesforce Files (file), only classic attachments (attachment), or both. |
| Name pattern | String | No | Only files whose name matches this pattern (* and ?, case ignored); all when empty. | |
| Overwrite | Boolean | No | true | Replace files of the same name in the folder; when off, a number is put in front of the new file's name. |
| Content document ID | String | No | Id of one Salesforce File (starts with 069): only that file is listed or downloaded, without a record id (G6). | |
| Extension | String | No | Only files with these extensions, separated by commas (with or without the dot, case ignored); all when empty (G6). |
Outputs
| Output | Type | What it is |
|---|---|---|
| table | Table | Columns: id, name, size, content_type, kind (file or attachment), path. |
| count | Number | Number of files. |
| files | List | Paths of downloaded files (empty when not downloading). |
| path | File | Path of the first downloaded file, e.g. the one file asked for by content_document_id; empty when nothing was saved (G6). |