Salesforce Upload file attachment action

You can upload a file to a record in Salesforce with the Salesforce Upload file attachment action.

Prerequisites

Note: Ensure that you are authenticated before calling any Salesforce action. For more information about authentication, see Salesforce Authentication action.

Procedure

  1. From the Actions pane, select Salesforce > Upload file attachment and place it in the canvas.
  2. Enter the following fields:
    Salesforce Upload File Attachment action
    1. Enter the Object's record ID to which you want to upload the file. For example: '5004W000026rD4HQAU'.
    2. Enter a Content document record ID (optional).
      It is necessary only when you want to upload a newer version of an existing file.
    3. Select a location from where you want to upload the file. You will be able to select one of the following:
      Control Room file: When you select this option, you can select a file from your Control Room.
      Desktop file: When you select this option, you can select a file from your computer. In this sample, a file is uploaded from a folder in the computer.
      Variable: When you select this option, you can select variable that points to a file.
      Note: Make sure that the file path that you are referring to contains the file with the exact name as entered in this field.
    4. Enter the Display name (Optional) to save the uploaded file in this name.
    5. Set the Visibility as required.
      • AllUsers: The file is available to all users who have permission to see the file.
      • InternalUsers: The file is available only to internal users who have permission to see the file.
      • SharedUsers: The file is available to all users who can see the feed to which the file is posted. SharedUsers is used only for files shared with users and is available only when an org has private org-wide sharing on by default. The SharedUsers value is available in API version 32.0 and later.
    6. Enter Default as the session name.
    7. Save the outcome to a variable. For example, the version of the saved document can be saved in a variable, such as DocVersionID.
  3. To verify, you can run the bot and see whether the file is uploaded to the record in the Salesforce. The following video demonstrates uploading a file from a computer to Salesforce.