Re: Button to trigger automation or script to export data to csv

7078 1
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

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.

9 Replies 9
18 - Pluto
18 - Pluto

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 Make.

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.

8 - Airtable Astronomer
8 - Airtable Astronomer may be able to help you here - create a simple URL for automated CSV export

6 - Interface Innovator
6 - Interface Innovator

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.

4 - Data Explorer
4 - Data Explorer

Hello ! 

I don't know if it is still an issues for you but I have found a solution that allows you to have a button that download a view to CSV ! 
I am using the tool that create a link that automatically download the view you want when you run the link in your web browser. By selecting the cols, you can select what fields you want to export. Then, in your interface, you can create a button that trigger an external URL and you set the URL created by csv getter !

I hope it will help ! 

6 - Interface Innovator
6 - Interface Innovator

You can now do it with Excel-Exporter. There is a freemium version and a premium version with a 7 day free trial. You can also ask them custom tools if you have a very specific need. It's a third party app that you can find on the marketplace of airtable and it does 100% of what you ask. Moreover, the data of your export don't go through any server, so it's pretty safe. 

8 - Airtable Astronomer
8 - Airtable Astronomer

I am the developer of the app @maureen has used (Thanks for the mention maureen!)

I have made a video demo of how it is done - and you can find a step by step guide in the description of the youtube video: