Hi,
Can someone tell me why the .csv file sent to my email ends up with headers but blank table?
What I did: I have created this button that is intended to export the entire filtered data in a gallery into a .csv file which will be sent to the user or my inbox in this case - upon success.
The button has the followingOnSelect property:
ExportCSV.Run("'Status_1.SelectedText'", "'"&DateFrom_1.SelectedDate&"'", "'"&DateTo_1.SelectedDate&"'",User().Email);
Notify("Export Process Started. You will receive an Email once completed", NotificationType.Success, 3000)
Status_1 is the filter button that filters results based on the work status while DateFrom_1 and DateTo_1 are the respective date filters.
This is how I designed the flow on PowerAutomate
The PowerApps (V2) action contains variables that each will take in dynamic values from the respective input i.e. Status_1, DateFrom_1, DateTo_1 and User().email.
and under the Get Items action I use the variables to help filter the data stored in the Sharepoint list before getting it all to be processed out into a .csv table via the Create CSV table action.
And lastly the CSV table will be sent out to the designated email as an attachment via the Send an Email (V2) action.
I manage to receive the email and .csv file as an attachment but the file contains nothing aside from the headers.
Your help is much appreciated.
Glad to hear you solved it
Issue is with the get items not the csv table or outlook.
For future reference : when you face such issues try checking the runflow history of flow. you will be able to see what input you gave and what output you received from their you can easily figure out which action caused you trouble.
in this case the output from get items is blank Body:[]
Problem Solved!
Thanks to the short description written in this blog:
https://sharepains.com/2021/01/19/filter-query-get-items-power-automate/
What I did was that I placed brackets and quotation marks between each query parameters inside the Get items action as such:
and I finally get to download the file with the required table content. Alhamdulillah.
Update:
Considering that I used String or Text type to collect Date from the two Date Pickers in the first attempt, I think that might have confuses the interpreter. So I changed the type to Date instead such as the following:
and changed the OnSelect property of the button to the following:
ConvertExcel.Run(Status_1.Selected.Value, Text(DateFrom_1.SelectedDate,"yyyy-mm-dd"), Text(DateTo_1.SelectedDate,"yyyy-mm-dd"), User().Email); Notify("Export Process Started. You will receive an Email once completed", NotificationType.Success, 3000)
Unfortunately I'm getting the following error:
How can I fix this?
Hi @developerAJ ,
No. Basically I have received the email together with the .csv file as an attachment.
But the problem is the .csv file contains nothing except the headers that I created in the Create CSV Table action.
Here's what you're looking for
You got outputs from get items but email no content?
Please share the attachment code you used in send email
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2