Generate the .CSV file with all the submissions (verified and spam)

Inside app.netlify,com, we have the button to download all the submissions of a form as a .CSV file. I’m wondering if there is any chance to generate this file outside the app, or via API, or CMSnetlify or some othe way. The main goal is to share this option with a client, so the client can generate this file without registering as an extra user for the

Link to the site hosted on Netlify:

Only netlify logins would be able to make API calls; almost all API calls are authenticated and form submissions definitely are part of the group requiring authentication.

We won’t format anything for you into a CSV or whatever when you query via API, but you can of course use it to grab json data and do what you want with it. This article talks about it in more detail:

The usual method of doing this is to have notifications set up to point to your client. A few ways to do this - email for every submission not so useful in collating things, but you could without writing any substantial code set up a notification to send to upon submission, and have zapier store the submissions in a shared google sheet or something.

Ok, thanks man. Zapier is an option yes, the email notifications also I used, I just found the .CSV file very useful for some clients.

According to your link:
If submissions forms are authenticated API calls, using GET /forms/{form_id}/submissions I can pull all the submissions, and with that data create my pseudo file that my client can download it, am I right?
If this action can be performed inside CMS netlify, that would be very cool :slight_smile:

Yup, that is the right call and should dump everything. I don’t know the delete an entry call, but you can find it the same way you found that one - by watching our UI do it so you can “clean up” and not re-re-re-re-fetch that first submission every time :slight_smile:

The CMS doesn’t run any code for you, so I’m not sure how you’d set that up, but hey, it’s open source and encourages developers to extend it, so maybe you could figure something out :slight_smile: One way I can think of to “automate” the call is a netlify function: …where it IS safe to put your API Authentication token (in a function, NOT on your website, where anyone could download it and remove your sites!)

1 Like