web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get SharePoint FIle Sh...
Power Automate
Answered

Get SharePoint FIle Sharing URL from JSON (HTTP Request) - JSON to String

(0) ShareShare
ReportReport
Posted on by 7

I have a flow that needs to get an existing Sharing Link from a file and send an email with this link to the users than can access it. From the SharePoint file, I created a HTTP Request to SharePoint, which returns a JSON that contais the link in the 'url' field. This 'url' field appears 3 times in the JSON: the first one with the link I want, and the other ones as 'null'. 

 

I want to extract from this JSON a string that contains only the link I need, so I can use it in the body of the e-mail. Here is the JSON:

 

The link I need is: 

"Url": "https://xxxxxxxxxxxxx.sharepoint.com/:b:/s/xxxxxxxx/Ee_PZRPWr8VHuwt8070ib-ABkiiYU7KuYGgnnTF93Xix6Q"

 

 

{
 "odata.metadata": "https://xxxxxx.sharepoint.com/sites/xxxxx/_api/$metadata#SP.ApiData.SharingInformations/@Element&$select=permissionsInformation",
 "odata.type": "SP.Sharing.SharingInformation",
 "odata.id": "https://xxxxxx.sharepoint.com/sites/xxxxx/_api/web/lists/getbytitle('Documentos')/items(690891)/GetSharingInformation",
 "odata.editLink": "web/lists/getbytitle('Documentos')/items(690891)/GetSharingInformation",
 "permissionsInformation": {
 "hasInheritedLinks": false,
 "links": [
 {
 "isInherited": false,
 "linkDetails": {
 "AllowsAnonymousAccess": false,
 "ApplicationId": null,
 "BlocksDownload": false,
 "Created": "2022-10-19T18:51:21.176Z",
 "CreatedBy": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": 131,
 "isActive": true,
 "isExternal": false,
 "jobTitle": "xxxxxxxxxxxx",
 "loginName": "i:0#.f|membership|xxxxx@xxxxx.com.br",
 "name": "xxxxxxxxxxxxxx",
 "principalType": 0,
 "userId": null,
 "userPrincipalName": "xxxxx@xxxxx.com.br"
 },
 "Description": null,
 "Embeddable": false,
 "Expiration": "",
 "HasExternalGuestInvitees": true,
 "Invitations": [
 {
 "invitedBy": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": 131,
 "isActive": true,
 "isExternal": false,
 "jobTitle": "xxxxxxxxxxxx",
 "loginName": "i:0#.f|membership|xxxxx@xxxxx.com.br",
 "name": "xxxxxxxxxxxxxx",
 "principalType": 1,
 "userId": null,
 "userPrincipalName": "xxxxx@xxxxx.com.br"
 },
 "invitedOn": "2022-10-19T18:51:21.114Z",
 "invitee": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": -1,
 "isActive": false,
 "isExternal": true,
 "jobTitle": null,
 "loginName": null,
 "name": "xxxxx@xxxxx.com.br",
 "principalType": 0,
 "userId": null,
 "userPrincipalName": null
 }
 },
 {
 "invitedBy": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": 131,
 "isActive": true,
 "isExternal": false,
 "jobTitle": "ANALISTA ESTRATEGIA INTELIGENCIA JUNIOR",
 "loginName": "i:0#.f|membership|xxxxx@xxxxx.com.br",
 "name": "xxxxxxxxxxxxxx",
 "principalType": 1,
 "userId": null,
 "userPrincipalName": "xxxxx@xxxxx.com.br"
 },
 "invitedOn": "2022-10-19T18:51:21.114Z",
 "invitee": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": null,
 "id": -1,
 "isActive": false,
 "isExternal": true,
 "jobTitle": null,
 "loginName": null,
 "name": "xxxxx@xxxxx.com.br",
 "principalType": 0,
 "userId": null,
 "userPrincipalName": null
 }
 }
 ],
 "IsActive": true,
 "IsAddressBarLink": false,
 "IsCreateOnlyLink": false,
 "IsDefault": true,
 "IsEditLink": false,
 "IsFormsLink": false,
 "IsManageListLink": false,
 "IsReviewLink": false,
 "IsUnhealthy": false,
 "LastModified": "2022-10-19T18:51:21.176Z",
 "LastModifiedBy": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": 131,
 "isActive": true,
 "isExternal": false,
 "jobTitle": "xxxxxxxxxxxxxx",
 "loginName": "i:0#.f|membership|xxxxx@xxxxx.com.br",
 "name": "xxxxxxxxxxxxxxxxx",
 "principalType": 0,
 "userId": null,
 "userPrincipalName": "xxxxx@xxxxx.com.br"
 },
 "LimitUseToApplication": false,
 "LinkKind": 6,
 "PasswordLastModified": "",
 "PasswordLastModifiedBy": null,
 "RedeemedUsers": [],
 "RequiresPassword": false,
 "RestrictedShareMembership": true,
 "Scope": 2,
 "ShareId": "cf77b78f-5735-4b56-b9f7-318721a0da09",
 "ShareTokenString": "share=Ee_PZRPWr8VHuwt8070ib-ABkiiYU7KuYGgnnTF93Xix6Q",
 "SharingLinkStatus": 0,
 "TrackLinkUsers": false,
 "Url": "https://xxxxxxxxxxxxx.sharepoint.com/:b:/s/xxxxxxxx/Ee_PZRPWr8VHuwt8070ib-ABkiiYU7KuYGgnnTF93Xix6Q"
 },
 "linkMembers": []
 },
 {
 "isInherited": false,
 "linkDetails": {
 "AllowsAnonymousAccess": false,
 "ApplicationId": null,
 "BlocksDownload": false,
 "Created": "",
 "CreatedBy": null,
 "Description": null,
 "Embeddable": false,
 "Expiration": "",
 "HasExternalGuestInvitees": false,
 "Invitations": [],
 "IsActive": false,
 "IsAddressBarLink": false,
 "IsCreateOnlyLink": false,
 "IsDefault": true,
 "IsEditLink": false,
 "IsFormsLink": false,
 "IsManageListLink": false,
 "IsReviewLink": false,
 "IsUnhealthy": false,
 "LastModified": "",
 "LastModifiedBy": null,
 "LimitUseToApplication": false,
 "LinkKind": 3,
 "PasswordLastModified": "",
 "PasswordLastModifiedBy": null,
 "RedeemedUsers": [],
 "RequiresPassword": false,
 "RestrictedShareMembership": false,
 "Scope": -1,
 "ShareId": "00000000-0000-0000-0000-000000000000",
 "ShareTokenString": null,
 "SharingLinkStatus": 0,
 "TrackLinkUsers": false,
 "Url": null
 },
 "linkMembers": []
 },
 {
 "isInherited": false,
 "linkDetails": {
 "AllowsAnonymousAccess": false,
 "ApplicationId": null,
 "BlocksDownload": false,
 "Created": "",
 "CreatedBy": null,
 "Description": null,
 "Embeddable": false,
 "Expiration": "",
 "HasExternalGuestInvitees": false,
 "Invitations": [],
 "IsActive": false,
 "IsAddressBarLink": false,
 "IsCreateOnlyLink": false,
 "IsDefault": true,
 "IsEditLink": false,
 "IsFormsLink": false,
 "IsManageListLink": false,
 "IsReviewLink": false,
 "IsUnhealthy": false,
 "LastModified": "",
 "LastModifiedBy": null,
 "LimitUseToApplication": false,
 "LinkKind": 2,
 "PasswordLastModified": "",
 "PasswordLastModifiedBy": null,
 "RedeemedUsers": [],
 "RequiresPassword": false,
 "RestrictedShareMembership": false,
 "Scope": -1,
 "ShareId": "00000000-0000-0000-0000-000000000000",
 "ShareTokenString": null,
 "SharingLinkStatus": 0,
 "TrackLinkUsers": false,
 "Url": null
 },
 "linkMembers": []
 }
 ],
 "principals": [
 {
 "principal": {
 "directoryObjectId": null,
 "email": "",
 "expiration": null,
 "id": 3,
 "isActive": true,
 "isExternal": false,
 "jobTitle": null,
 "loginName": "xxxxxxxxxxx",
 "name": "xxxxxxxxxxxxxxx",
 "principalType": 8,
 "userId": null,
 "userPrincipalName": null
 },
 "role": 3
 },
 {
 "principal": {
 "directoryObjectId": null,
 "email": "",
 "expiration": null,
 "id": 4,
 "isActive": true,
 "isExternal": false,
 "jobTitle": null,
 "loginName": "xxxxxxxxxxxx",
 "name": "xxxxxxxxxxxx",
 "principalType": 8,
 "userId": null,
 "userPrincipalName": null
 },
 "role": 1
 },
 {
 "principal": {
 "directoryObjectId": null,
 "email": "",
 "expiration": null,
 "id": 5,
 "isActive": true,
 "isExternal": false,
 "jobTitle": null,
 "loginName": "xxxxxxxxxxxxxxx",
 "name": "xxxxxxxxxxxxxxxx",
 "principalType": 8,
 "userId": null,
 "userPrincipalName": null
 },
 "role": 2
 },
 {
 "principal": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": "",
 "id": 207,
 "isActive": true,
 "isExternal": false,
 "jobTitle": "xxxxxxxxxxxxxxx",
 "loginName": "i:0#.f|membership|xxxxx@xxxxx.com.br",
 "name": "xxxxxxxxxxxx",
 "principalType": 1,
 "userId": null,
 "userPrincipalName": "xxxxx@xxxxx.com.br"
 },
 "role": 1
 }
 ],
 "siteAdmins": [
 {
 "principal": {
 "directoryObjectId": null,
 "email": "xxxxx@xxxxx.com.br",
 "expiration": null,
 "id": 6,
 "isActive": true,
 "isExternal": false,
 "jobTitle": null,
 "loginName": "c:0o.c|federateddirectoryclaimprovider|xxxxxxxxxxxxxxx-9a09-29cc582b02fb_o",
 "name": "xxxxx@xxxxx.com.br",
 "principalType": 4,
 "userId": null,
 "userPrincipalName": null
 },
 "role": 3
 }
 ]
 }
}

 

 

Categories:
I have the same question (0)
  • Verified answer
    Ellis Karim Profile Picture
    11,819 Super User 2026 Season 1 on at

    Hi @gui_levcovitz ,

     

    The expression shown below should point to the URL property:

    Snag_5d3b15a.png

    Snag_5d41fc3.png

    variables('varBody')?['permissionsInformation']?['Links']?[0]?['linkDetails']?['Url']

     

    Snag_5d4c644.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • gui_levcovitz Profile Picture
    7 on at

    Works perfectly! Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 86 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 55

#3
Ellis Karim Profile Picture

Ellis Karim 53 Super User 2026 Season 1

Last 30 days Overall leaderboard