Description:
The OneDriveRenameFile step renames or moves a specified OneDrive file. The step uses a configured OAuth provider to access OneDrive, identifies the file through the configured file path, specifies the new name or path in the Rename File To property, and stores the result in a Variable or Global variable.
The step supports:
- Selecting an OAuth provider.
- Specifying the existing OneDrive file path.
- Specifying the new file name or path.
- 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.
- selOAuthProvider – Specifies the path to the OneDrive file to rename.
- Rename file to - Specifies the new name or path for the file.
- 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 file rename operation completes successfully.
- False – The False path can be used for an alternate workflow path when the operation does not succeed.
Usage:
The Rename File step typically follows a workflow that determines a OneDrive file needs to be renamed, or its destination path needs to change.
A typical workflow pattern is:
Prepare/Validate → Rename File → Continue Process
The workflow supplies the OAuth provider, identifies the existing file through filePath, specifies the new value through renamedTo, and stores the operation result through resultJson.
The step can therefore be used in document-management, file-processing, approval, reporting, and archival workflows where a OneDrive file's name changes as the workflow progresses.

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

The Windows Live OAuth configuration is included here for reference.

Typical Workflow Suggestions:
Rename a Generated Document
Use the step when a document generated by an earlier workflow activity needs a more meaningful or final name.
Example:
Generate Document → Rename File → Continue Process
For example, you can rename a generated file after the document-generation stage has completed.
Rename a File After Approval
Use the step when a file's name should change after an approval process.
Example:
Create Document → Review → Approval → Rename File → Complete
This can help distinguish documents that have progressed beyond the review or approval stage.
Add Business Information to a File Name
Use this step when workflow data can be used to construct a meaningful file name.
Example:
Get Customer Information → Build File Name → Rename File
A workflow could construct a file name based on information such as a customer, project, request, or processing stage.
The renamedTo property is defined as a string, making it suitable for a configured textual value or a workflow-generated value.
Organize Completed Documents
Use the step as part of a document lifecycle in which files are renamed after processing is complete.
Example:
Process Document → Rename File → Archive Processing
A consistent naming convention can make completed documents easier to identify.
Rename Report Files
Use the step after a report has been generated.
Example:
Generate Report → Rename File → Upload/Notify
You can rename a generic generated report to a more descriptive file name before subsequent workflow processing.
Rename Exported Data Files
Use the step after a workflow creates or retrieves an export file.
Example:
Create Export → Rename File → Deliver File
This can be useful when an automatically generated file needs a standardized name before it is delivered or processed further.
Rename Files as Part of a Document Lifecycle
Use the step as one activity in a larger document-management workflow.
Example:
Create → Review → Approve → Rename File → Complete
The file name can reflect the stage the document has reached.
Store the Rename Result for Reuse
The resultJson property is specifically provided to store the operation result in a Variable or Global variable.
A typical pattern is:
Rename File → Store Result → Subsequent Processing
You can then make the stored result available to later workflow activities.
Handle an Unsuccessful Rename
Use the False return path to provide an alternate workflow path.
Example:
Rename File → True: Continue / False: Handle Failure
This keeps the normal processing path separate from the alternative path.
Notify an Administrator
For workflows where successful file renaming matters, connect the False path to an administrator notification activity.
Example:
Rename File → False → Notify Administrator
The notification activity can include details about the workflow operation that needs attention.
Use Dynamic File Paths
Use Variables or Globals when file paths or new names need to be determined dynamically.
Example:
Get File Information → Build Path/Name → Rename File → Continue
This can help keep the workflow adaptable when files vary between workflow instances or environments.
Example:
Let’s build and execute the “oneDriveRenameFileDef” example.
- Create a new definition called “oneDriveRenameFileDef” and open the definition in designer mode.
- Drag a “oneDriveRenameFile” step to the canvas.
- Connect the dots between the “Start” and “oneDriveRenameFile” 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 “OneDriveRenameFile” step to configure its “Settings” properties. Provide a name for the step. Select “WindowsLive” from the OAuth providers dropdown. Provide the file path to rename. Provide a new name. 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 Rename File step to view its properties. When the workflow reaches the step, FlowWright uses the configured OAuth provider and file-path values to perform the configured rename 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.
Definition Sample:
When using a sample definition containing the Rename File step, verify the following before importing or executing it:
- The OAuth provider referenced by the step is available in the target environment.
- The
filePathidentifies the intended OneDrive file. - The
renamedTovalue follows the path/name convention supported by the environment. - The Variable or Global specified for
resultJsonexists or is configured appropriately. - The True and False paths lead to the intended workflow activities.
- Review any downstream activity that refers to the renamed file.
- Check environment-specific OneDrive paths and authentication configuration.
- Save the definition before creating and executing a workflow instance.