Using logic apps to place a file into sharepoint

Leo Cappello 0 Reputation points
2025-01-27T21:25:44.3566667+00:00

I am using logic apps to read in results of a jotform and place the responses into SharePoint as a pdf. The form has a file upload question. I want to place the attached file into SharePoint as well but am having trouble. The part that wont work is shown below.
User's image The next HTTP element uses GET and the result of the compose element as a URI and method.

The initialize variable is shown below:

User's image

The second HTTP element uses the output of the initialize variable element and as the URI and GET as the method.

The last part just creates a file in SharePoint using the content of the second HTTP element.

This app has never run past the Compose element citing this error:

InvalidTemplate

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language function 'xml' expects its parameter to be a string or an object. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#xml for usage details.'.

When I take the Compose element out I get this error on the first HTTP element:
BadRequest

The provided 'Http' action URI 'sanitized' is not valid. The URI must be a well formed absolute URI not referencing local host or UNC path.

I have ensured that the file is public after it is uploaded to jotform and one does not need to sign in to view/download it.

I know jotfrom is slightly different than other platforms but I have tried Microsoft forms as well and had the same issue.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,332 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,780 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 1,150 Reputation points Microsoft Vendor
    2025-01-29T14:21:47.54+00:00

    Hi @Leo Cappello ,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    It appears that you're experiencing difficulties with your Logic App while attempting to process a file upload from JotForm and save it to SharePoint. Here are some recommendations to help you troubleshoot the errors you're encountering:

    • This error suggests that the Compose action is receiving a null value. Make sure that the input to the Compose action is properly configured and that the expected data is being passed from the previous action. It may be helpful to add a condition to verify whether the input is null before continuing.
    • The error message indicates that the URI you're using in the HTTP action is invalid. Ensure that the URI is an absolute URL and does not point to localhost or any UNC paths. Additionally, verify the output from the previous steps to confirm that the URI is correctly formatted.
    • Since you indicated that the file is public, please verify that the sharing settings in JotForm permit public access without requiring sign-in. This is essential for the HTTP GET request to function correctly.
    • Since you also attempted to use Microsoft Forms and faced similar issues, make sure that the file upload functionality is properly configured and that the files are accessible in the expected format.
    • Utilize the run history feature in Logic Apps to examine the outputs of each action step. This can assist in pinpointing where the data may not be passing through correctly.

    For your reference, please review the following documentation for further clarification:

    Common ways to use a form in a flow

    Resolve file upload errors in Microsoft Forms

    I hope this answers your query! Let me know if you require any additional help or clarification.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.