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

When file is created Move File in Onedrive for Business

I am trying to create a flow using One Drive for business. Basically the flow is supposed to look in a One Drive Folder (Test 1) and if a Excel CSV file is created, copy it to a One Drive folder (Test 2), send me an email notification, then delete the original file from (Test 1).

The whole flow says it ran successfully and I am getting the email notification but  it is not creating the new file in Test 2 or deleting the file from Test 1. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @jdill1313 ,

 

When configuring the Create file action, you missed the file extension.

You can use the following method to get the extension of the source file and add it to the new file.

When configuring the Delete file action, use File identifier output by When a file is created.

It is also recommended to set the Folder in When a file is created to the folder where the file is stored.

34.PNG

Expression reference:

last(split(triggerOutputs()['headers']['x-ms-file-name'],'.'))

 

Best Regards,

Community Support Team _ Barry
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

4 REPLIES 4
jdill1313
Regular Visitor

Here is the flow I created. 

 

 

Flow One Drive.PNG

 

 

your flow looks good, can you share the expanded successful run output?

v-bacao-msft
Community Support
Community Support

 

Hi @jdill1313 ,

 

When configuring the Create file action, you missed the file extension.

You can use the following method to get the extension of the source file and add it to the new file.

When configuring the Delete file action, use File identifier output by When a file is created.

It is also recommended to set the Folder in When a file is created to the folder where the file is stored.

34.PNG

Expression reference:

last(split(triggerOutputs()['headers']['x-ms-file-name'],'.'))

 

Best Regards,

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

Thank you for your help. Those steps worked perfectly. 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,853)