Create Folder
UiPath.MicrosoftOffice365.Activities.Files.CreateFolder
Description
Uses the Microsoft Graph Create folder API to create a new folder (FolderName) in a specified parent directory (Destination folder).
After the folder is created, the activity returns a DriveItem object (Folder) that you can use as an input variable in subsequent activities.
Scopes
This activity requires the following scopes:
- Sites.ReadWrite.All
Project compatibility
Windows - Legacy | Windows
Configuring the activity
In the body of the activity
- Folder name - A name for the created folder. This property supports
Stringvariables and string formatted values. - Destination folder - The
DriveItemof the directory in which this folder is created. This object can be retrieved using the Find Files And Folders activity. If you want to create a folder in the root of your drive, leave this property empty. If you want to specify a location other than the root of your drive, use the output property variable from the Find Files and Folders (First or Results). If you're using the Results output property from the Find Files and Folders activity, specify the item in the array that you want to use (e.g., myFolders(0)).
You can save files or folders for later use in the automation using the Get File/Folder activity.
Properties panel
Common
- DisplayName - The display name of the activity in the Designer panel. This property supports
Stringvariables and string formatted values.
Input
- See the options in the body of the activity.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level. This field supports Boolean values.
Options
- Account - The ID or User Principal Name for the user who owns the OneDrive. This parameter must be set for ApplicationIDandSecret and ApplicationIDAndCertificate authentication types.
Output
Reference as - The name used to refer to this folder in other activities.
How it works
The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.
- Complete the steps.
- Add the Microsoft Office 365 Scope activity to your project.
- Add an activity or run an external process that outputs a
DriveItemobject (e.g., Find Files and Folders, Create Workbook, Copy File/Folder). - Add the Create Folder activity inside the Microsoft Office 365 Scope activity.
- Enter values for the Input properties.
- Create and enter a
DriveItemvariable for the Output property. - Run the activity.
- Your input property values are sent to the CreateFolder API.
- The API returns the
DriveItemvalue to your output property variable.