Salesforce Upload file attachment action - The Upload file attachment action enables you to upload a file to a Salesforce record. You can also define the display name and visibility of the uploaded file.

Automation 360

The Upload file attachment action enables you to upload a file to a Salesforce record. You can also define the display name and visibility of the uploaded file.

Before you begin

Ensure that you are authenticated to the Salesforce instance. For more information about authentication, see Authentication action in Salesforce package.

Procedure

  1. From the Actions pane, select Salesforce > Upload file attachment and place it in the canvas.
    The following settings are available in the Upload file attachment action:

    Salesforce Upload File Attachment action

  2. Enter the ID of the Salesforce record to which you want to upload the file in Object's record ID.
    For example, enter 5004W000026rD4HQAU.
  3. Optional: Enter the document ID for the file in Content document record ID.
    Note: Enter the document ID only if you want to upload a new version of an existing file.
  4. Select a location from where you want to upload the file in File to be uploaded.
    • Variable: Choose this option to select a file variable that is mapped to a Control Room file or a desktop file.

      You can also select a file variable that holds a file stream. You can use Assign file action to create a file variable to stream a file available in any Salesforce record. You can also use file stream compatible actions of any out-of-the-box or custom packages to create a file variable to stream a file. For more information about file streaming, see File streaming using file variable. You use this option to upload files using API Tasks.

    • Control Room file: Choose this option to select a file that you uploaded to Control Room.
    • Desktop file: Choose this option to upload a file from your desktop. Click Browse and follow the prompts to select the file.
      Note: The Browse button is not available for API Tasks.
  5. Optional: Enter the text that must be used as the as display name for the uploaded file in Display name.
  6. Select one of the following options in Visibility to set the privacy status of the file.
    • All Users: The file is available to all users who have permission to see the file.
    • Internal Users: The file is available only to internal users who have permission to see the file.
    • Shared Users: The file is available to all users who can see the feed in which the file is posted. Shared Users is used only for files shared with users and is available only when an organization has private org-wide sharing on by default. The Shared Users value is available in API version 32.0 and later.
  7. Enter a session name in Session name.
    By default, Default is set as the session name.
  8. Optional: Select an existing string variable or create a string variable to save the response data in Saves the outcome to a variable.
    For example, you can capture the version of the saved document in a string variable, such as DocVersionID.
  9. 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.
    Click to show the Upload File attachment command action flow