Skip to main content

Notifications

Community site session details

Community site session details

Session Id : NMdVD2HJF9xSyn//vt9KkL
Power Automate - General Discussion
Answered

Power Automate - get link to a file I created

Like (0) ShareShare
ReportReport
Posted on 15 Mar 2024 04:29:41 by 125

Hi,

 

I am trying to do something that I think should be quite easy but I can't quite get it to work!  I have created a flow that creates an excel file and saves it in a SharePoint location using the 'Create file' action.  This is working fine.  However I want to then get the full link to that file to email to my users, so they can just click on the link in the email and open the file (my users will have access to that sharepoint folder as standard).  But I can't seem to get the full URL.  I have tried Get file metadata but that also doesn't have the 'link to item' output.

 

Any ideas of what I am missing or what I can try to do this?

 

Thanks

  • HK-10081949-0 Profile Picture
    2 on 11 Aug 2024 at 06:54:59
    Power Automate - get link to a file I created
    Thanks for this post. Does anyone know how to get the url/link to the folder of the file created? I'm using a similar flow but to copy attachments into a generated folder inside a library list (generated by using a combination of ticket# and location ID).
  • glitter1234567 Profile Picture
    125 on 17 Mar 2024 at 22:40:17
    Re: Power Automate - get link to a file I created

    Thanks so much - I got this working 🙂

  • Verified answer
    CU-18081211-6 Profile Picture
    9,266 Super User 2025 Season 1 on 15 Mar 2024 at 06:09:18
    Re: Power Automate - get link to a file I created

    @glitter1234567 ,

    Use a 'Get file properties' action after 'Create file' action (ID parameter from Create file outputs) and the link can be found using:

    @{body('Get_file_properties')?['{Link}']}

     

  • v-yetonggu-msft Profile Picture
    on 15 Mar 2024 at 05:42:09
    Re: Power Automate - get link to a file I created

    Hi @glitter1234567 ,

    I did a test for your reference.

    In my scenario:

    First, go to the original SharePoint library and check the ID of the file you want to copy.

    My SharePoint List:

    vyetonggumsft_2-1710483563756.png

    My Flow:

    Please use the 'Get file properties' control to get file link.

    Fill in the file ID in the 'Get file properties' control.

    vyetonggumsft_3-1710483746304.png

    <p>This is a File Link</p>
    <p><a href="@{outputs('Get_file_properties_2')?['body/{Link}']}">FileLink</a></p>

    My Outlook Inbox:

    vyetonggumsft_4-1710483775848.png

    Best Regards,

    Sunshine Gu

     

  • glitter1234567 Profile Picture
    125 on 15 Mar 2024 at 05:29:14
    Re: Power Automate - get link to a file I created

    thanks for you reply - sorry I should have mentioned I tried that also but got the error "Forbidden"

     

    The 'Create sharing link for a file or folder' operation failed because sharing has been disabled on the site. To fix this error, you need to enable sharing on the SharePoint site. Check the site settings and make sure that sharing is allowed for the site. Once sharing is enabled, the operation should work successfully.

     

    The users who will access this file are owners of the site so I shouldn't need to enable sharing of anything 

  • CU-18081211-6 Profile Picture
    9,266 Super User 2025 Season 1 on 15 Mar 2024 at 05:20:45
    Re: Power Automate - get link to a file I created

    @glitter1234567 ,

    Actually there is a special action for it. 

    gabibalaban_0-1710479693632.png

    Inside body of Send of Email use output link from previous action as link target.  

    gabibalaban_1-1710479982821.png

    Hope it helps !

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started