MS Flow: option to access multiple Uploaded Files in sparate URLs for each files

  • auricenergy
    Asked on November 11, 2019 at 10:05 AM

    Hello, we need some assistance with your integration with MS Flow, as your file upload fields are formatting that output differently depending on if the option to allow multiple files is selected. 

    I was following this article: https://www.jotform.com/blog/microsoft-flow-integration/
    (Which needs to be updated since there is no longer a OneDrive step available to "Copy File" from a source URL. I am instead using the step of "Upload file from URL")

    When selecting my jotform's file upload field as the variable in that step, if that jotform field only allows a single file, that variable inside flow returns a simple URL as the full string and it works great. However, if i turn on the option in that jotform field to allow multiple file uploads, that field's variable returns the following string, along with the error message just below that. We need some help getting this fixed so that flow can handle the multiple files better.

    "<a href=\"https://www.jotform.com/uploads/auricenergy/93034805951155/4490643657931223124/8774_Auric-Solar_Logo_Final_SolidWhite.png\" target=\"_blank\" title=\"8774_Auric-Solar_Logo_Final_SolidWhite.png\">8774_Auric-Solar_Logo_Final_SolidWhite.png</a>"
     
    Error: Unable to process template language expressions in action 'Upload_file_from_URL' inputs at line '1' and column '2003': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.'.
  • Kevin Support Team Lead
    Replied on November 11, 2019 at 1:49 PM

    I have been performing some tests on my end and I can see what you mentioned; however, it seems to work when you set the connection to send the data as text:

    15734976912019 11 11 12h39 44 Screenshot 10

    When this is done, a link with a zip file will be generated instead of multiple URLs, example: 

    15734981502019 11 11 12h36 16 Screenshot 21

    This will allow the connection to work as expected, please kindly give it a try and let us know if you have questions. 


  • auricenergy
    Replied on November 11, 2019 at 3:10 PM

    I tried what you suggested and it now appears to be giving a URL with no file extension when the submitter uploads multiple files, and when i browse to that URL, it auto-downloads a .zip file. So how is Flow supposed to differentiate between single-file uploads and multiple, so i can handle the naming of the file being uploaded to OneDrive appropriately? We need a way to determine the uploaded file's file extension so we can dynamically name the OneDrive destination file correctly.

    It would make a lot of sense if jotform's variable for a multiple-file upload field would allow connection to Flow's "Apply to each" step so that we could handle each file that was uploaded separately instead of your current functionality to throw everything into a zip that requires the user to download before they can see inside.


  • Kevin Support Team Lead
    Replied on November 11, 2019 at 3:47 PM

    Based on what you mentioned this will not work, I think it's not possible to split each URL for each file at the moment as this would generate multiple URLs and so far there is no way to know how many files the users will upload as this is dynamic. 

    The alternative shown above will indeed generate a zip file with all the submitted files in it. 

    Now, we can open a feature request for this, although we cannot provide an ETA or ensure this feature will be implemented, we would keep you updated via this thread. 

    Kindly let us know if you would like to open this feature request.

  • auricenergy
    Replied on November 11, 2019 at 3:59 PM

    Yes, i would like a feature request submitted for two separate aspects:

    1. Allow for "Apply to each" functionality in FLOW for the multiple-file upload fields, so that one action can be applied for each and every file that is uploaded to a single field, thus making it truly dynamic in nature in that it would not matter how many were uploaded, but it would just take the same action for each one.

    2. Provide a way for dynamically acquiring the file type/extension of the uploaded file so that can be retained for specifying the destination filename. This would only require another variable for filetype be made available to reference inside flow for each file upload field present.
    Would also be good if an option existed in the form settings that would just always rename any uploaded file to match the name of the field it was uploaded to (and then just number them for multiples or something) along with the appropriate source file type/extension.
  • KrisLei Jotform Support
    Replied on November 11, 2019 at 7:45 PM

    Hi,

    1. Allow for "Apply to each" functionality in FLOW for the multiple-file upload fields, so that one action can be applied for each and every file that is uploaded to a single field, thus making it truly dynamic in nature in that it would not matter how many were uploaded, but it would just take the same action for each one. 

    I have escalated a ticket request for an option to access multiple uploaded files in separate URLs instead of downloading them in a zip file.


    I have moved your second request to a different thread to address all your queries accordingly.