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.