cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Gather username as dynamic content from creator of OneDrive file

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

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

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.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

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

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,904)