cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msendt
Frequent Visitor

How do I create a sharing link to the parent folder of an item

Hi everyone,

Sharepoint 2013:

I have created a flow based upon the "For a selected file" trigger. I have grabbed the file properties for the selected file and I can access the path of the folder it is in. What I can't work out is how to create a sharing link for that folder. I can't work out how to get the ID of the folder as the input for the create sharing link action. Any help would be appreciated.

The closest I have got is that i have used the Get Folder Metadata from Path action  - but when I try to use the ItemID output as the ID for the Create Sharing Link action, it fails as the ItemID = -1.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @msendt ,

 

I did a test on my side and used Get folder metadata using path action to get the Item Id.

Then configure Item Id in Create sharing link or a file or folder action, it works.

Image reference:

11.PNG

Please make sure that the current Folder is present and that it was not removed during Flow execution.

Flow run history:

12.PNG

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-bacao-msft
Community Support
Community Support

Hi @msendt ,

 

I did a test on my side and used Get folder metadata using path action to get the Item Id.

Then configure Item Id in Create sharing link or a file or folder action, it works.

Image reference:

11.PNG

Please make sure that the current Folder is present and that it was not removed during Flow execution.

Flow run history:

12.PNG

Please take a try again.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
msendt
Frequent Visitor

Thank you. I thought I tried that but I must have had an incorrect setting.

@v-bacao-msft ,

 

I am running into a similar issue and was hoping you may be able to help. I've gotten past the -1 Item ID and have a valid item ID which I have validated by adding the Item ID column in Sharepoint. However, when I pass that item ID to the "Create Sharing Link for a file or folder" along with the appropriate library and site address, I get a 400 Status code back with the message "The request is malformed or incorrect". Would you be able to help at all with this? 

 

Thanks for your help. 

Hi,

 

Not completely specific to your post, but after you create the sharing link in flow, how do you then modify the date to which the link expires?

 

I have a scenario where I provide a sharing link to people that need to approve an item, then when the approval is finished (could be within hours, days or weeks), I want to set the expiry date to the current date within the flow.

 

Unfortunatley I can only see how to create a link in flow, and no way to modify it afterwards.

 

I ended up posting this question in its own post here: https://powerusers.microsoft.com/t5/General-Flow-Discussion/Change-the-Link-Expiration-date-of-a-Sha...

 

I tried to delete this post after I submitted it, but there is no delete option for me 🙂

pauldj
Advocate II
Advocate II

I managed to fix this issue and test it to confirm it is fully working, although some of the above didn't work for me.

pauldj_0-1605612136723.png

 

As you can see above, a few differences, but this enabled me to place a folder link associated with the File that triggers the flow , anywhere in the output.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,326)