Skip to main content
Community site session details

Community site session details

Session Id : jIBrq06nhHd1AWDo3EPiCO
Power Apps - Building Power Apps
Answered

Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

Like (0) ShareShare
ReportReport
Posted on 13 Jun 2023 13:59:54 by 41

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

Dein88_0-1686648318849.png

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.

Dein88_0-1686663149316.png

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.

Dein88_1-1686663872767.png

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.

Dein88_2-1686664607906.png

Your help is much appreciated.

  • developerAJ Profile Picture
    2,855 on 15 Jun 2023 at 03:39:17
    Re: Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

    @Dein88 

    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:[] 

  • Verified answer
    Dein88 Profile Picture
    41 on 15 Jun 2023 at 00:51:42
    Re: Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

    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:

    Dein88_3-1686790208476.png

    and I finally get to download the file with the required table content. Alhamdulillah.

  • Dein88 Profile Picture
    41 on 15 Jun 2023 at 00:21:50
    Re: Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

    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:

     

    Dein88_0-1686788128193.png

    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:

    Dein88_2-1686788469302.png

     

    How can I fix this? 

     

  • Dein88 Profile Picture
    41 on 14 Jun 2023 at 03:39:44
    Re: Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

    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

     

    Dein88_0-1686713769491.png

     

  • developerAJ Profile Picture
    2,855 on 13 Jun 2023 at 14:14:26
    Re: Exporting SharePoint List to CSV through Get Items in Power Automate - Blank Results

    @Dein88 

     

    You got outputs from get items but email no content?

     

    Please share the attachment code you used in send email

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2