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

Flow is Grabbing Old Excel Documents in OneDrive Instead of Documents Currently in Folder

Hello!

 

I'm having an issue with a flow that is designed to grab a couple of Excels stored in OneDrive/Teams, do a comparison, send out some emails and move the Excel documents out into an archival folder.

 

This is a weekly process, and needs to be run on Excel documents with new data weekly and those documents are manually placed in the same OneDrive/Teams folder a few hours before the process runs. The documents are named the same and are in the same format as the previous ones.

 

Here's the issue. It still picks up and runs the flow on the old documents even though they're in a completely different archival folder. How is this even possible? The only fix I've found so far is to go through the flow and reselect the exact same file pathway options that are already there. Obviously, having to do that defeats the purpose of automation.

 

I've tried dropping the files directly into OneDrive vs. in the Teams folder and syncing them there and that doesn't seem to make a difference. 

 

Please help!

1 ACCEPTED SOLUTION

Accepted Solutions

@sjd889  try using dynamic values for file name and table name, so that flow doesnt cache the table values, see below on  how to do it. This will ensure that flow always gets the latest data from the file.

 

1. Add compose action and store your file name

annajhaveri_0-1657878849388.png

2. Add Get Tables action, in file parameter, use the output of compose action

annajhaveri_1-1657878867088.png

3. Add List rows present in table action, for file parameter select output of compose action, for table parameter use below expression, if your excel has just one table, if it has more than one table let me know then i can provide the logic accordingly.

first(outputs('Get_tables')?['body/value'])['id']

annajhaveri_2-1657878900218.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
annajhaveri
Community Champion
Community Champion

@sjd889  what action are you using to grab the file from onedrive, could you please share the screenshot of the flow?

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.
sjd889
Frequent Visitor

@annajhaveri  I'm using List rows present in a table.

 

sjd889_1-1657804189328.png

 

 

@sjd889  try using dynamic values for file name and table name, so that flow doesnt cache the table values, see below on  how to do it. This will ensure that flow always gets the latest data from the file.

 

1. Add compose action and store your file name

annajhaveri_0-1657878849388.png

2. Add Get Tables action, in file parameter, use the output of compose action

annajhaveri_1-1657878867088.png

3. Add List rows present in table action, for file parameter select output of compose action, for table parameter use below expression, if your excel has just one table, if it has more than one table let me know then i can provide the logic accordingly.

first(outputs('Get_tables')?['body/value'])['id']

annajhaveri_2-1657878900218.png

 

 

Regards,
Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,426)