spRenameFolder Step

Use Rename Folder when a FlowWright workflow needs to change the name of an existing SharePoint folder as part of a document, project, lifecycle, or business process.

Last published at: August 20th, 2026

Description:

The Rename Folder workflow step renames an existing folder in a SharePoint site.

The step provides configuration for:

  • Specifying the BaseURL for the SharePoint site.
  • Selecting an OAuth provider for SharePoint authentication.
  • Specifying the path of the folder to be renamed.
  • Specifying the new name for the folder.
  • Storing the operation result in a FlowWright Variable or Global.
  • Routing the workflow through True or False return paths.

The step is categorized as a SharePoint process step. It is implemented by FlowWright.Workflow.dll and uses the FlowWright.Workflow.SpRenameFolder namespace.

 

Inputs

  • BaseURL – Specifies the BaseURL for the SharePoint site.
  • selOAuthProvider  - Selects the OAuth provider used to access SharePoint.
  • folderPath – Specifies the path of the SharePoint folder to rename.
  • renamedTo – Specifies the new name for the folder. 
  • resultJson – Specifies the FlowWright Variable or Global in which the operation result is stored. 
 

 

Returns

  • True – Step executed successfully
  • False – Step failed to execute 
 

 

Usage:

The Rename Folder step is typically used when a FlowWright workflow needs to rename an existing folder in SharePoint.

A typical workflow can be structured as:

Start
 │
 ▼
Identify Folder
 │
 ▼
Determine New Name
 │
 ▼
Rename Folder
 │
 ├──► True ──► Continue Workflow
 │
 └──► False ──► Error Handling

 

 

The step requires the SharePoint site BaseURL, OAuth provider, folder path, new folder name, and result destination.

 

This makes it useful in workflows where folder names represent a business state, processing stage, reporting period, customer, project, or other dynamically changing information.

To use this step, configure SharePoint with Flowwright OAuth connections.

 

A sample SharePoint OAuth configuration is included here for reference.

 

Typical Workflow Suggestions.

Rename a Folder After Process Completion

Use the Rename Folder step when a SharePoint folder should be renamed after workflow processing is complete.

Start
  │
  ▼
Process Documents
  │
  ▼
Complete Processing
  │
  ▼
Rename Folder
  │
  ▼
Continue
 

For example, a folder named InProgress can be renamed after all processing has completed.

 

Document Lifecycle Management

Use Rename Folder to reflect the current lifecycle state of a document collection.

Documents
   │
   ▼
InProgress
   │
   ▼
Processing
   │
   ▼
Rename Folder
   │
   ▼
Completed
 

This approach can make the SharePoint folder structure reflect workflow status.

 

Project Folder Management

Use the step to rename project folders when the project moves between stages.

Project Created
      │
      ▼
Project Processing
      │
      ▼
Project Approved
      │
      ▼
Rename Folder
      │
      ▼
Project Completed
 

The new folder name can be supplied from workflow data through a FlowWright Variable or Global.

 

Period-Based Folder Organization

Use Rename Folder when folders represent a reporting or processing period.

Current Period
     │
     ▼
Process Data
     │
     ▼
Rename Folder
     │
     ▼
Archive Period
 

For example, a folder representing an active reporting period could be renamed when the period is closed.

 

Rename Customer Folders

Use this step when a customer folder needs to reflect a change in customer or account status.

Customer Folder
      │
      ▼
Process Customer
      │
      ▼
Determine New Status
      │
      ▼
Rename Folder
      │
      ▼
Continue
 

The workflow can determine the appropriate new name before executing the SharePoint operation.

 

Dynamic Folder Naming

Use workflow Variables or Globals to determine the new folder name.

Start
  │
  ▼
Determine Folder Name
  │
  ▼
Rename Folder
  │
  ▼
Store Result
  │
  ▼
Continue
 

This is useful when the folder name depends on information collected or calculated during workflow execution.

The XML confirms that the new folder name is supplied through the renamedTo string property.

 

Handle Rename Failures

Use the True and False paths to provide explicit success and failure processing.

 
                  ┌──► True ──► Log Success ──► Continue
                  │
Rename Folder ────┤
                  │
                  └──► False ──► Log Failure ──► Error Handling
 

The step explicitly defines both return paths.

 

Example:

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

  • Create a new definition called “spRenameFolderDef” and open the definition in designer mode. 
  • Drag a “spRenameFolder” step to the canvas.
  • Connect the dots between the “Start” and “spRenameFolder” 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, additional values are available for configuration. 
  • Define a variable or a global variable to store the file path and the result after execution.
  • Click the "spRenameFolder" step to configure its "Required" properties. Provide a name for the step. Provide the base URL for your SharePoint site. Select the SharePoint OAuth provider from the dropdown. Provide the folder path to rename and the new name. Provide a variable or a global reference to store the result. Click the Save button. Note: Click the "AI Predict" button for the Copilot to 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 in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, execute it, and then render the process instance. The process step should rename the folder on the SharePoint site as configured.

 

Tips:

  • Specify the correct SharePoint BaseURL.
  • Select the appropriate OAuth provider.
  • Verify the folder path before executing the workflow.
  • Specify only the intended new folder name in Rename Folder to.
  • Use a meaningful Variable or Global to store the result.
  • Confirm that the target folder exists before attempting to rename it.
  • Consider adding appropriate error handling to the False return path.
  • Use workflow Variables or Globals when the new folder name is determined dynamically.
  • Test the SharePoint authentication and folder path configuration before deploying the workflow.
  • Be careful when renaming folders that may be referenced by subsequent workflow activities.
  • Use consistent folder-naming conventions when Rename Folder is part of a document-management workflow.
  • Do not infer the exact result structure from the XML; the XML only establishes the result-storage property.

 

Notes:

  • The step belongs to the Sharepoint category. 
  • The display name is Rename Folder.
  • The step name is sprenamefolder.
  • The step label is Rename a SharePoint folder
  • The namespace is FlowWright.Workflow.SpRenameFolder.
  • The step is implemented by FlowWright.Workflow.dll
  • The step is defined as a Process step.
  • The definition specifies two input connections and two output connections. 
  • BaseURL is required.
  • Select OAuth provider is required.
  • The path to the folder to be renamed is required.
  • Rename Folder to is required.
  • Storing the result in a Variable/Global is required. 
  • The OAuth provider uses the SelOAuthProvider data type. 
  • The step provides True and False return values. 
  • The standard string properties use the FlowWright.DataTypes.ClsTextBox implementation. 
  • The XML does not specify the exact SharePoint folder-path syntax.
  • The XML does not specify the exact structure of the result stored in the configured Variable or Global.
  • The XML does not specify the runtime conditions that produce the True or False result.
  • The XML does not document handling of authentication failures, SharePoint API errors, retries, timeouts, or cancellation behavior. Such behavior should be verified against the applicable FlowWright implementation or runtime documentation.

 

A useful pattern for the Rename Folder step is to separate the identification of the folder, the determination of its new name, the SharePoint operation, and the subsequent processing.

This pattern makes the SharePoint folder operation explicit and provides a clear place to handle a failed rename.

 

Definition Sample:

You may download the sample definition(s) from the link here and later import them (drag-and-drop) to 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.