Skip to main content
Version: 4.47.0

SPO API

The SPO API component allows you to interact with the SharePoint REST API.

Creating document sets

A Document Set is a group of related documents that you can manage as a single entity. You can create a Document Set in a single step, and then define its characteristics and metadata.

If the Document Sets feature has not been activated for your site collection, you will need to activate it before you can create or configure new Document Set content types. You must be a Site Collection Administrator to activate the Document Sets feature.

  • Go to the top-level site in the site collection for which you want to enable Document Sets.
  • On the Site Actions menu, click Site Settings.
  • Under Site Collection Administration, click Site collection features.
  • Find Document Sets in the list, and then click Activate.

For creating and deleting lists or list items, Full Control permission level is required.

Configuration

General

Mode

Options for usage of component. Note This mode can be overridden by using field mode in the incoming object. possible values: delete, createFolder, createDocumentSet.

SharePoint settings

SharePoint username

SharePoint username to use for authentication.

SharePoint password

SharePoint password to use for authentication. Do not use the password of the user if MFA is enabled, but use an app password instead.

Rate limit

Request limit

The max amount of requests during the interval.

Interval

The interval in milliseconds in which the requests happen. Should be a multiple of 250.

Max concurrent

The maximum concurrent executions per message. API components that process an incoming message may need multiple requests towards an external API that maintains a request limit. To be able to keep the rate limiter aligned with this request limit and configurable per request, the message that is being processed in the component will be divided into multiple scheduled tasks that will be executed in order. This setting executes a batch of these scheduled tasks within the maximum request limit/interval.

Inputs

For using mode: Create document set & Create folder the component expects an incoming object containing the following required fields:

metadata: Object, key/value pairs to be set as metadata. Make sure they exist on the contentType that is being used. siteUrl: String, site url (excluding documentLibrary/folders) webUrl: String, site url (including documentLibrary/folders) listId: String, target Library GUID to create documentSets or folders in. contentType: String, contentTypeId for folder or documentSet.

Creating list items such as document sets or folders can have different custom fields depending on the columns added for the contentTypeId. An example of different sorts of input:

{
"metadata" : {
"FileLeafRef": "name"
"Title": "title",
"Source" : "SharePoint",
"Price" : "1234",
"Partial_x0020_Source_x0020_Path" : "line 1\nline 2\nline 3",
"Source_x0020_Migration_x0020_Date" : "2023-05-21T07:47:00.000Z",
"IsFCDone" : "Yes;#No",
"Document_x0020_Purpose" : ";#/Test/Testfolder|7bc62056-fe8c-4fab-a140-125c6a4368a0;#/Test/Document Purpose|520e01b5-0240-4f98-a1ed-72bfcb56a0b3",
"Business_x0020_Units": "3;#TEST;#1;#TEST2;#",
"Reviewed" : "1",
"Approver" : "[{'Key':'Xillio test'}, {'Key':'test@xillio.com'}]",
"ApproverSingle" : "[{'Key':'test@xillio.com'}]"
},
"siteUrl":"https://tenantName.sharepoint.com/sites/testSite",
"webUrl":"https://tenantName.sharepoint.com/sites/testSite/testDocLib/testSubFolder",
"listId": "9e30f72e-06bd-43bf-a49e-1ec73b83a983",
"contentTypeId":"0x012000A819CE8B4B46CD4FB219D6AAABCDBE05"
}

For using mode: Delete list item the component expects an incoming object containing the following required fields:

siteUrl: String, site url (excluding documentLibrary/folders) listId: String, target Library GUID to create documentSets or folders in. listItemId: String, listItemId of target object to delete

{
"siteUrl":"https://tenantName.sharepoint.com/sites/testSite",
"listId": "9e30f72e-06bd-43bf-a49e-1ec73b83a983",
"listItemId":"16"
}

Outputs

Create document set & Create folder

{
value: {
"metadata" : {
"FileLeafRef": "name"
"Title": "title",
"Source" : "SharePoint",
"Price" : "1234",
"Partial_x0020_Source_x0020_Path" : "line 1\nline 2\nline 3",
"Source_x0020_Migration_x0020_Date" : "2023-05-21T07:47:00.000Z",
"IsFCDone" : "Yes;#No",
"Document_x0020_Purpose" : ";#/Test/Testfolder|7bc62056-fe8c-4fab-a140-125c6a4368a0;#/Test/Document Purpose|520e01b5-0240-4f98-a1ed-72bfcb56a0b3",
"Business_x0020_Units": "3;#TEST;#1;#TEST2;#",
"Reviewed" : "1",
"Approver" : "[{'Key':'Xillio test'}, {'Key':'test@xillio.com'}]",
"ApproverSingle" : "[{'Key':'test@xillio.com'}]"
},
"siteUrl":"https://tenantName.sharepoint.com/sites/testSite",
"webUrl":"https://tenantName.sharepoint.com/sites/testSite/testDocLib/testSubFolder",
"listId": "9e30f72e-06bd-43bf-a49e-1ec73b83a983",
"contentTypeId":"0x012000A819CE8B4B46CD4FB219D6AAABCDBE05"
},
result: {
"ContentTypeId": "0x012000A819CE8B4B46CD4FB219D6AAABCDBE05",
"Title": "newNameTitle",
"Id": 1900,
"Source": "SharePoint",
"Price": 1234,
"Reviewed": true,
"GUID": "ss30f72e-0sds-43bf-a49e-1ec73b83a983",
...More fields
}
}

Delete list item:

If item is successfully deleted, count will be equal to 1.

{
value: {
"siteUrl":"https://tenantName.sharepoint.com/sites/testSite",
"listId": "9e30f72e-06bd-43bf-a49e-1ec73b83a983",
"listItemId":"16"
},
result: {
"count": 1
}
}