/
OneDrive

OneDrive

 



Connect To OneDrive

This activity connects to the specified OneDrive account and outputs a OneDrive client connection.

Activity Parameters

The Connect to OneDrive activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Access URL (text box editor type): the URL containing the access token. This access token can be get by using Flowster Portal and a workflow with at least one argument, by following the next steps:
    • OneDrive: create an App. It should automatically provide a new App Client ID:



    • Administrator: create a workflow with one argument
    • Administrator - Edit Parameters: set the argument to Cloud → OneDrive type and insert the Client ID in the required field


    • Administrator: make the workflow active
    • Portal: start the workflow and inside the Start workflow window click the Click Here option:


    • A new window will be opened, asking for access to the OneDrive account information
    • Click Accept and copy the URL address:


    • Workflow Connect To OneDrive activity: insert the link into the Access URL field:


The Read Only Output variable are the possible output values that the activity will provide:

  • Connection: outputs a OneDrive connection. The Ouput of this activity should be used as Input for all Connection parameters used for all activities placed under OneDrive category.
 
Execution: the activity will establish a connection to the OneDrive App by using the provided Access Token:
NOTE: the token has expiration time. If the activity fails to connect, redo the steps regarding the Access Token get.




Delete File or Folder

This activity deletes the specified file or folder from the specified OneDrive account.

Activity Parameters

The Delete File or Folder activity parameters can be provided by manual inserted values or via IN arguments or variables:

All of the input parameters are mandatory.

Parameters:

  • File or Folder Path (text box editor type): the full path of the file or folder which you want to be deleted. E.g. "Documents/FlowsterMSSQLActivities.bak".

The Read Only Output variable are the possible output values that the activity will provide:

  • Output status: outputs the result status. If the item was deleted successfully then TRUE, otherwise FALSE.
 

Execution: the activity will delete the given file from OneDrive:







Disconnect From OneDrive

This activity disconnects the specified OneDrive account.

Activity Parameters

The Disconnect from OneDrive activity parameters can be provided by manual inserted values or via IN arguments or variables:

All of the input parameters are mandatory.

Parameters:

  • Connection (text box editor type): the OneDrive connection, obtained after using a Connect to OneDrive activity.



Download File

This activity downloads the specified OneDrive file.

Activity Parameters

The Download File activity parameters can be provided by manual inserted values or via IN arguments or variables:

All of the input parameters are mandatory.

Parameters:

  • Destination Folder Path (text box editor type): the path of the folder where you wish to download the file.
  • File Path (text box editor type): the full path of the existing file on the OneDrive account, which you wish to download. E.g. Documents/FlowsterMSSQLActivities.bak.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output: outputs the Full path.
  • Output Status: outputs the result status. If the item was downloaded successfully then TRUE, otherwise FALSE.
 
Execution: the activity will download the OneDrive file to the given location (for example, to a local path):




List Files and Folders

This activity lists all files and folders from the specified OneDrive account.

Activity Parameters

The List Files and Folders activity parameters can be provided by manual inserted values or via IN arguments or variables:

Parameters:

  • Document Type (combo box editor type): the document type which you would like to be listed. Flowster Studio provides Files, Folders and All as options.
  • Parent Folder (combo box editor type): the full path of the folder from where you want to list all the Sub Items. E.g. Folder/SubFolder. If left with the default value "", it will list all the items from the Home directory.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output (type: Collection<Collection<String>>): outputs a collection of Document Type items and their properties.To use the elements of the collection, use For Each and/or Get Element From Collection activities.
  • Output full paths (type: Collection<String>): outputs a collection of paths found in the parent folder. To use the elements of the collection, use a Get Element From Collection activity.
  • Output rows count (type: Int32): outputs the number of files and folders found on the specified OneDrive account.


Execution: the activity will list all items from the account where it is connected to (in our case, both Files and Folders):


Using For Each activities to get the elements from the Type Items collection:

  • a first For Each activity to extract a single Collection from the main Collection:


  • a second For Each activity to extract the values from the second collection:


 Using For Each and Get Element From Collection activities to extract the elements from the Type Items collection:

  • a For Each activity to extract a single Collection from the main Collection:


  • a Get Element From Collection activity to extract the values from the second collection:


Using For Each activity to extract the values from the Paths collection:


Using Get Element From Collection to extract the values from the Paths collection:


 





Upload File

This activity uploads a selected file to the specified OneDrive account.

Activity Parameters

The Upload File activity parameters can be provided by manual inserted values or via IN arguments or variables:

All of the input parameters are mandatory.

Parameters:

  • File Path (text box editor type): the full path of the file that you wish to upload. The maximum allowed file size is 100 MB.
  • Parent Folder (combo box control): directory on OneDrive where you wish to upload the file. If left blank it will upload the file to the Public directory. E.g. Documents.

The Read Only Output variable are the possible output values that the activity will provide:

  • Output (type: string): outputs the full path of the newly updated file.
  • Output status: outputs result status. If the item was uploaded successfully then TRUE, otherwise FALSE.
 
Execution: the activity uploads the given file at the given OneDrive location:


The uploaded file can be seen on OneDrive:


Related content