Upload Files

Estimated reading: 3 minutes

The Upload Files activity uploads one or more files to a designated location within a SharePoint document library.

Prerequisites

A valid Project Key is required in the Publish Console to access and publish workflows successfully.

Activity Details in Canvas

Microsoft 365*: Select a Microsoft 365 account from the available connections. The selected account is used to authenticate and access SharePoint.

File(s): Select the file(s) to upload. You can browse and choose one or more files from your local system.
Example: {“C:\\Users\\DemoUser\\Documents\\ProjectProposal.pdf”, “C:\\Users\\DemoUser\\Documents\\Requirements.xlsx”}

Destination Folder: Select the destination folder in the SharePoint document library where the file or folder will be uploaded. You can browse the document library and choose the required folder from the available list.

Properties

INPUT

If file already exists: Select how to handle a file with the same name in the destination folder:
Replace: Overwrite the existing file.
Don’t Replace: Skip the operation and keep the existing file unchanged.
Auto Rename: Automatically rename the new file to avoid a naming conflict.

Metadata for uploaded files: Specifies the metadata to associate with the uploaded files. This property applies only to files stored in a SharePoint document library and supports DataTable variables.

To provide metadata, create a Data Table using the Build Data Table activity with the following columns:
FieldName (String) – Specifies the name of an existing SharePoint column.
FieldValue (Object) – Specifies the value to be assigned to the corresponding SharePoint column.

Assign the DataTable output to a variable and provide the variable in the Metadata property.

Ensure that each FieldName matches an existing column in the SharePoint document library. For custom metadata, create the custom column in SharePoint first, then specify its name in FieldName and provide the value to be inserted in FieldValue.

Example: If the SharePoint library contains a custom column named Department, specify Department as the FieldName and provide a value such as Finance in FieldValue.

MISC

DisplayName: Specifies the display name of the activity. This value can be customized to improve workflow readability and troubleshooting.

SkipOnError: Specifies whether the workflow execution should continue when the activity encounters an error.
True: The workflow continues execution even if an error occurs.
False: The workflow stops execution when an error occurs.
None: The default value is set to False.

Version: Displays the current version of the activity.

OUTPUT

File List (List<o365DriveRemoteItem>): Specify a variable to store the details of all uploaded files. The variable is populated after the activity executes successfully and can be used to access the uploaded files’ information in later workflow steps.

First File (o365DriveRemoteItem): Specify a variable to store the details of the uploaded file. The variable is populated after the activity executes successfully and can be used to access the file’s information in later workflow steps.

Result: Returns a Boolean value indicating the execution status of the activity.
True: The activity executed successfully.
False: The activity failed due to an unexpected error.

Share this Doc

Upload Files

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online