Create a file or folder in SharePoint.
Creates a new file with optional content or an empty folder in a SharePoint document library.
type: "io.kestra.plugin.microsoft365.sharepoint.Create"Examples
Create a folder in SharePoint
id: microsoft365_sharepoint_create_folder
namespace: company.team
tasks:
- id: create_folder
type: io.kestra.plugin.microsoft365.sharepoint.Create
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
parentId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
name: "NewFolder"
Create a file with content in SharePoint
id: microsoft365_sharepoint_create_file
namespace: company.team
tasks:
- id: create_file
type: io.kestra.plugin.microsoft365.sharepoint.Create
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
parentId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
name: "document.txt"
content: "Hello, SharePoint!"
Properties
clientId *Requiredstring
Azure Client ID
The client ID registered in Azure
clientSecret *Requiredstring
Azure Client Secret
The client secret for the registered application
name *Requiredstring
The name of the item.
The name of the file or folder to create.
parentId *Requiredstring
Parent folder ID
The ID of the parent folder where the item will be created. Use 'root' for the root of the document library.
siteId *Requiredstring
Sharepoint Site ID
The id of the
tenantId *Requiredstring
Azure Tenant ID
The Azure Active Directory tenant ID
content string
The content of the file.
The content to be written to the new file. If not provided, an empty folder will be created.
driveId string
Drive ID
The id of the document library within the SharePoint site. If not provided, the default document library will be used.
itemType string
FILEFILEFOLDERItem type
Whether to create a FILE or FOLDER
Outputs
itemId string
The ID of the created item.
itemName string
The name of the created item.
webUrl string
The web URL of the created item.