Microsoft Power Automate: Send files from Jotform to Sharepoint

  • Profile Image
    Tim_Welch
    Asked on February 02, 2021 at 04:01 PM

    Hi there,

    I've followed https://www.jotform.com/answers/2271536-JotForm-Microsoft-Power-Automate-Upload-file-to-OneDrive-from-URL-Extracting-filename-from-URL and other posts to try to upload a file from Jotform using Microsoft Power Automate.

    1612299794_6019be12087c3_Screenshot 2021

    Every method I try using results in a 404 but if I cut and paste the URL it works fine.

    Screenshot added below.

    Any assistance greatly appreciated.

    Tim Welch


  • Profile Image
    Tim_Welch
    Answered on February 02, 2021 at 04:32 PM

    In User Settings I've now changed "Require log-in to view uploaded files" to be unchecked.

    I can get the file to upload to OneDrive but don't appear to be able to add it as an attachment to a Sharepoint Item as per...

    1612302521_6019c8b98ee9e_Sharepoint.png

    The File Content appears to be corrupt; is there a better way of doing this?

    Cheers, Tim

  • Profile Image
    Tim_Welch
    Answered on February 02, 2021 at 05:32 PM

    I've also seen solutions where using an HTTP GET to retrieve the "File Content" but when I try this I get a 302 File Redirect...

    1612305125_6019d2e593855_Screenshot 2021

  • Profile Image
    EltonCris
    Answered on February 02, 2021 at 10:39 PM

    We will check this and get back to you with updates.

  • Profile Image
    EltonCris
    Answered on February 02, 2021 at 11:04 PM

    This should work.

    1. After the Jotform action, add HTTP action to get the file. The Method should be GET and the URI should be the single file upload field from your form. Example:

    06072020_qYlF0yRCht.png

    2. Next, add a Variable action then select Initialize variable. Example:

    06072020_RSi6pNkenW.png

    Name the variable you want e.g. getURL, select String as type, then enter this on value as Expression.

    actions('HTTP').outputs.headers.Location

    06072020_MfcJA0omm1.png

    After that, open its settings then Configure run after

    06072020_mONoOY5NHu.png

    And make sure has failed is also selected

    02032021_ACeVJIWUux.png


    3. After that, add another HTTP action, still GET method then select the variable you just created from Step 2 on URI

    06072020_N9UrAlrE1E.png

    4. Finally, Create a file on Sharepoint with File Content from the 2nd HTTP Body (see image below).

    06072020_bDYlUBEXH7.png

    That's it. I just made a test with this and it works.

    02032021_4FPsrZbuAA.png


  • Profile Image
    JoelBerman
    Answered on February 12, 2021 at 09:09 AM

    Excellent workaround. This is a problem I've been struggling with for months and had to give up on.

    Well done.