Description:
The OneDriveGetFile step downloads a specified source file from OneDrive to a local file system location during workflow execution. The step uses a configured OAuth provider to access OneDrive, identifies the source file by name, specifies the local destination path, and stores the resulting information in a Variable or Global variable.
The step supports:
- Selecting an OAuth provider.
- Specifying the name of the OneDrive source file.
- Specifying where to save the downloaded file locally.
- Storing the operation result in a Variable or Global variable.
- Routing the workflow through True and False paths.
Inputs
- Select OAuth provider - Selects the OAuth provider used for the OneDrive operation.
- Name of the source file to be downloaded - Specifies the name of the OneDrive file to download.
- Path to save the file to local machine - Specifies the local file-system path where the downloaded file should be saved.
- Store result in Variable/Global - Specifies the Variable or Global variable in which the operation result is stored.
Returns
- True – The True path can be connected to the next workflow activity after the download operation completes successfully.
- False – The False path can be used for an alternate workflow path when the download operation does not succeed.
Usage:
The Download File step is typically placed after a workflow determines that a file stored in OneDrive needs to be retrieved for local processing.
A typical workflow pattern is:
Identify File → Download File → Process Local File
The workflow supplies the OAuth provider, identifies the OneDrive source file through fileName, specifies the local destination through destinationFilePath, and stores the operation result through resultJson.
The downloaded file can then be used by subsequent workflow activities that operate on files available to the local FlowWright environment.

To use this step, you must configure OneDrive in FlowWright.

The Windows Live OAuth configuration is included here for reference.

Typical Workflow Suggestions:
Download a File for Processing
Use the step when a workflow needs to retrieve a OneDrive file before processing it locally.
Example:
Identify Document → Download File → Process Document
This pattern separates document retrieval from the activities that process its contents.
Retrieve a OneDrive Document
Use the step to bring a document from OneDrive into the local workflow environment.
Example:
Request Received → Download File → Read/Process Document
This can be useful when the next workflow activity requires the document to be available locally.
Download a Report for Further Processing
Use the step when a report stored in OneDrive needs to be processed by a subsequent workflow activity.
Example:
Locate Report → Download File → Analyze Report
You can then pass the downloaded report to the appropriate processing activity.
Download an Input File for Data Processing
Use the step as the file-retrieval portion of a data-processing workflow.
Example:
Download File → Parse File → Process Data
This clearly separates obtaining the file from processing the information it contains.
Retrieve Files for Document Conversion
Use the step before a document conversion or transformation activity.
Example:
Download File → Convert Document → Store Output
The workflow first retrieves the OneDrive source file and then passes the local file to the next processing stage.
Retrieve Files for Integration Processing
Use this step when a OneDrive file must be downloaded before sending its contents to another system.
Example:
Download File → Read File → External Integration
The downloaded file becomes the input to the subsequent integration process.
Download Files for Automated Reporting
Use the step when you need to retrieve an existing OneDrive report and incorporate it into another workflow.
Example:
Download File → Process Report → Generate Summary
This can be useful when the source report is maintained in OneDrive, but processing occurs within FlowWright.
Create a Local Processing Pipeline
Use the step as the first stage of a workflow that performs several operations against a local copy of a OneDrive file.
Example:
Download File → Validate → Transform → Archive
This creates a clear file-processing pipeline beginning with the OneDrive download.
Store the Download Result for Reuse
The resultJson property is specifically provided to store the operation result in a Variable or Global variable.
A typical pattern is:
Download File → Store Result → Subsequent Processing
You can then make the stored result available to later workflow activities.
Handle an Unsuccessful Download
Use the False return path to provide an alternate workflow path.
Example:
Download File → True: Continue / False: Handle Failure
This allows the workflow to distinguish the normal processing path from an unsuccessful download.
Notify an Administrator
For workflows where retrieving a file is critical, connect the False path to an administrator notification activity.
Example:
Download File → False → Notify Administrator
The notification can indicate that the workflow could not process the expected OneDrive file.
Example:
Let’s build and execute the “oneDriveGetFileDef” example.
- Create a new definition called “oneDriveGetFileDef” and open the definition in designer mode.
- Drag a “oneDriveGetFile” step to the canvas.
- Connect the dots between the “Start” and “oneDriveGetFile” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
- Click the “OneDriveGetFileStep” step to configure its “Required” properties. Provide a name for the step. Select “WindowsLive” from the OAuth providers dropdown. Provide the source file path to download. Provide the local file path. Provide a variable or a global to store the result. Click the Save button. Note: Click the "AI Predict" button so Copilot can add new process steps that match your process description.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance and click the Download File step to view its properties. When the workflow reaches the step, FlowWright uses the configured OAuth provider and source/destination values to perform the configured download operation. The operation result is stored using the Variable or Global specified by
resultJson. Inspect the workflow after execution to verify the appropriate return path:- True – Continue the normal workflow.
- False – Follow the configured alternate path.
Tips:
- Verify the OAuth provider. The OAuth provider is required, so ensure that the selected provider is available and correctly configured in the target environment.
-
Verify the source file. Make sure it
fileNameidentifies the intended OneDrive file. -
Check the local destination. Confirm that
destinationFilePathpoints to the intended location on the local machine. - Use meaningful destination paths. Organize downloaded files so that subsequent workflow activities can locate them easily.
- Avoid accidental file conflicts. The XML does not specify how the step handles an existing local file at the destination. Verify the behavior in the deployed implementation.
- Use Variables or Globals for dynamic values. Where appropriate, construct file names or destination paths from workflow data.
- Test with representative files. Test the workflow using files similar to those expected during normal production execution.
- Use the True path deliberately. Connect the True path to the activity that should follow a successful download.
- Provide failure handling. Use the False path for an alternate process when the file cannot be downloaded successfully.
-
Store the result meaningfully. Use a descriptive Variable or Global name for
resultJsonso that later workflow designers understand its purpose. - Check downstream file references. If later activities use the downloaded file, ensure they reference the same local destination configured by the step.
- Consider file permissions. The XML does not specify local file-system permission requirements. Ensure that the FlowWright execution environment can use the configured destination.
- Consider environment-specific paths. Local file-system locations can differ between development, test, and production environments.
- Do not assume recursive or folder behavior. The XML defines a source file name and destination file path but does not document folder downloads or multi-file behavior.
-
Validate the stored result. If subsequent workflow activities depend on
resultJson, verify that the stored value is appropriate for those activities.
Notes:
| Item | Value |
|---|---|
| Category | One Drive |
| Internal Name | onedrivegetfile |
| Label | Download File from OneDrive |
| Display Name | Download File |
| Namespace | FlowWright.Workflow.OneDriveGetFile |
| DLL | FlowWright.Workflow.dll |
| Step Definition Type | Process |
| Incoming Connections | 2 |
| Outgoing Connections | 2 |
| Required Properties | 4 |
| Returns | True, False |
Definition Sample:
When using a sample definition containing the Download File step, verify the following before importing or executing it:
- The OAuth provider referenced by the step is available in the target environment.
- The
fileNameidentifies the intended OneDrive source file. - The
destinationFilePathpoints to an appropriate local location. - The Variable or Global specified for
resultJsonexists or is configured appropriately. - The True and False paths lead to the intended workflow activities.
- Any downstream activities that process the downloaded file reference the appropriate local file.
- Local destination permissions have been reviewed.
- Update environment-specific paths for the target environment.
- Save the definition before creating and executing a workflow instance.