Microsoft 365 Create

Microsoft 365 Create

Certified

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.

yaml
type: io.kestra.plugin.microsoft365.sharepoint.Create

Create a folder in SharePoint

yaml
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

yaml
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

Azure client ID

Application (client) ID of the registered Entra ID app

Azure client secret

Client secret for the app registration; required for client-credentials flow

Item name

Filename or folder name to create

Parent folder ID

Target folder ID; use 'root' for the document library root

SharePoint site ID

Site identifier in Graph format hostname,siteId,webId

Azure tenant ID

Azure AD (Entra ID) tenant GUID used for Graph authentication

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset 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.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

File content

String content for the new file; ignored for folders; empty value results in a zero-byte file

Drive ID

Document library ID; if omitted the first drive returned for the site is used

DefaultFILE
Possible Values
FILEFOLDER

Item type

FILE creates a document; FOLDER creates an empty folder; default FILE

The ID of the created item

The name of the created item

The web URL of the created item