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.
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
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.
@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: ","