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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create sharing link fo...
Power Automate
Unanswered

Create sharing link for a file or folder

(0) ShareShare
ReportReport
Posted on by 381

I have a flow that is working successfully. 

I would like to edit the flow such that I create a sharing link for the newly created file (trigger for the flow to initiate), however, I don't understand why there is no dynamic content available, so am not sure what to manually input?  Also, when prompted for 'Library Name' the only option was 'Documents', so instead I inserted a link to the actual folder within the Document library.

Not sure what I'm doing wrong.

 

PeggyLang_0-1600453609345.png

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @PeggyLang 

    I can't say why the ID isn't returned with this action.  However, if you use the When a file is created (properties only) trigger instead you can specify the folder and it does return the ID.

     

     

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @PeggyLang You might can use a different trigger which will return you more dynamic content 'When a File is create(properties only)'

     

    CFernandes_0-1600454659206.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • PeggyLang Profile Picture
    381 on at

    The below snapshot of my flow works WITHOUT the 2 actions in the red box.  

    Basically, the flow looks at a newly created file and performs an action (post to Teams channel) based on parameters of the file name; i.e., 'x-ms-file-id'.  

        If 'x-ms-file-id' contains 'Fee' AND contains pdf then x

        If 'x-ms-file-id' contains 'Billing' AND contains xls then y

        etc. . .

    Worked beautifully . . . then I got greedy and wanted to include a sharing link to the file in the post to Teams channel. 

    When I added the 2 actions in red box (Create sharing link & Compose) the condition automatically changes to 'apply to each'. 

    I don't want to look at all the other files, only want to look at the newly created file. 

    As well as the dynamic content options seem to change ('x-ms-file-id' is no longer an option) and I have yet to find a dynamic content that will allow me to look at the file name to make my comparisons.  
    There must be a way around this, perhaps extrapulating the filename (with extension) of the newly created file right after the trigger and then using that string/variable (not sure of the correct syntax) in my conditions?

     

     

    PeggyLang_1-1600705652228.png

     

  • Verified answer
    CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @PeggyLang 

     

    >> I don't want to look at all the other files, only want to look at the newly created file. 

     

    You can use the 'Get File Properties' action.

     

    Untitled.png

     

    It will return you 'File Name with Extension'

     

     

    Untitled1.png

     

     

    Power If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • PeggyLang Profile Picture
    381 on at

    @CFernandes , thank you.  That step sounded reasonable, however, when I add it the condition automatically changes to 'apply to each'.  I don't know why?

    PeggyLang_1-1600710380597.png

     

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @PeggyLang You need to use use the 'Get File Properties' action. NOT 'Get Files (Properties only)'

     

     
     

    Power If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • PeggyLang Profile Picture
    381 on at

    Oh My GOSH - what an awful error on my part.  I apologize!  It WORKS!

    another question - the sharing link is not a hyperlink that can be clicked on - what have I done wrong now?

     

    PeggyLang_0-1600712830302.png

     

  • Verified answer
    CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @PeggyLang 

     

    Wohoo. I am glad that your problem has been resolved. I assume your original question is answered. So it will be great if you can mark it as Solution. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search.

     

    To create nicely formatted, link. Just have a look at the Solution I provided at https://powerusers.microsoft.com/t5/Building-Flows/Item-URL-in-email/m-p/694882#M94098 

     

     

  • Community Power Platform Member Profile Picture
    on at

    hi @PeggyLang ,

     

    Im a newbies try to play with this power automate, mind if you share full flow for my reference?.

     

    thanks.

  • Gilmour Profile Picture
    362 on at

    Is there a way to create a sharing link for an existing file in a library via powerautomate (perhaps in combination with powerapps)? Basically what I am trying to do is to select a file already existing in SP via a field in powerapps, then retrieve a sharing link using a flow. Thanks!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard