Skip to content

SharePoint - Create Folder

Create a new folder in an approved SharePoint document library and return its ID and web link. The action stops if the name already exists.

Current published action version 1.2

When to use it

  • Create a client, case, project, or process folder from a HighLevel workflow.
  • Create one folder when a duplicate should be treated as a conflict rather than silently reused.

Before you start

  • A connected Microsoft 365 connection for this HighLevel Location.
  • The Drive ID of the approved SharePoint document library.
  • A parent folder path when the new folder should not be created at the library root.

In the connected Location, open your workflow, add this named action, enter the values below, and save. Use the Custom Value Picker for dynamic inputs and earlier action outputs.

Inputs

Enter these values in the action
InputHow to configure it
Document Library (Drive ID)
drive_idRequired · string

Microsoft Graph Drive ID for the SharePoint document library. The Drive ID identifies the library itself and can be reused across workflow actions.

Example: b!exampleDocumentsDriveId

Parent Folder Path
parent_folder_pathOptional · string

Folder path inside the selected document library, for example Customers/Acme Ltd. Do not include the document library name. Leave empty to use the document library root.

Example: Clients

Folder Name
folder_nameRequired · string

Name of the new folder. An existing name causes a conflict.

Example: Example Client

Practical workflow

Example workflow
  1. Opportunity reaches a new project stage

    Use a stable project key and an existing Projects parent.

  2. Create Folder

    Drive ID from IT; Parent Folder Path: Projects; Folder Name: PROJECT-1042.

  3. Notify the project team

    Select Web URL from this action for an internal notification.

Run with a dedicated test contact and non-sensitive SharePoint data. Inspect the action result and compare it with the intended library before enabling ordinary contacts. See the complete business recipes for end-to-end configuration.

Expected outputs

Outputs from a successful action
OutputMeaning and use
Success
successboolean

Confirms that the action completed successfully. Use as a completion checkpoint before relying on other outputs.

Example valuetrue
Folder ID
folder_idstring

Microsoft Graph DriveItem ID of the folder. Map into a later step that needs this folder's Item ID.

Example valueexample-folder-id
Folder Name
folder_namestring

Folder name returned by SharePoint. Use in messages, audit text, or later naming logic.

Example valueExample Folder
Web URL
web_urlstring

SharePoint web link for the resulting file or folder. Use when a later step or staff member needs the SharePoint link.

Example valuehttps://contoso.sharepoint.com/sites/Retail/Example%20Folder

In a later step, select the named output from this action through HighLevel's Custom Value Picker. Retain the Drive ID with an Item/Folder ID. An array such as Items or Folders needs deliberate member selection; it is not a scalar Item ID. Output mapping guidance →

Limits and retry behavior

  • Creates one direct folder; it does not create a missing parent path.
  • An existing file or folder with the name causes a conflict; no overwrite or automatic renaming. Use Find or Create Folder when repeats should reuse a folder.

No automatic action retry. After an uncertain failure, inspect the parent before rerunning; a repeated successful create conflicts with the existing folder.

Common errors and recovery

Missing or invalid input / 400
A required dynamic value is blank or has an unsupported format. Inspect the resolved value on the enrolled contact; compare with the input format above before retrying.
Authentication unavailable / 401
This HighLevel Location does not have a usable Microsoft connection. Verify the Location connection before changing SharePoint permissions.
403
The Entra app lacks access to the selected SharePoint site or the granted role is too narrow for the operation. Verify Sites.Selected consent and the site's write grant.
404
The Drive ID, folder path, or Item ID does not resolve in the connected tenant and approved site. Recheck the administrator's Drive ID map and the exact path or Item ID.
409
A destination name or state conflicts with an existing SharePoint item. Inspect the destination and choose the intended duplicate/conflict behavior before retrying.
429
Microsoft Graph throttled the request. Retry later and avoid high-volume loops without bounds.

Failed requests stop the action; do not rely on Success=false as a returned error contract. Keep secrets and private URLs out of diagnostics. Troubleshooting →

Permissions and security

  • Microsoft Graph application permission Sites.Selected on the customer-owned Entra app.
  • The SharePoint site containing the document library must grant the app at least write access for this operation.
  • The action does not require tenant-wide SharePoint access merely for discovery or name matching.

Runtime access is app-only and does not mirror the permissions of the person enrolling a contact. A Drive ID selects a library inside a granted site; it is not a library-level security grant. Returned Web URLs require the reader's own Microsoft access. Security model →

Version and reference review

Current published action: 1.2. Compare with the version in your existing workflow before adopting these fields; older published versions may differ.

Reference reviewed on against application commit 8440a0f. Published versions remain immutable.