Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Button to trigger automation or script to export data to csv

Topic Labels: Interface Designer
927 6
Showing results for 
Search instead for 
Did you mean: 

Is there a way to have a button on the interface run a script or automation to export data to a csv? If it can be done with a script please advise on the script code needed. Thank you in advance.

6 Replies 6

I’m not sure if a script can do automatically export CSV files or not, but there are lots of JavaScript experts in this forum, so hopefully someone will have the answer for you.

In the meantime, I have several of my clients automatically exporting CSV files on a daily basis with

Note that this isn’t a straightforward “Export To CSV” functionality. It’s a 3-step process:

  1. First, you need to create one row at a time in a Google Sheets spreadsheet.
  2. Then, you can export to CSV in Google Drive (or some other cloud storage provider).
  3. Then, you can email it to someone from there (or do whatever else you want to do with the CSV file).

Thank you for the response. It is easier to just go into the base and export to csv than use Make or Zapier. The reason I want the button is so a user that just access the interface could export as well. Hopefully a scripting guru has an answer. may be able to help you here - create a simple URL for automated CSV export

If anyone does have a solution to this, I am also after the same thing - I want to use AirTable’s button to either run a webhook/create a CSV Export of the particular Table View that the interface is showing.

The reason we don’t have to use the extra clicks in the Base to ‘download CSV’, is we want Interface only users to be able to click the button from Interface Designer.

Here are a few thoughts about buttons, interfaces, and creating a CSV file.

  • An “interface only user” is a matter of convenience. Currently, anyone with access to an Airtable interface has access to the entire base.
  • There are currently two types of buttons available in an interface: button fields and button elements. Neither can run code directly.
  • A user can make a data change in an interface (either directly or using a button element) that triggers either a native Airtable automation or a 3rd party automation.
  • If you want a CSV file (versus data in CSV format in a long text field) you will need to involve a 3rd party service at some point in the process. Even if you use a scripting automation action, the script will need to use a 3rd party service to create the file.

Thanks @kuovonne

I understand the first two points. I’m hoping that AirTable soon extends the functionality of Interfaces where users CANT access the entire base. We currently have users who never need to see the base, they’re ‘interface only users’ as matter of convenience as you say. But we would also reallllly like to share interfaces with users who should not be able to access the base. So hopefully this is in the roadmap.

On your other points about the data change in the base (after the button is clicked) actually doing the triggering - I’ll look into that. Then yes, using 3rd party automation (Make/Integromat in our case) to create the CSV.

Will likely work as a workaround - still would like to see a native ‘print’ & ‘export’ button in Interfaces.