
First, you'll need to install and configure an on-premises data gateway. This acts as a bridge, allowing Power Automate (a cloud service) to securely connect to data sources on your local server.
The 'When a file is created (properties only)' trigger is for files created in SharePoint, not on a local server. Unfortunately, there isn't a direct trigger in Power Automate that monitors a local server folder for new files. A common workaround is to use a scheduled flow.
Scheduled Cloud Flow: Create a flow that runs on a schedule (e.g., every 5 minutes). This flow will regularly check a specific folder on your server for new files.
Within your scheduled flow, you'll use specific actions to manage the file transfer.
Get Files: Use the "Get files (properties only)" action from the File System connector. This action, which connects via the on-premises data gateway, will list the files in the specified folder on your server.
Apply to Each: Add an "Apply to each" control to iterate through the list of files you just retrieved.
Get File Content: Inside the "Apply to each" loop, use the "Get file content" action (File System connector) to get the binary content of each file.
Create File in SharePoint: Next, add the "Create file" action from the SharePoint connector. This action will save the file to your desired SharePoint document library. You'll need to provide the SharePoint site address, the destination folder path, the file name, and the file content (the output from the previous "Get file content" action).
Make this answer verified if this helps