General
This article explains how to configure the Upload Document to SharePoint workflow action.
Purpose
Uploads documents from the system to a SharePoint document library.
Prerequisites
- A configured SharePoint Client
- Required document properties:
- ItemNum
- FileName
Configuration Steps
- Open the workflow editor.
- Add Upload Document to SharePoint action.
- Select the configured SharePoint Client.
- Configure the following parameters:
Site Display Name
The display name of the SharePoint site.
Hostname
The SharePoint domain (e.g., company.sharepoint.com).
List Name
The document library name.
- If empty, defaults to Documents.
- Custom libraries can be specified.
Upload Folder Path
Defines where files are stored in SharePoint.
Static Path
Provide a simple string to upload to the root or specified folder.
Dynamic Path (JavaScript)
Examples:
Autodesk Forma Source
var path = vaultProperties["FullPath"];
var fullPath = `Project Files/RedFolderTree/${path}`;
return fullPath;SharePoint Source
var folderPath = vaultProperties["FolderPath"] || "";
folderPath = ("" + folderPath).trim();
if (folderPath === "/" || folderPath === "" || folderPath.toLowerCase() === "undefined") {
folderPath = "";
}
if (folderPath.startsWith("/")) {
folderPath = folderPath.substring(1);
}
var targetRootFolder = "Project Files/JonteNewTest";
return folderPath ? (targetRootFolder + "/" + folderPath) : targetRootFolder;Behavior
- Files are uploaded to the specified document library.
- Folder structure can be dynamically controlled.
- Document properties are used during processing.