cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sjd889
Regular 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
annajhaveri
Community Champion
Community Champion

@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
Regular Visitor

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

 

sjd889_1-1657804189328.png

 

 

annajhaveri
Community Champion
Community Champion

@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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022- Season 2 has kicked off!

Users online (2,565)