Skip to main content

Upload attachment

Upload a local file and link it to a record as a Salesforce File, or upload it as a new version of an existing file.

Command in the Salesforce toolkit · id ooa.salesforce/upload_attachment · 9 inputs (1 required), 2 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 to attach the file to. Not needed when content_document_id is filled in.
PathFileYesFile to upload.
TitleStringNoTitle shown in Salesforce; the file name when empty.
API versionStringNov61.0REST API version.
VisibilityStringNoWho can see the file on the record (AllUsers includes community users); Salesforce's default when empty, AllUsers for new steps. Not used for a new version, which keeps the file's sharing (G6).
DescriptionStringNoDescription stored with the file.
Content document IDStringNoId of an existing file (starts with 069); the upload becomes its new version and keeps the file's links and sharing.

Outputs​

OutputTypeWhat it is
content_version_idStringId of the new file version.
content_document_idStringId of the file itself (filled when visibility or content_document_id is set).