Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

create clickable link in a sharepoint document library

(1) ShareShare
ReportReport
Posted on by 18

Hello,

 

I need to create in one sharepoint library a clickable link (shortcut) of a document that is just created in other library (link autocreation for new documents in the "other library")

 

I'm trying to do it in this way:

 

Capture.PNG

 

But getting below error message (under "OUTPUTS" section):

 

{
"status": 400,
"message": "To add an item to a document library, use SPFileCollection.Add()\r\nclientRequestId: 7a2f0e11-34c9-458e-bcbe-d829fd897cd1\r\nserviceRequestId: 7045b49e-209b-7000-6874-8dbe10f7d220"
}
 
I assume I cannot use "Create Item" action for sharepoint library, so how can I build this functionality?
  • Sibel Profile Picture
    7 on at
    Re: create clickable link in a sharepoint document library

    My aim is to put create url(shortcut) of a document in some library folders. This answer is exactly what I need.  I tried and it worked. I did not create a link. I just put "item link" value of the document instead of "Sharing link" value. Thanks a lot, great 😉

  • FMW Profile Picture
    34 on at
    Re: create clickable link in a sharepoint document library

    @RogierDuurkoopand whats the trigger you are using?

  • FMW Profile Picture
    34 on at
    Re: create clickable link in a sharepoint document library

    Dear RogierDuurkoop

     

    where to enter the origin folder of the file and where the target folder for the link?

  • FMW Profile Picture
    34 on at
    Re: create clickable link in a sharepoint document library

    Dear Przlwo,

    is there a chance you cuold up load the text inserted into the File Content field? Unfortunately I cannot read it nor copy paste it...

  • RogierDuurkoop Profile Picture
    21 on at
    Re: create clickable link in a sharepoint document library

    Simple solution:

    Step 1 : Create sharing link for a file or folder.

    Step 2: Uploads a file to a SharePoint site. Make sure to pick an existing library.

    Step 3: See screenshot. Add:

    [InternetShortcut]
    URL=

     

    Flow.jpg

  • Verified answer
    przlwo Profile Picture
    18 on at
    Re: create clickable link in a sharepoint document library

    Hi, good news for everyone that needs this functionality. I found the way how to do it.

    1. Create a link to a document in a library (that has "Link to document" content type assigned)

    2. Check if the newly created link works as expected.

    3. Download the link file (aspx)

    4. Create workflow as below (paste the aspx file content to "File content" field. All that needs to be changed in the content file is the document url (two times) - as shown on the below screen.

     

    And that's it 🙂

     

    Capture.PNG

  • Community Power Platform Member Profile Picture
    on at
    Re: create clickable link in a sharepoint document library

    Unfortunately it is impossible to create. You have to upload a link to a document ASPX file (download the file when you create one manually) and then assign the property.

    BUT this will not result in a valid link to a document... I tried... Even the Add-PNPFile commandlet does not work correctly to create a valid link to a document item within a document library

  • przlwo Profile Picture
    18 on at
    Re: create clickable link in a sharepoint document library

    This works for opening document in browser, however I still need one more thing: how to put the updated URL under a document title (just to be able to click on the document name/title and then the document is opening in browser)?

    Something like on below screen where in a document library I created a link (by "Link to a Document" content type) and no when I click on "Test", the document is opening in browser.

     

    Is it possible to achieve this by workflow created in MS Flow?

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: create clickable link in a sharepoint document library

    @przlwo:

     

    If you append ?web=1 to the URL of an Office document in SharePoint, it will open in the web app.  That said, it isn't working the way I expected.....

     

    I will test and respond later tonight with how to open in the web app as well as adding the link description.

     

    Scott

  • przlwo Profile Picture
    18 on at
    Re: create clickable link in a sharepoint document library

    Hi Scott,

     

    This is not exactly what I want to achieve. When I apply your suggestion, in the URL column (Hyperlink or Picture) I can see link to the document - which is ok - but when I click on this link, I can only open the file in client version or MS Word.

    I'd like to achieve same efect what you can see when you add new document to a sharepoint library with use of "Link to a Document" content type. There are two properties - Document Name and Document URL, after I add link in this way, I can see in "Title" column the document name and when click on the name, the document is opening in browser.

     

    I hope you understand and are able to reproduce what I explained.

     

    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow