-
Tim_WelchAsked on February 2, 2021 at 4: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.
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
-
Tim_WelchReplied on February 2, 2021 at 4: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...
The File Content appears to be corrupt; is there a better way of doing this?
Cheers, Tim
-
Tim_WelchReplied on February 2, 2021 at 5: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...
-
Elton Support Team LeadReplied on February 2, 2021 at 10:39 PM
We will check this and get back to you with updates.
-
Elton Support Team LeadReplied on February 2, 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:
2. Next, add a Variable action then select Initialize variable. Example:
Name the variable you want e.g. getURL, select String as type, then enter this on value as Expression.
actions('HTTP').outputs.headers.Location
After that, open its settings then Configure run after
And make sure has failed is also selected
3. After that, add another HTTP action, still GET method then select the variable you just created from Step 2 on URI
4. Finally, Create a file on Sharepoint with File Content from the 2nd HTTP Body (see image below).
That's it. I just made a test with this and it works.
-
JoelBermanReplied on February 12, 2021 at 9:09 AM
Excellent workaround. This is a problem I've been struggling with for months and had to give up on.
Well done.