Skip to main content

Notifications

Power Automate - General Discussion
Unanswered

Splitting multiple URLs from file uploads (MS Forms) into readable links

(0) ShareShare
ReportReport
Posted on by 4

I currently have a flow that grabs data from a Microsoft Form and chucks it into Excel. 

 

It all works fine but when the data for the file uploads (max of 10) is pushed into Excel, it's a big ol' mess and not easy to obtain the links to the files that have been uploaded.

 

Currently it looks like this (4 file uploads):

 

 

 

[{"name":"Image 1063_REDACTED REDACTED.png","link":"https://REDACTED.sharepoint.com/personal/REDACTED/Documents/Apps/Microsoft%20Forms/Untitled%20form/Question%201/Image%201063_REDACTED%20REDACTED.png","id":"REDACTED","type":null,"size":23428,"referenceId":"017PUAXZTYQWM3LRANDVBJYNMZFY4MMEVK","driveId":"REDACTED","status":1,"uploadSessionUrl":null},{"name":"Image 1062_REDACTED REDACTED.png","link":"https://REDACTED.sharepoint.com/personal/REDACTED/Documents/Apps/Microsoft%20Forms/Untitled%20form/Question%201/Image%201062_REDACTED%20REDACTED.png","id":"REDACTED","type":null,"size":2764,"referenceId":"017PUAXZTYQWM3LRANDVBJYNMZFY4MMEVK","driveId":"REDACTED","status":1,"uploadSessionUrl":null},{"name":"Image 1061_REDACTED REDACTED.png","link":"https://REDACTED.sharepoint.com/personal/REDACTED/Documents/Apps/Microsoft%20Forms/Untitled%20form/Question%201/Image%201061_REDACTED%20REDACTED.png","id":"REDACTED","type":null,"size":12787,"referenceId":"017PUAXZTYQWM3LRANDVBJYNMZFY4MMEVK","driveId":"REDACTED","status":1,"uploadSessionUrl":null},{"name":"Image 1060_REDACTED REDACTED.png","link":"https://REDACTED.sharepoint.com/personal/REDACTED/Documents/Apps/Microsoft%20Forms/Untitled%20form/Question%201/Image%201060_REDACTED%20REDACTED.png","id":"REDACTED","type":null,"size":2818,"referenceId":"017PUAXZTYQWM3LRANDVBJYNMZFY4MMEVK","driveId":"REDACTED","status":1,"uploadSessionUrl":null}]

 

 

 

 

I don't care about the name or anything else, all I really want is the data after "link": and if multiple files are uploaded, I'd like them separated by commas.

 

I've tried various split expressions that I have found online and whilst it works for one URL, if multiple files are uploaded... it doesn't add the rest of them. The example I found that works with one file is: 

 

 

 

split(split(outputs('Get_response_details')?['body/r93c4be2ac9864c9686d9dea21853c394'], '"link":"')[1], '","id":')[0]

 

 

 

I've tried adding other bits into the expression but it either errors due to it being malformed or it just doesn't work and I get a null error.

 

Any help would be appreciated! 

Thank you.

 

 

  • SJH88 Profile Picture
    SJH88 4 on at
    Re: Splitting multiple URLs from file uploads (MS Forms) into readable links

    Thanks Chriddle. Unfortunately my expertise in this area are pretty much non-existent. I can understand the JSON side of it, but writing something like this is not something I would be able to do.

     

    No worries though. I've removed the file upload function from my form right now

  • Chriddle Profile Picture
    Chriddle 7,395 on at
    Re: Splitting multiple URLs from file uploads (MS Forms) into readable links

    The string that you have provided is JSON.

    If you put it as Input into a Select action (convert it to an array with function json()), you can map it to item()['link'] to get an array of links.

    Then just join() this array 

  • SJH88 Profile Picture
    SJH88 4 on at
    Re: Splitting multiple URLs from file uploads (MS Forms) into readable links

    Thanks, but I don't really want to go down the route of a 3rd party tool. This should be able to be done without that.

  • AlexEncodian Profile Picture
    AlexEncodian 4,329 on at
    Re: Splitting multiple URLs from file uploads (MS Forms) into readable links

    @SJH88 

    Encodian utility actions provide powerful parsing tools. And utility actions only consume 0.05 Encodian credits per operation.

     

    Utility - Extract URL's from Text
    Extract URLs from a string provided

    Utility - Extract Text Instances between Values
    Extract all instances of text between and start and end value provided. 
    In this case, start value: link": and end value: ","

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard