Rename a file in the Box

Use this step to rename a file in the box

Last published at: February 13th, 2025

BoxRenameFile Step

Description:

Rename a file stored in Box using an OAuth provider, a file path or File ID, and a new file name.

The BoxRenameFile step is used to rename an existing file stored in Box from within a FlowWright workflow.

The step allows the workflow designer to:

  • Select the OAuth provider used to access Box.
  • Identify the Box file using its Path/FileID.
  • Specify the new name for the file.
  • Store the result of the operation in a FlowWright Variable/Global.
  • Continue the workflow based on the step's True or False return path.

 

Inputs

  • selOAuthProvider - Selects the OAuth provider used to authenticate and access the Box account.
  • Path/FileID of the file to be renamed - Specifies the path or File ID of the Box file that should be renamed.
  • Rename file to - Specifies the new name for the selected Box file.
  • Variable/Global to store the result - Specifies the FlowWright Variable/Global in which the result of the rename operation is stored.
 

 

Returns

  • True – The file rename operation completed successfully.
  • False – The file rename operation did not complete successfully.
 

 

Usage:

The BoxRenameFile step can be used whenever a workflow needs to change the name of a file stored in Box.

A typical workflow pattern is:

Identify Box File → Rename File → Continue Processing

For example, a workflow may initially create or upload a file using a temporary name. After another processing step completes, BoxRenameFile can rename the file to its final business name.

The step can also be combined with Variables/Globals so that the source file path/File ID and the new file name are dynamically determined during workflow execution.

 

 

To use this step, you must first configure Dropbox in FlowWright. Then, go to the Integrate > Connections > OAuth page to create a new OAuth source. 

 

A sample OAuth configuration is provided for reference. 

 

Typical Workflow Suggestions:

Rename a File After Document Processing

Use BoxRenameFile after a workflow finishes processing a document.

For example:

Upload File → Process Document → Rename File → Complete

A temporary file name can be replaced with a meaningful business name once processing has successfully completed.

 

Rename a File Using Workflow Data

Use Variables or Globals to construct the new file name dynamically.

For example, a workflow processing an invoice could generate a name such as:

Invoice_<InvoiceNumber>_<CustomerName>.pdf

The workflow can populate the required Rename file to input before executing the step.

 

Rename Files After Approval

Use the step to change a document's name after it passes an approval process.

For example:

Submit Document → Approval → Rename File → Archive

A document could initially have a working name and receive its final business name after approval.

 

Apply a Status-Based File Name

Use BoxRenameFile when the workflow needs to reflect a document's processing status in its name.

For example, a file could be renamed from:

Contract_123.pdf

to:

Contract_123_Approved.pdf

after an approval step completes.

 

Standardize File Names Before Archiving

Use the step before moving or completing an archival workflow to ensure that files follow a consistent naming convention.

For example:

Identify File → Generate Standard Name → Rename File → Archive/Complete

This can help maintain consistent file naming across documents managed by automated workflows.

 

Example:

Let’s build and execute the “BoxRenameFileDef” example.  

  • Create a new process definition named “BoxRenameFileDef” and open it in designer mode. 
  • Drag a “BoxRenameFile” step to the canvas.
  • Connect the dots between the “Start” and “BoxRenameFile” step 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.
  • Define a variable or a global to store the result.
  • Click the "BoxRenameFile" step to configure its "Required" properties. Provide a name for the step. Select the “Box” OAuth connection provider. Enter the source file name. Enter the new file name. Enter a variable or global reference to store the result after execution. Click the Save button. Note: Click the "AI Predict" button to have the 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. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. When the workflow reaches the BoxRenameFile step, FlowWright uses the selected OAuth provider to access Box and applies the specified new name to the file identified by the supplied path or File ID. The result is stored in the specified Variable/Global, and the workflow follows the appropriate True or False connection.

 

Tips:

  • Use a reliable File ID or path: Ensure that the value supplied to Path/FileID of the file to be renamed identifies the intended Box file.
  • Use Variables/Globals for dynamic names: This allows the workflow to construct file names from process data rather than hard-coding them.
  • Use meaningful naming conventions: Standardized names make files easier to locate and manage in Box.
  • Validate the OAuth provider: Ensure that the selected OAuth provider is configured for the Box account being accessed.
  • Use the return paths: Connect the True and False outputs to appropriate subsequent workflow logic.
  • Store the result: Specify a Variable/Global for the result so that subsequent workflow steps can use the operation result when needed.

 

Definition Sample:

You may download the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page. 

Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after the import. Then, save the definition to confirm the changes. 

Click here to download the sample file.