Skip to content

Folders

Folders manages the folders in your OneDrive: it lists the subfolders of a folder, creates new folders, deletes the ones you no longer need and shares them with other people.

It is useful for keeping OneDrive organised automatically, for example by creating a folder for each client or project as soon as it is set up, and sharing it with the people who will work in it.

When to use it

  • Every time you add a new client, you want to create their folder in OneDrive.
  • When a project starts, you want to share its folder with the team running it.
  • You want to list the folders in a directory to go through them in a flow.
  • When you close a case, you want to delete the temporary folder that was used.

Configuration

You need a Microsoft One Drive credential, which connects by signing in with your Microsoft account. To create, delete or share folders, choose the Read, Create, Update and Delete access when you create it. See Credentials.

FieldWhat it does
Credential (required)The Microsoft One Drive credential used to access your folders.
Operation (required)What the component does. See Operations. By default, Get Folders.
Selection ModeHow you point to the starting folder in Get Folders and Create Folder: By Selector (you pick it in Parent folder), By Path (you type its path, for example /Projects) or By URL (you paste its OneDrive or SharePoint link). By Folder Id shows by default; change it to one of these three.
Parent PathThe path or link of the starting folder, depending on Selection Mode. Empty means the root folder of your OneDrive. In Get Folders and Create Folder.
Folder NameThe name of the new folder. Only in Create Folder.
Folder IDThe identifier of the folder you delete or share. You can get it with Get Folders. In Delete Folder and Share Folder.
Share withThe email addresses of the people you share the folder with, separated by commas. Only in Share Folder.
Permission RoleWhat those people can do: read (view), write (edit) or owner. By default, read. Only in Share Folder.
Share MessageAn optional message included in the invitation. Only in Share Folder.

Operations

OperationWhat it does
Get FoldersLists the subfolders of the starting folder, with their identifier, name, link, dates and size.
Create FolderCreates a folder inside the starting folder.
Delete FolderDeletes a folder and everything in it.
Share FolderShares a folder with one or more people and sends them an email invitation.

Output

The Data output returns one item for each folder listed, or a single item with the result of the operation: the folder created with its identifier and link, the confirmation of the deletion or the details of the permission granted when sharing.

You can connect the result to Files to upload files to the new folder, or to an email component to notify someone. The component can also be connected to an Agent as a tool, so the agent decides when to create or share folders. See Tool Mode.

Example

A marketing agency creates a folder for each new client and shares it with their account manager.

  1. Add Folders with the Create Folder operation and the agency’s Microsoft One Drive credential.
  2. In Selection Mode, choose By Path; in Parent Path, type /Clients; and in Folder Name, the client name coming from the sign-up form.
  3. Add another Folders with the Share Folder operation, give it the new folder’s identifier in Folder ID and the account manager’s email in Share with, with Permission Role set to write.

Good practices

  • Delete Folder also deletes every file in the folder and does not ask for confirmation.
  • Share with read whenever the other person only needs to look at the files.
  • Files: read, upload and manage OneDrive files.
  • Search: search for files in OneDrive.
  • OneDrive Webhook: start a flow when a file changes.