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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving Form attachment...
Power Automate
Suggested Answer

Saving Form attachments with hyperlinks in Excel

(0) ShareShare
ReportReport
Posted on by 6
I am making changes to a flow in preparation for the upcoming Excel updates and need some help with the attachments piece.  My original process was built using Forms for Excel, with the spreadsheet being resident in a SharePoint document library.   The form responses populate on the spreadsheet, and attachments from the form are uploaded to another document library with links to them listed on the spreadsheet.  I also previously created a flow to send an email notification when receiving a new response is received.
 
The email notification flow has been modified so responses will continue updating on the spreadsheet after the update takes place.  This had been tested and is working properly; however, attachments from the form aren't uploading to the document libraries and the spreadsheet cells where the links used to populate now have verbiage starting with "  [{"name";"  " followed by the filename of the attachment and don't do anything when clicking on them.
 
Any help would be greatly appreciated.  Also, if there's a different methodology for the attachments that would work better I'm open to suggestions.
Categories:
I have the same question (0)
  • Suggested answer
    Mark Nanneman Profile Picture
    993 Moderator on at
    It sounds like you are just dumping the attachments array into your sharepoint cells as a string.  

    Does your form accept multiple file uploads or just one?
     
    The file attachments property of your form comes out as a json array in a string, and you have to convert it to a JSON array with JSON() before you can work with it.

    To save each attachment to a spreadsheet cell you would need to loop through your attachment array after making it a JSON and reference whatever property you want to save.  For example, to save the "link" property you would write "item()?['link'].  
     
    You could also concat an html href element like "concat('<a href="',item()?['link'],'>',item()?['name'],'</a>')"

    Here's a file upload on a form:
    if you check the output of a flow run, it's a JSON array in string format:


    it looks like this when converted to a proper JSON:

    [
        {
            "name": "Filename.pdf",
            "link": "https://your-sharepoint-site.com/personal/your-domain-name/Documents/Apps/Microsoft%20Forms/File%20Attachments%20Form/Question/filename.pdf",
            "id": "01E7....",
            "type": null,
            "size": 1284780,
            "referenceId": "01E...",
            "driveId": "b!NkY...",
            "status": 1,
            "uploadSessionUrl": null
        }
    ]
  • MT-14081211-0 Profile Picture
    6 on at
    Mark, thanks for your response, I appreciate it.  To answer your question, the form has three separate questions asking for file attachments, with a limit of one attachment per question.
     
    I'm not familiar with JSON, so will need to get myself educated on it.  Based on your response, I'm understanding that I need to convert the JSON string to a JSON array, then loop that through each question for each attachment (i.e., "Apply to Each" step in the flow), is that correct?  Will that also save the attachments to the document library, or are other steps required for that?
     
    Mike

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 266 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 160 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 134 Super User 2026 Season 2

Last 30 days Overall leaderboard