spMoveDocument Step

Use Move Document when a FlowWright workflow needs to relocate a SharePoint document from one path to another as part of document lifecycle management, approval processing, project organization, archival, or workflow-driven document routing.

Last published at: August 20th, 2026

Description:

The Move Document workflow step moves a SharePoint document from a specified source path to a specified destination path.

The step supports:

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

This step can be used for:

  • Document lifecycle management
  • Document archival
  • Project document organization
  • Approval-based document movement
  • Processing-stage organization
  • Customer or case document management
  • Automated SharePoint document organization
  • Workflow-driven document routing

The XML defines the step as a SharePoint process step named spmovedocument, with the display name Move Document, and the label Move a SharePoint document. It is implemented by FlowWright.Workflow.dll in the FlowWright.Workflow.SpMoveDocument namespace.

 

Inputs

  • BaseURL – Specifies the BaseURL for the SharePoint site.
  • selOAuthProvider - Selects the OAuth provider used for the SharePoint operation. 
  • sourceDocPath – Specifies the current path of the document.
  • destinationDocPath - Specifies the destination path for the document.
  • resultJson – Specifies the FlowWright Variable or Global used to store the operation result. 
 

 

Returns

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

 

Usage:

The Move Document step is typically placed after a document has been identified and the workflow has determined it should be relocated.

The workflow can dynamically determine the source and destination paths using Variables, Globals, form values, previous workflow outputs, or information retrieved from external systems.

A typical workflow can be structured as:

Start
 │
 ▼
Identify Document
 │
 ▼
Determine Destination
 │
 ▼
Move Document
 │
 ├──► True ──► Continue Workflow
 │
 └──► False ──► Handle Failure

 

 

The moved document can then be processed by subsequent workflow steps.

 

This usage pattern follows the structure of the reference documentation, in which a workflow step is introduced after the required data has been collected, and its output is subsequently used for routing, decisions, variables, notifications, or additional processing.

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

 

A sample SharePoint OAuth configuration is included here for reference.

 

Typical Workflow Suggestions.

Move an Approved Document

Use Move Document after an approval step to relocate an approved document.

Start
  │
  ▼
Submit Document
  │
  ▼
Approval
  │
  ▼
Move Document
  │
  ▼
Approved Documents
 

For example, documents can be moved from an active working area to an approved document library or folder.

 

Move a Document After Processing

Use the step after document processing has completed.

Receive Document
      │
      ▼
Process Document
      │
      ▼
Validate Result
      │
      ▼
Move Document
      │
      ▼
Continue
 

This can help distinguish documents that have completed processing from those still being worked on.

 

Document Lifecycle Management

Use document movement to represent changes in the document lifecycle.

Draft
 │
 ▼
Review
 │
 ▼
Approved
 │
 ▼
Move Document
 │
 ▼
Published
 

The source and destination paths can represent different stages of the document lifecycle.

 

Project Document Organization

Use Move Document to organize project documents as a project progresses.

Project Created
      │
      ▼
Working Documents
      │
      ▼
Project Review
      │
      ▼
Move Document
      │
      ▼
Completed Documents
 

This is particularly useful when a project's SharePoint repository has separate areas for active and completed documents.

 

Customer or Case Document Routing

Use the step to move documents between customer or case folders based on workflow status.

New Case
   │
   ▼
Process Case
   │
   ▼
Determine Destination
   │
   ▼
Move Document
   │
   ▼
Active Case Documents
 

The destination can be determined dynamically from workflow data.

 

Archive Documents

Use Move Document as part of a document archival workflow.

Identify Document
       │
       ▼
Check Archive Criteria
       │
       ▼
Determine Archive Path
       │
       ▼
Move Document
       │
       ▼
Record Result
 

This allows completed or archived documents to be moved into a dedicated SharePoint location.

 

Dynamically Determine the Destination

Use workflow data to determine the destination path.

Start
  │
  ▼
Read Document Information
  │
  ▼
Determine Destination
  │
  ▼
Move Document
  │
  ▼
Continue Workflow
 

For example, the destination could depend on:

  • Project
  • Customer
  • Department
  • Document status
  • Reporting period
  • Business unit
  • Processing stage

The XML explicitly provides independent source and destination document path properties.

 

Handle Move Results

Use the True and False paths to distinguish successful and unsuccessful move operations.

 
                  ┌──► True ──► Log Success ──► Continue
                  │
Move Document ────┤
                  │
                  └──► False ──► Log Failure ──► Error Handling
 

The XML explicitly defines both return values.

 

Example:

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

  • Create a new definition called “spMoveDocumentDef” and open the definition in designer mode. 
  • Drag a “spMoveDocument” step to the canvas.
  • Connect the dots between the “Start” and “spMoveDocument” steps, as shown above. 
  • Select the line between the steps to configure the “Connection Properties”. The default property values are “None, 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.
  • Click the "spMoveDocument" step to configure its "Required" properties. Provide a name for the step. Provide the base URL for the SharePoint site. Select an OAuth provider from the dropdown list. Provide the source file path of the document to move. Provide the destination file path. Provide a variable or a global 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, and execute it. Render the process instance. Click the process step to view its properties. The step should move a SharePoint document from one location to another.

 

Tips:

  • Verify the SharePoint BaseURL before executing the workflow.
  • Select the correct OAuth provider.
  • Verify that the source document path identifies the intended document.
  • Verify that the destination document path is valid.
  • Ensure the destination path is appropriate for the document being moved.
  • Use Variables or Globals when source or destination paths need to be generated dynamically.
  • Store the result in a clearly named Variable or Global.
  • Use the False return path for appropriate failure handling.
  • Test SharePoint authentication and both paths before deploying the workflow.
  • Consider downstream workflow activities that reference the document's original location.
  • Update any workflow data or references that depend on the document's previous path.
  • Use consistent SharePoint document structures when document movement is part of a lifecycle workflow.
  • Test with representative documents before moving production documents.
  • The XML does not define the exact path syntax or runtime behavior, so verify these details against the FlowWright SharePoint implementation.

 

Notes:

  • The step belongs to the SharePoint category. 
  • The display name is Move Document
  • The step name is spmovedocument
  • The step label is Move a SharePoint document
  • The namespace is FlowWright.Workflow.SpMoveDocument
  • 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 source path of the document to be moved is required.
  • The destination path of the document to be moved is required.
  • Storing the result in a Variable/Global is required. 
  • The OAuth provider uses the SelOAuthProvider data type. 
  • The string properties use the FlowWright.DataTypes.ClsTextBox implementation. 
  • The step provides True and False return values. 
  • The XML does not specify the exact SharePoint document-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.

 

A useful pattern for the Move Document step is to separate document identification, destination determination, SharePoint processing, and result handling.

This pattern separates the decision about where the document should go from the actual SharePoint operation.

 

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.