Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Get Row data for newly created Sharepoint file

Hi all, looking for a little wisdom if I may. I have a project to deliver a digitised process for agency workers being onboarded. However its quiet complex and am looking for the best way to do the following:
1 - Template File uploaded to Sharepoint location via MS Forms (Done)
2 - File name changes each time as previous file with same name caused delivery of said file to have '2' etc added to the end
3 - Flow is triggered by a new file being added to the location (Done)
4 - Flow takes the data from the new delivered excel file and should write the same data to a central file that is corelating all submitted results into a single excel document. This is so that we can manipulate additional flows from the centralised document.


My problem is, I can get the trigger to work, but as the file names change each time a new file is uploaded I cant configure flow to pull row data from that file.


When using the get rows function I'm not able to pull back the colum or rows as the file hasnt been delivered yet, so not able to continue building the flow: either than or when I try dynamic content, it just fails validation as there's no file there to reference.


Is anyone able to suggest how I can reference a unique file name in flow so that it picks up the name of the newly delivered file?



Accepted Solutions

Hi @Deano12 


Use following expression :

 items('Apply_to_each')['<Column Name>']  (for example: items('Apply_to_each')['Basic'])



View solution in original post

Super User
Super User

Hi @Deano12 


If your trigger is when new file added you should get the file name in flow so you should not have an issue on file name changed.

could you please share a screen capture of your flow so i can assist you better?



Hi there,


As simple as this seems, this is where I'm stuck - 

Screen One.jpg

As the file is not currently there, I'm not able to reference any columns or key data yet?


Sorry I forgot to add, I know that OneDrive has slightly more functionality that Sharepoint for the Excel connector, so I've go another flow that copies the delivered sharepoint file out and into a OneDrive location. That is where I'm starting from on this flow.

Hi @Deano12 


Instead of using Get Row use "List rows present in a table". Also if the Table name in Excel wont change you can use "enter custom value" option and type in table name.


Again, thank you for your fast reply - I quickly tried to see if I could make that work, and what I get back in this:

Screen two.jpg

I've build the segment like this:

Screen 3.jpg


OOk - I realised where I had got the last bit wrong sand used \ instead of /.


However on correction of that mistake I now get:

Screen 4.jpg

My brain is hurting, as the 'invalid' value is the correct file patch to the file?

Hi @Deano12 


Try using file identifier like below:


if you still get the JSON error test with sample test file to make sure its not the data in excel that causing this error.



Yes! That worked! Thank you.


This moves me onto my next challenge - I'm trying to now take that row data and apend it onto a master file of the same format. However, I cant seem to set the dynamic column entries when configuring the segment. Do you have any idea how I would configure dynamically the entries for each column based on the listed rows from above?

Screen 5.jpg

Thanks again

Hi @Deano12 


Use following expression :

 items('Apply_to_each')['<Column Name>']  (for example: items('Apply_to_each')['Basic'])



View solution in original post

I just wanted to say - You Sir are a star!

This has worked and solved my problem.


I'll admit, there is no way I would have known about that expression, I would have been trying for days and days without getting it, so thank you!

Helpful resources

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (58,663)