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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Returning Links from a...
Power Automate
Unanswered

Returning Links from a Flow that sends many SP attachments from 1 List item to SP Folder (Stuck)

(0) ShareShare
ReportReport
Posted on by 116

Hi, 

 

Below you will see a flow that looks at a sharepoint list

 

The trigger checks to see if there is attachments for an item and if so it moves them to a document folder and returns the link to that list item,

If i have multiple items however the flow will just keep copying over the previous link and the last attachment link is displayed

 

Id like to have all the links displayed and if possible shown as hyperlinks with just the attachments name,

 

Also  ive got a few errors that im unsure of how to fix without making the flow not do what i would like it too at the bottom?

for flowforum.png

 

  

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Returning Links from a Flow that sends many SP attachments from 1 List item to SP Folder (Stuck)

    First, if you want all the links displayed as hyperlinks you'll need to add a Rich Text field and append each one as HTML to the field.  Probably easier to build an HTML table with all the links in it and then save that to the RTF field.

     

    For the errors I suspect the problem is that you are trying to update the item each time you loop and that is overwriting the previous entry.  Also the delete attachment needs to be in its own separate loop after everything in the first loop is complete.  That's why you are getting the errors.  If you delete or change an item while the loop is processing it you will interfere with the loop.  Logically you need to do something like this.

     

    1) Get the attachments

    2) Save each attachment to the SharePoint library as a file

    3) Append the sharing URL for the file to a table.

    Once you are done processing all the attachments

    4) Update the item with the HTML table

    5) Loop through the attachments and delete them.

  • Questionasking Profile Picture
    116 on at
    Re: Returning Links from a Flow that sends many SP attachments from 1 List item to SP Folder (Stuck)

    @Pstork1 wrote:

    First, if you want all the links displayed as hyperlinks you'll need to add a Rich Text field and append each one as HTML to the field.  Probably easier to build an HTML table with all the links in it and then save that to the RTF field.

     

    For the errors I suspect the problem is that you are trying to update the item each time you loop and that is overwriting the previous entry.  Also the delete attachment needs to be in its own separate loop after everything in the first loop is complete.  That's why you are getting the errors.  If you delete or change an item while the loop is processing it you will interfere with the loop.  Logically you need to do something like this.

     

    1) Get the attachments

    2) Save each attachment to the SharePoint library as a file

    3) Append the sharing URL for the file to a table.

    Once you are done processing all the attachments

    4) Update the item with the HTML table

    5) Loop through the attachments and delete them.


    Sorry, im struggling to understand 3) Append the sharing URL for the file to a table.

    So do i have to initialize a variable? or something, sorry im self taught and flow just has me at a mental block with this one.

     

    Could you pretty please with some sugar on top, put up a screen shot and breakdown that step for me?


    3) Append the sharing URL for the file to a table.

  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: Returning Links from a Flow that sends many SP attachments from 1 List item to SP Folder (Stuck)

    The problem is everytime you update the SharePoint item you are going to overwrite the previous entry.  That's why you only get one link.  So you have to gather all the links up in some way and add them to SharePoint once.  Since you want hyperlinks the easiest way would probably be to build an HTML table manually as a string variable.  So you would initialize the variable at the top of the flow and then append the appropriate HTML to the string for each URL.  That will include figuring out what the HTML anchor tag would look like for the url.

     

    You might want to start with something easier like just appending a comma delimited list of the urls.  Then once that works you can worry about adding the HTML formatting.  

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard