filmov
tv
Use Power Automate to create and share folders in SharePoint
Показать описание
In this video, you'll see how to generate personalized folders to people in a SharePoint list and share each with the respective person. This is accomplished using an HTTP request to the SharePoint REST API. You'll also see a little JSON formatting magic to turn a text column into a clickable icon that takes users to each folder.
Important bits for the HTTP request (replace the parts in % % with your own values):
Uri:
_api/web/Lists/GetByTitle('%display-name-of-your-list-or-library%')/GetItemById('%ID-of-the-file-or-folder%')/ShareLink
Body:
{
"request": {
"createLink": true,
"settings": {
"linkKind": 6,
"expiration": null,
"role": 2,
"restrictShareMembership": true,
"updatePassword": false,
"password": "",
"scope": 2
},
"peoplePickerInput": "[{\"Key\":\"%email-address-to-share-with%\",\"IsResolved\":true}]"
}
}
JSON formatting code:
{
"elmType": "div",
"style": {
"display": "table",
"width": "100%"
},
"children": [
{
"elmType": "a",
"attributes": {
"iconName": "DocumentSet",
"class": "ms-fontColor-themePrimary",
"target": "_blank",
},
"style": {
"font-size": "30px",
"text-align": "center",
"vertical-align": "middle",
"text-decoration": "none"
}
}
]
}
Important bits for the HTTP request (replace the parts in % % with your own values):
Uri:
_api/web/Lists/GetByTitle('%display-name-of-your-list-or-library%')/GetItemById('%ID-of-the-file-or-folder%')/ShareLink
Body:
{
"request": {
"createLink": true,
"settings": {
"linkKind": 6,
"expiration": null,
"role": 2,
"restrictShareMembership": true,
"updatePassword": false,
"password": "",
"scope": 2
},
"peoplePickerInput": "[{\"Key\":\"%email-address-to-share-with%\",\"IsResolved\":true}]"
}
}
JSON formatting code:
{
"elmType": "div",
"style": {
"display": "table",
"width": "100%"
},
"children": [
{
"elmType": "a",
"attributes": {
"iconName": "DocumentSet",
"class": "ms-fontColor-themePrimary",
"target": "_blank",
},
"style": {
"font-size": "30px",
"text-align": "center",
"vertical-align": "middle",
"text-decoration": "none"
}
}
]
}
Комментарии