
Microsoft 365 Create
CertifiedCreate SharePoint file or folder
Microsoft 365 Create
Create SharePoint file or folder
Creates a file via simple upload or an empty folder in a document library. Requires Microsoft Graph application permissions Files.ReadWrite.All and Sites.ReadWrite.All.
type: io.kestra.plugin.microsoft365.sharepoint.CreateExamples
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 *string
Azure client ID
Application (client) ID of the registered Entra ID app
clientSecret *string
Azure client secret
Client secret for the app registration; required for client-credentials flow
name *string
Item name
Filename or folder name to create
parentId *string
Parent folder ID
Target folder ID; use 'root' for the document library root
siteId *string
SharePoint site ID
Site identifier in Graph format hostname,siteId,webId
tenantId *string
Azure tenant ID
Azure AD (Entra ID) tenant GUID used for Graph authentication
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150content string
File content
String content for the new file; ignored for folders; empty value results in a zero-byte file
driveId string
Drive ID
Document library ID; if omitted the first drive returned for the site is used
itemType string
FILEFILEFOLDERItem type
FILE creates a document; FOLDER creates an empty folder; default FILE
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