spCreateFolder Step
Description:
The Create Folder workflow step creates a new folder on a SharePoint site using the configured SharePoint site URL and OAuth provider.
The step supports:
- Creating a new folder on a SharePoint site.
- Configuring the SharePoint site Base URL.
- Selecting an OAuth provider.
- Specifying the SharePoint destination path where the folder should be created.
- Storing the operation result in a Variable or Global variable.
- Returning a success or failure result.
This step can be used for:
- Creating folders for new workflow instances.
- Organizing documents in SharePoint.
- Creating project-specific document folders.
- Creating customer-specific or case-specific folders.
- Preparing SharePoint locations before uploading documents.
- Building automated SharePoint document structures.
- Integrating FlowWright workflows with SharePoint repositories.
Inputs
- BaseURL – The BaseURL for your SharePoint site property specifies the Base URL of the SharePoint site where the folder should be created.
- Select OAuth Provider - The Select OAuth provider property specifies the OAuth provider that FlowWright should use when connecting to SharePoint.
- destinationFilePath – The Path to create folder in your SharePoint site property specifies the destination path where the folder should be created.
- Store Result in Variable/Global – The Store result in Variable/Global property specifies where the result of the folder-creation operation should be stored.
Returns
- True – The True return path represents a successful result from the step.
- False – The False return path represents an unsuccessful result.
Usage:
The Create Folder step is typically used when a workflow needs to establish a SharePoint folder structure before storing documents or other workflow-generated content.
A workflow can dynamically determine the destination path, allowing folders to be created based on information such as a customer, project, case, request, or workflow instance.
The result can be stored in a Variable or Global variable for use by subsequent workflow activities.
Typical uses include:
- Creating customer folders.
- Creating project folders.
- Creating case folders.
- Creating document-management folders.
- Preparing folders before document upload.
- Creating archive locations.
- Organizing workflow-generated documents.
- Building automated SharePoint folder structures.

Typical Workflow Suggestions:
Customer Document Folder
Create a dedicated SharePoint folder when a new customer is onboarded.
Example:
Create Customer → Create Folder → Upload Customer Documents
The destination path can identify the location for the customer's documents.
Project Folder Structure
Use the step to create a SharePoint folder for each new project.
Example:
Create Project → Create Folder → Create Project Documents → Complete
This provides a dedicated SharePoint location for project-related documents.
Case Management
Create a folder when a new case is opened.
Example:
Create Case → Create Folder → Store Case Documents → Process Case
The destination path can be constructed using case-specific information.
Document Upload Preparation
Use Create Folder before a subsequent Create Document operation.
Example:
Generate Document → Create Folder → Create Document → Complete
This pattern is useful when the workflow needs to ensure that a target SharePoint folder exists before uploading a document.
Customer Onboarding
Create a SharePoint location as part of an automated onboarding process.
Example:
Customer Registration → Create Folder → Store Customer Documents → Complete
Compliance Archive
Create a dedicated folder for documents generated during a compliance process.
Example:
Start Compliance Process → Create Folder → Create Document → Archive
Automated Document Organization
Create folders based on workflow information to automatically organize documents.
Example:
Receive Request → Create Folder → Generate Documents → Upload Documents
Workflow Instance Storage
Use a workflow-specific destination to organize files associated with individual process instances.
Example:
Start Process → Create Folder → Generate Output → Store Output
The XML supports the destination path as a configurable string property, allowing the workflow to supply the required destination value.
Failure Handling
Use the False return path to handle unsuccessful folder creation.
Example:
Create Folder → True → Upload Document
↳ False → Log Failure / Notify Administrator
The step explicitly provides True and False return values.
Example:
Let’s build and execute the “spCreateFolderDef” example.
- Create a new definition called “spCreateFolderDef” and open the definition in designer mode.
- Drag a “spCreateFolder” step to the canvas.
- Connect the dots between the “Start” and “spCreateFolder” 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 to store the result.
- Click the "spCreateFolder" step to configure its "Required" properties. Provide a name for the step. Provide the base URL for the SharePoint site. Select the SharePoint provider from the dropdown list. Provide a step-by-step guide to creating a folder on the SharePoint site. Provide a variable or a global variable 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 create a folder on the SharePoint site.
Tips:
- Verify that BaseURL identifies the intended SharePoint site.
- Select the appropriate configured OAuth provider.
- Ensure that the configured OAuth provider has the necessary access to the SharePoint site.
- Provide the correct destination path in Path to create folder in your sharpoint site.
- Use workflow Variables when the folder path needs to be generated dynamically.
- Use meaningful folder names that correspond to the business object being processed.
- Store the operation result in a Variable or Global variable when subsequent workflow logic needs access to it.
- Test the configured SharePoint connection before deploying the workflow.
- Test both the True and False paths.
- Consider adding explicit error logging or notification to the False path.
- Use the Create Folder step before document-creation or document-upload steps when the workflow requires a new destination folder.
- Avoid hard-coding environment-specific SharePoint URLs when the same workflow is deployed across different environments.
- Verify the destination path carefully, particularly when the workflow constructs it dynamically.
- Use consistent folder naming conventions when creating large numbers of workflow-generated folders.
- Test the workflow with representative SharePoint locations before production deployment.
Notes:
The Create Folder step is defined in the SharePoint category with the internal name spcreatefolder, label Create a new folder on the SharePoint site, and display name Create Folder.
The step is implemented by FlowWright.Workflow.SpCreateFolder in FlowWright.Workflow.dll and is a Process step with 2 incoming connections and 2 outgoing connections.
The XML defines four configurable properties, all of which are marked as required.
The BaseURL, destinationFilePath, and resultJson properties use the standard string data type, implemented by FlowWright.DataTypes.ClsTextBox.
The Select OAuth provider property uses the SelOAuthProvider data type, implemented by FlowWright.DataTypes.SelOAuthProvider.
The step provides two predefined return values: False and True.
Definition Sample:
You may download the sample definition(s) from the link provided and import them into your FlowWright Process Definition.
Note: Verify and complete any missing configuration after importing the sample, including:
- SharePoint Base URL
- OAuth provider
- Folder destination path
- Result Variable/Global mapping
- Environment-specific SharePoint settings
- Downstream True and False workflow paths
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.