Search code examples
sharepointpower-automatesharepoint-workflow

power automate user running flow or modified by not available


I am creating a power automate flow using "When a file is created in a folder" and need to send an email to the person uploading the file. However, I do not have the following options available under dynamic content when initializing a string variable:

(I copied this from another site but these options are not available for me)

enter image description here

I also found these dynamic options on another site and this is not available neither under dynamic content:

enter image description here

These are the options I get and only related to the file but no "Modified By" option:

enter image description here

Does anyone know how I can retrieve the userid of the person executing the flow? (uploading the file) Thank You before hand.


Solution

  • I found the solution! Adding a "Get File Properties" action will bring you the additional details for the file that is being uploaded. So in addition to "Get File Metadata" and "Get File Content", also add "Get File Properties" action. Then you can tap into the "created by email" field for the user uploading the file!

    These are the original actions to get the file being uploaded:

    enter image description here

    This is the additional step required, adding a "Get File Properties", which then allows you to use the "Created By Email" property. Below it is being stored in a variable called varUserEmail:

    enter image description here

    Notes:

    Notice that you plug-in the ItemId field from "Get File metadata" in "Get File Properties" as the File Identifier:

    enter image description here