web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Exporting SharePoint L...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on 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.

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,763 on at

    @Dein88 

     

    You got outputs from get items but email no content?

     

    Please share the attachment code you used in send email

  • Dein88 Profile Picture
    41 on at

    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

     

  • Dein88 Profile Picture
    41 on at

    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? 

     

  • Verified answer
    Dein88 Profile Picture
    41 on at

    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.

  • developerAJ Profile Picture
    4,763 on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard