Download csv file using xano endpoint

Hi Folks,

I have a simple user table where I want to enable an Administrator to ‘download all’ company users to a csv file.

For context, the xano endpoint requires authentication, role based preconditions, and is returning the data correctly.

Naively, I thought it would trigger the automatic download of the file. But it doesn’t.

What do I need to put as the second action in my workflow?

Appreciate the help.

Hi @MichaelLovell :wave:

From what I understand, Xano is returning the data you’re interested in the first action. You could then use the Download CSV action in your workflow to download that data in a CSV format.

Thanks @Joyce

I had originally been following the xano tutorial ‘Generating csv files’ from 4:40min here

and returning the csv formatted data (which then didn’t work with the Download CSV action)

Not sure what the differences/benefits of the different methods are, but I changed the endpoint back to standard response (rather than csv formatted) and added the Download CSV action which works fine.

Thanks for your help.

1 Like

@MichaelLovell do you mind expanding upon how you got it to work? our csv download works fine when run within xano. but when we map the data to the WW csv download step, its not properly formatting the header and individual rows. feels like what you were originally experiencing but i dont quite follow what you did to fix it.

@Alexis can you please confirm this csv download is working properly? i manually returned my data from Xano to ensure it properly is split per the doc @Joyce linked above

image

but the exported file is reflecting each row in column A. is this expected behavior?

No rush on this, I was able to get the download working using javascript in any event

I have the same issue

What I did is to create a file/attachment resource of the CSV data in Xano and return the URL of that file in the API response. Then I use download file by URL in Weweb