Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Gather username as dynamic content from creator of OneDrive file

(0) ShareShare
ReportReport
Posted on by

I have created a Flow from the default template of "Copy files between OneDrive for Business and SharePoint" and added a step to send a notification email that contains the following;

 

New item [DisplayName] is located at [Path] and was created [LastModified]

You can access the file at "{SharePoint teamsite URL typed out}[File name]"

 

Where items in square brackets are selected from Dynamic Content. This works perfectly. Each time a person uploads a file to a selected folder in OneDrive for Business, the file is copied to the correct SharePoint teamsite repository, and an email is sent.

 

I have two questions;

a) I would like the notification email to report which user created / uploaded the file in O4B - I can see the name of the user against the file name in OneDrive for Business, and I would like the notification to report who uploaded the file. What Dynamic Content variable or Formula can I use for this?

For example, the OneDrive for Business folder is shared with JohnSmith@company.com, and they create/upload a file that shows the owner or the file as "John Smith" - how can I get either of these usernames?

 

b) The file is created in SharePoint with the "Created By" owner as me (the creator of the Flow). Is there a way for the Flow to impersonate the user to record the username of the OneDrive for Business user in the SharePoint teamsite? i.e. If John Smith uploads a file to OneDrive, show John Smith as the file creator in SharePoint.

 

Question A is the one I am most focussed on, question B is a value-add.

 

Thanks

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Gather username as dynamic content from creator of OneDrive file

    That's as I suspected. I can see that the OneDrive Step is marked as (Preview), and it only has Folder and Infer Content Type - Hopefully there will be future enhancement to this Step control that will add in the ability to extract object properties to allow this in the future.

  • v-monli-msft Profile Picture
    on at
    Re: Gather username as dynamic content from creator of OneDrive file

    Hi @Anonymous,

     

    About part A, this cannot be achieved as you can see in the dynamic content list, there is no such creator information included:

    Capture.PNG

    You could post this idea in the Flow Ideas forum, so it might be considered for future releases.

    https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

     

     

    But B actually can be achieved using the action "SharePoint-Update file properties". But since the creator account cannot be gotten from trigger, you will need to think of other ways/connectors to get this and fill it in the fields.

    0.PNG

     

    Regards,

    Mona

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1