It's great to hear that your automatic approval flow is working, but you'd like to see the name of the person who put the file in the folder on SharePoint as the "Requested By" person instead of yourself. To achieve this, you need to ensure that the flow is retrieving the correct user information from SharePoint.
Here's how you can do it:
1. **Trigger Configuration**:
- Review the trigger configuration of your flow. Typically, when a new file is added to a SharePoint folder, the trigger should provide information about the file, including the file properties and the user who uploaded the file. Make sure you're using the appropriate trigger to capture this information.
2. **Get File Properties**:
- In your flow, after the trigger, add an action to "Get file properties" or "Get file metadata" for the file that was added to the SharePoint folder. This action will allow you to access additional details about the uploaded file, including the user who uploaded it.
3. **Extract User Information**:
- Once you have the file properties, you should be able to extract the information about the user who uploaded the file. Typically, this information is available in the "Created By" or "Modified By" properties of the file. These properties should include the user's display name, email, and other relevant information.
4. **Set Requested By**:
- After extracting the user information, use it to set the "Requested By" field in your approval action. You can usually set the "Requested By" field to the display name or email of the user who uploaded the file.
By following these steps, the "Requested By" person in the approval flow should now be the person who put the file in the SharePoint folder.
If you're still having issues with the flow not capturing the correct user information, double-check the trigger configuration and the data available from the SharePoint file properties. Additionally, you can use the "Compose" action to inspect the output and understand the data structure, which will help you extract the correct user information.
Remember to consider the permissions and access rights of the flow itself. The flow should have the necessary permissions to access the SharePoint folder and retrieve the file properties.
If you encounter specific difficulties or have more detailed questions about your flow's configuration, feel free to share additional details, and I'd be glad to assist further!