Create file as action in power automate in On-Premise SP

Charlie Martharper 125 Reputation points
2025-12-05T12:00:43.6733333+00:00

Hi!

I was creating a file action in Power Automate but I don't know why, I am not getting the file content in the SP. Could it be because SP On-Premise doesn't support that action? This is the flow:

User's image

This is the error I am getting: User's image

Let me know what you think... I came from Power platform community and they told me something wrong but don't know if on premise sp could support it.

Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-05T12:01:56.7133333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    In Power Automate, the ability to create a file in SharePoint On-Premises is supported. However, the action you are using might not be configured correctly, or there could be other issues affecting the flow. It's important to ensure that you are using the correct action for creating files and that all required parameters are filled out properly.

    If you are not getting the file content, it could be due to a few reasons:

    1. File Size Limitations: Ensure that the file you are trying to create does not exceed any size limits set by SharePoint.
    2. Permissions: Check if you have the necessary permissions to create files in the specified document library.
    3. Flow Configuration: Review the flow configuration to ensure that the action is set up correctly and that you are passing the correct content to the file creation action.

    If you provide more details about the specific action you are using and any error messages you are encountering, I may be able to give more targeted advice.


    References:

    0 comments No comments

  2. Michelle-N 9,245 Reputation points Microsoft External Staff Moderator
    2025-12-05T13:51:44.4933333+00:00

    Hi @Charlie Martharper

    Thank you for reaching out to Microsoft Q&A forum.

    Based on the information and screenshots you provided, I understand that your "Create file 2" action is failing with a "NotFound" error when trying to create a file in SharePoint On-Premise using a dynamic folder path. You are wondering if this is a limitation of SharePoint On-Premise regarding file content.

    The error "NotFound" usually indicates that the destination location does not exist, rather than an issue with the file content itself. First, please ensure you are using the correct connection. If you are targeting a SharePoint On-Premise environment, make sure you are using the correct SharePoint connector configured with an On-Premises Data Gateway.

    If you mistakenly use a SharePoint Online connection string or credential to point to an On-Premise URL. However, since the error is specifically "NotFound" rather than "Unauthorized" or "BadGateway," the connection itself is likely fine, but the target is the issue.

    The SharePoint "Create file" action acts strictly as a file creator. It does not automatically create intermediate folders. If your Folder Path is /Library/FolderA/FolderB, and FolderB does not exist yet, the action will fail with NotFound.

    Your Scenario: In your second screenshot, your "Folder Path" is constructed dynamically using variables like Value, body/Department, and a replace(...) expression. If any part of this dynamic path results in a folder name that hasn't been created yet, the flow will fail.

    Please ensure the "Folder Path" is a server-relative URL and the destination folder exists before the "Create file" step runs.

    To confirm this, you can try manually creating the specific folder in SharePoint that corresponds to the path in your failed run.

    Hope my answer will help you, for any further concern, kindly let me know in the comment section.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".     

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

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