Description:
The OneDriveSendFile step uploads a source file to OneDrive. You specify the OAuth provider used for the connection, the source file path, and the destination path where the file should be saved in OneDrive. The step also provides a property for storing the result as a Variable or Global variable.
The step supports:
- Selecting an OAuth provider.
- Specifying the source file to upload.
- Specifying the destination path in OneDrive.
- Storing the operation result in a Variable or Global variable.
- Connecting subsequent workflow activities through True and False paths.
Inputs
- Select OAuth provider – Selects the OAuth provider used for the OneDrive operation.
- Path of the source file to be uploaded – Specifies the path of the file that should be uploaded.
- Path to save the file in OneDrive – Specifies the destination path where the file should be saved in OneDrive.
- Store result in Variable/Global – Specifies the Variable or Global variable in which the result is stored.
Returns
- True – The True path can be connected to the next workflow activity after the upload operation completes successfully.
- False – The False path can be used for an alternate workflow path or handling an unsuccessful upload operation.
Usage:
The Upload File step is typically placed after a file has been created, generated, retrieved, or otherwise made available to the workflow.
A typical workflow pattern is:
Create/Get File → Upload File → Continue Processing
The source file can be produced by an earlier workflow activity or be an existing file available to the FlowWright environment. The step then uploads that file to the configured OneDrive destination and stores the operation result in the specified Variable or Global variable.
Later workflow activities can then use the stored result for additional processing or workflow decisions.

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

The Windows Live OAuth configuration is included here for reference.

Typical Workflow Suggestions:
Upload a Generated Report
Use the step to upload a report generated by an earlier workflow step.
Example:
Generate Report → Upload File → Notify User
A workflow could generate a report file, upload it to OneDrive, and then continue to a notification activity.
Store Workflow Documents in OneDrive
Use the step to place workflow-generated documents in a designated OneDrive location.
Example:
Create Document → Upload File → Update Workflow Status
This is useful when a workflow produces documents that need to be available through a shared OneDrive location.
Upload an Exported Data File
Use the step after a database or data-processing activity creates an output file.
Example:
Query Data → Create Export File → Upload File
You can then place the generated export in the configured OneDrive destination.
Upload a Workflow Report
Use the step to save recurring workflow reports to OneDrive.
Example:
Collect Results → Build Report → Upload File
Use this pattern for operational reports, processing summaries, or other workflow-generated files.
Archive Workflow Output
Use the step to place workflow output files into a designated OneDrive location.
Example:
Complete Processing → Upload File → Complete Workflow
A workflow can use a consistent destination path for storing files associated with completed processing.
Upload Files for Downstream Users
Use the step when a workflow produces a file that users need to access from OneDrive.
Example:
Generate File → Upload File → Send Notification
The notification step can follow the upload operation and provide users with information about the completed workflow activity.
Upload Multiple Workflow Outputs
For workflows that generate multiple files, you can use the upload step as part of a repeated or sequential file-processing pattern.
Example:
Generate File A → Upload File → Generate File B → Upload File
Each Upload File step can use its own source and destination paths.
Upload Files After Data Processing
Use the step after processing information that results in a file.
Example:
Retrieve Data → Process Data → Create File → Upload File
This separates the data-processing portion of the workflow from the file-storage portion.
Create a Shared Document Workflow
Use the step as the final file-transfer activity in a document-generation process.
Example:
Collect Form Data → Generate Document → Upload File → Notify Team
The workflow can generate a document and then place it in a configured OneDrive location.
Upload Files to Environment-Specific Locations
Use Variables or Globals when the workflow needs to build source or destination values dynamically.
Example:
Build File Path → Upload File → Store Result
This approach keeps file locations configurable rather than embedding every value directly in the workflow definition.
Store the Upload Result for Reuse
The resultJson property explicitly provides a location for storing the operation result in a Variable or Global variable.
A typical pattern is:
Upload File → Store Result → Subsequent Processing
You can then make the stored result available to later workflow activities.
Example:
Let’s build and execute the “OneDriveSendFileDef” example.
- Create a new definition called “OneDriveSendFileDef” and open the definition in designer mode.
- Drag a “OneDriveSendFile” step to the canvas.
- Connect the dots between the “Start” and “OneDriveSendFile” 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 “OneDriveSendFile” step to configure its “Required” properties. Provide a name for the step. Select “WindowsLive” from the OAuth providers dropdown. Provide the source file path (on the app server) to upload. Provide the OneDrive file path to store the file. Provide a variable or a global to store the result. Click the Save button. Note: Click the "AI Predict" button to have Copilot 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 Upload 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 file-upload operation. The result is associated with the Variable or Global specified by Store result in Variable/Global. Use the workflow's True and False paths to control what happens after the operation.
Tips:
-
Verify the source file path. Make sure the source file specified by
sourceFilePathis available to the workflow when the step executes. - Use meaningful destination paths. Organize OneDrive destinations so you can easily locate and manage uploaded files.
- Keep source and destination paths distinct. Clearly distinguish the local/source file location from the OneDrive destination location when configuring the step.
- Use Variables or Globals for dynamic paths. Where appropriate, build paths from workflow values rather than hard-coding every path.
- Test with representative files. Test the workflow with files that resemble those uploaded during normal operation.
- Check the OAuth configuration. The OAuth provider is required, so ensure the appropriate provider is available and correctly configured before running the workflow.
- Use the False path deliberately. Provide an appropriate alternate or error-handling path instead of leaving the False connection unused when upload success matters.
-
Store the result meaningfully. Give the Variable or Global used by
resultJsona meaningful name so that later workflow designers can understand what it contains. - Avoid unnecessary sensitive information in logs. File paths and result information may contain information that should not be exposed in workflow logs.
- Test destination behavior carefully. The XML specifies a destination file path but does not document overwrite, duplicate-file, or existing-file behavior. Verify the behavior in the target FlowWright/OneDrive configuration rather than assuming it.
- Verify path syntax in your environment. The XML describes the inputs as strings but does not define the exact OneDrive path format it accepts. Use the format supported by the configured FlowWright implementation.
-
Validate downstream use of the result. If later steps depend on
resultJsonverify that the stored value is available and suitable for that downstream operation.
Notes:
| Item | Value |
|---|---|
| Category | One Drive |
| Internal Name | onedrivesendfile |
| Label | Upload File to OneDrive |
| Display Name | Upload File |
| Namespace | FlowWright.Workflow.OneDriveSendFile |
| 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 Upload File step, verify the following before importing or executing it:
- The OAuth provider referenced by the step is available in the target environment.
- The source file path points to a valid file the workflow can access.
- The OneDrive destination path is appropriate for the target environment.
- The Variable or Global specified for
resultJsonexists or is configured appropriately. - Any downstream steps that use the stored result are configured correctly.
- The True and False paths lead to the intended workflow activities.
- Review environment-specific file paths and OneDrive destinations before execution.
- Save the definition before creating and executing a workflow instance.