Hi all,
First of all I got to say that I'm quite new to Flow, so sorry for asking silly questions. I have quite a simple flow which should get data from sharepoint list and write it to excel spreadsheet. I ran my flow a couple of times and it always crashes on data retrieval step with Bad Request error.
Error details: The query to field 'XXX' is not valid. The $select query string must specify the target fields and the $expand query string must contains XXX.
Where 'XXX' is the name of the field whose data I want to retrieve.
All help and explanations will be greatly appreciated.
Hey @Anonymous
Iteresting! You should be using the get items action instead of the get files properties (As I believe the info of invoices are items in a sharepoint list).
You can refer to this flow:
Here, I am extracting all the data with column Name that has values 'Temp' and then adding a row to the excel with the details.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
As far as I know, I'm working on sharepoint list items. I was assigned to this task just a couple of hours ago and hadn't touched Flow prior to this day, so I can't really say anything else on the structure of our sharepoint web/app.
Basically the whole scenario goes like this:
We get info of our invoices and work with it in sharepoint. One of the jobs for accounting is to combine information of many invoices and output a single .xlsx file, based on a simple template, with data from those invoices. Since it is a repetitive task, we figured we can automate it with Flow.
Thank you for your tips on the excel-forming part, I'll take note of them in the future, but now my priority is to fix data retrieval issues.
Hey @Anonymous
You mentioned working with lists and I see the get files action. Can you share more details on the scenario that you are trying to build? Are you working on the sharepoint list items or sharepoint document library?
Next I can see that you are creating this worksheet and creating a table. Note that the create worksheet action will create a new worksheet for you but then the create a table action will simply create the table on the base worksheet and not the newly created worksheet. If there is already a table on the base worksheet with the same range/ overlapping range the flow will error out saying that overlab is not possible.
Finally in the create a table action, you put the dynamic content, this will basically create the columns with the headers as the dynamic content from the sharepoint action. Note that the apply to each loop and the current flow will simply keep creating worksheets and tables only (not a single worksheet and table with all the data).
TO populate a table in excel sheet from flow, you need the excel sheet and the table properly formatted on the escel sheet on the document library.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
My flow currently looks like this. The error occurs on Get Files step.
Maybe I was too obscure about my idea. The point is not to create items on sharepoint. The flow needs to run once a month and take data from existing records in Sharepoint and create a new worksheet with said data. (I can't show you the site address because of our bussiness policy).
Thanks for your reply.
Hi @Anonymous
Can you please share a screenshot of the flow? That way we might better identify the issue and assist you with it. A simple configuration for when items are created on a sharepoint list add a row to excel is :
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1