Jump to a Section

Overview

The first time you add a OneDrive card to a Flow, you will need to create a configuration. This will allow you to connect to your account, save your account information, and reuse that configuration next time you build a Flow with the connector. That way, you don’t have to sign in every time you want to build a Flow with this Connector. Instead, use the configuration you have already set up. You can create and save multiple configurations and share them with your teammates.

NOTE: in order to use this connector, you must have a business account; a personal account is not accepted by the OneDrive API.

Here’s how to set up a new configuration in OneDrive:

  1. First, enter in an Account Nickname. This should be unique so if you are connecting multiple OneDrive accounts you will be able to tell them apart.
  2. Then click “Create” to launch a pop-up window where you will sign into your OneDrive Account. This will also save your configuration.

    Events

    • File or Folder Updated

      Monitors any changes to a file or folder, within a parent folder.

      Options

      • Parent Folder ID (text): the id of the parent folder containing folders/files to be monitored.

      Input Fields

      No input fields available.

      Output Fields

      • Output
        • File or Folder ID (text): the id of the file or folder that was updated
        • File or Folder Name (text): the name associated with the updated file or folder
        • Type (text): filetype associated with updated file or folder
        • Created Time (text): timestamp of when the file was created
        • Size (text): size of the file

    Actions

    • Copy File or Folder

      Creates a duplicate file or folder in OneDrive.

      Input Fields

      • Source
        • File or Folder ID (text): The ID of the file/folder to be copied. Can be found by using ‘Search File or Folder’.
      • Destination
        • Folder ID (text): The folder ID where the copy should be placed. Can be found by using ‘Search File or Folder’.
        • New Name (text): A new name for the copy.

      Output Fields

      There are no output fields for this card. 

    • Create Folder

      Creates a new folder in OneDrive.

      Input Fields

      • Folder
        • Name (text): The name of the new folder.
        • Parent Folder ID (text): For nested folders; Folder ID can be found by using ‘Search File or Folder’.
      • Sharing
        • User Email (text): The email of the user the folder will be shared with.
        • Role (text): Either “read” or “write”. Role defaults to read if no value is provided.
        • Require Sign In? (text): If the shared user is required to sign in. Use “true” or “false”.
          • Note: Both ‘Require Sign In?’ and ‘Send Invitation?’ cannot be false at the same time.
        • Send Invitation? (text): If the user is shared by invitation. Use “true” or “false”.
          • Note: Both ‘Require Sign In?’ and ‘Send Invitation?’ cannot be false at the same time.
        • Invitation Message (text): A message that will be sent with the invitation if applicable.

      Output Fields

      • Folder ID (text): The ID for the new folder.
      • Permission ID (text): Permission information.
    • Create Sharing Link

      This action enables you to create a link to a specific file or folder inside of OneDrive that when shared with a user enables to gain access. When creating the sharing link you will determine what accessibility those who are sent the link will be able to have with the file or folder shared.

      Input Fields

      • File or Folder ID (text): Unique ID of the File or Folder you want to create the Sharing Link for.
      • Scope (text): Will accept either or two values defined below anonymous or organizational
        • anonymous: Creates a link to the item accessible to anyone. Anonymous links may be disabled by the tenant administrator.
        • organization: Creates a link to the item accessible within an organization. Organization link scope is not available for OneDrive Personal.
      • Type (text): This accepts one of three different values: view, edit or embed
        • view: Creates a read-only link to the item.
        • edit: Creates a read-write link to the item.
        • embed: Creates an embeddable link to the item. This option is only available for OneDrive Personal.

      Output Fields

      • Link (text): This is a URL of the link for the File or Folder that is to be shared using the parameters set in the inputs above.
    • Delete File or Folder

      Deletes a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The identifier for the file or folder you wish to delete. Can be found by using ‘Search File or Folder’.

      Output Fields

      • There are no output fields for this card. 
    • Download File

      Download a file into the file system.

      Input Fields

      • Input
        • File ID (text): the OneDrive ID for the file; this can be retrieved using the “Search File or Folder” action to find the file or folder by name

      Output Fields

      • Output
        • File Content (file): the file content reference for the file in the file system
    • List Files and Folders

      List Files & Folders

      List all files and folders inside of a given folder.

      Input Fields

      • Input
        • Parent Folder ID (text, REQUIRED): The hash that serves as a file identifier.

      Output Fields

      • Output
        • Children (Collection of Objects) : A collection of objects representing each child item inside the given folder, including both files and folders.
          • File or Folder ID: The ID of the child file or folder
          • Type: The type of the child element- if it’s a file, this will have the value “File”, if it’s a folder, this field will be set to “Folder”
    • List Permissions

      Retrieves Permission IDs for a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The identifier for the file or folder you wish to delete. Can be found by using ‘Search File or Folder’.

      Output Fields

      • Permission IDs (list of text): The unique identifier of the permission among all permissions on the item.
    • Move File or Folder

      Moves a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The identifier for the file or folder you wish to delete. Can be found by using ‘Search File or Folder’.

      Output Fields

      • Folder ID (text): The new folder location of the folder or file.
    • Read File or Folder Metadata

      Obtains Metadata for a file or folder in OneDrive.

      Input Fields

      • Read By
        • File or Folder ID (text): The identifier for the file or folder you wish to delete. Can be found by using ‘Search File or Folder’.

      Output Fields

      • File or Folder
        • Name (text): The name of the file or folder.
        • Description (text): The description provided for the file or folder.
        • Owner ID (text): The ID of the owner of the file or folder.
        • Owner Name (text): The name of the owner of the file or folder.
        • Created Time (text): The time the file or folder was originally created.
        • Updated Time (text): The time the file or folder was updated.
        • Last Updated By User Name (text): The name of the user who updated the file or folder.
        • Last Updated By User ID (text): The ID of the user who updated the file or folder.
        • Size (text): The size of the file or folder.
      • Permissions
        • Shared? (boolean): If the file or folder is shared with other users.
        • Viewer Permission IDs (list of text): Permission IDs for viewers.
        • Editor Permission IDs (list of text): Permission IDs for editors.
    • Read Permission

      Reads permissions for a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The identifier for the file or folder you wish to delete. Can be found by using ‘Search File or Folder’.
      • Permission ID (text): Can be found by using ‘Share File or Folder’  or when you create the file or folder.

      Output Fields

      • User ID (text): The ID of the user the folder/file is shared with.
      • User Name (text): The name of the user the folder/file is shared with.
      • Role (text): Either “read” or “write”.
    • RemovePermissions

      Remove Permissions

      Removes permissions from a file or folder in OneDrive.

      Input Fields

      Both fields are required.

      • File or Folder ID (text): Can be found by using ‘Search File or Folder’.
      • Permission ID (text): The ID for the permission to be deleted. List of permission IDs are provided from ‘List File or Folder Metadata’.

      Output Fields

      • There are no outputs for this card.
    • Rename File or Folder

      Renames a file or folder in OneDrive.

      Input Fields

      • Rename By
        • File or Folder ID (text): The file or folder you wish to rename. Can be found by using ‘Search File or Folder’.
      • Name
        • File Name or Folder Name (text): The new name of the file or folder.

      Output Fields

      • File or Folder
        • Name (text): The name of the file or folder.
        • Description (text): The description provided for the file or folder.
        • Owner ID (text): The ID of the owner of the file or folder.
        • Owner Name (text): The name of the owner of the file or folder.
        • Created Time (text): The time the file or folder was originally created.
        • Updated Time (text): The time the file or folder was updated.
        • Last Updated By User Name (text): The name of the user who updated the file or folder.
        • Last Updated By User ID (text): The ID of the user who updated the file or folder.
        • Size (text): The size of the file or folder.
      • Permissions
        • Shared? (boolean): If the file or folder is shared with other users.
        • Viewer Permission IDs (list of text): Permission IDs for viewers.
        • Editor Permission IDs (list of text): Permission IDs for editors.
    • Search File or Folder

      Search File or Folder

      Upload a file from the designer’s file system to a OneDrive folder.

      Input Fields

      • Input
        • File or Folder Name (text): string to use in searching for a matching file or folder

      Output Fields

      • Output
        • File or Folder ID (text): the OneDrive ID for the file or folder that is found
        • Type (text): indicator if the record found is a file or folder
    • Share File or Folder

      Rename File or Folder

      Shares a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The file or folder you wish to rename. Can be found by using ‘Search File or Folder’.
      • User Email(text):  The email of the user the folder will be shared with.
      • Role(text): Either “read” or “write”. Role defaults to read if no value is provided.
      • Require Sign in?(text): If the shared user is required to sign in. Use “true” or “false”.
        • Note: Both ‘Require Sign In?’ and ‘Send Invitation?’ cannot be false at the same time.
      • Send Invitation?(text): If the user is shared by invitation. Use “true” or “false”.
        • Note: Both ‘Require Sign In?’ and ‘Send Invitation?’ cannot be false at the same time.
      • Invitation Message(text): A message that will be sent with the invitation if applicable.

      Output Fields

      • Permissions
        • Permission ID (text): The identifier for the updated permissions on the file or folder.
    • Update Permission

      Updates the role of a shared user in a file or folder in OneDrive.

      Input Fields

      • File or Folder ID (text): The file or folder you wish to rename. Can be found by using ‘Search File or Folder’.
      • Permission ID (text): The identifier for the updated permissions on the file or folder.
      • Role(text): The new role. Either “read” or “write”. Role defaults to read if no value is provided.

      Output Fields

      • Permission ID (text): The identifier for the updated permissions on the file or folder.
      • Role (text): The new role. Either “read” or “write”. Role defaults to read if no value is provided.
    • Upload File

      Upload File

      Upload a file from this file system to a OneDrive folder.
      Note: File upload is available for items with less than 4 MB of content.

      Input Fields

      • Input
        • Parent Folder ID (text): a OneDrive ID designating the folder in which to upload the file
        • File Name (text): the name of the file to be created (e.g. TestFile.xlsx)
        • File Content (file): the file content reference for the file in the file system

      Output Fields

      • Output
        • File ID (text): the OneDrive ID for the file that is created
        • File Name (text): the name of the file created in OneDrive