
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 *Requiredstring
Azure client ID
Application (client) ID of the registered Entra ID app
clientSecret *Requiredstring
Azure client secret
Client secret for the app registration; required for client-credentials flow
name *Requiredstring
Item name
Filename or folder name to create
parentId *Requiredstring
Parent folder ID
Target folder ID; use 'root' for the document library root
siteId *Requiredstring
SharePoint site ID
Site identifier in Graph format hostname,siteId,webId
tenantId *Requiredstring
Azure tenant ID
Azure AD (Entra ID) tenant GUID used for Graph authentication
content 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
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
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