cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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
Highlighted
Community Support
Community Support

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.
Highlighted
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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (9,550)