cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Rename File, But Keep Originator Email

I have a flow that takes a file from a drop off library and moves it to a "working" library. Before moving the file, I add a date/time stamp to the filename to ensure it doesn't overwrite an existing file that may have been created with the same filename.

 

I'm using the solution posted in this thread to "rename" the file by creating a new file with the new filename and inserting the contents of the previous file.

 

My problem now is that the flow that gets kicked off in the "working" library needs to be able to send an email back to the person who posted the original file. But since my other flow is creating a new file, it's setting the originator email to my email address.

 

How can I create a new file with the new name, but set its originator email to the originator of the initial file?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Mark_Petereit,

 

Do you want to send an email back to the file originator?

It seems that you have created two flows, one flow is used to rename the file, another flow is used to send email to originator.

Please consider combining the two flows into one. I have made the following flow for your reference.

It is triggered by When a file is created (properties only).

Add a compose to return the originator by using dynamic content Created by email.

Add action Get file content.

Create file in a different library, input the following code into the File name field:

concat(utcNow('yyyy-MM-dd'),triggerBody()?['{FilenameWithExtension}'])

 Add action Send an email, select Compose Output for the To field.

A screenshot likes below:

1.PNG

Please take a try with it on your side. 

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Mark_Petereit,

 

Do you want to send an email back to the file originator?

It seems that you have created two flows, one flow is used to rename the file, another flow is used to send email to originator.

Please consider combining the two flows into one. I have made the following flow for your reference.

It is triggered by When a file is created (properties only).

Add a compose to return the originator by using dynamic content Created by email.

Add action Get file content.

Create file in a different library, input the following code into the File name field:

concat(utcNow('yyyy-MM-dd'),triggerBody()?['{FilenameWithExtension}'])

 Add action Send an email, select Compose Output for the To field.

A screenshot likes below:

1.PNG

Please take a try with it on your side. 

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (9,511)