CSV Links and Google Sheets Export

Enterprise customers can use CSV links to import live query results into spreadsheet apps like Google Sheets. Using a query's CSV link, you can import your data into a spreadsheet and have it update automatically as new query results come in.

Using CSV Links with Google Sheets

You can find the CSV link for your query in the share modal:

Note that we need to provide public access to your query results in order for Google to be able to fetch them on your behalf, so you must set your query permission to "Public" and check the "Include results" box. You may need to configure your account settings to allow public sharing if these options are not available.

In Google Sheets, you can now use the IMPORTDATA function with the CSV link to pull in our query results. Click into a cell and enter the formula:

= IMPORTDATA("<paste your CSV link here>")

Press enter and your query results should appear:

Google Sheets

You can now work with your query data inside of Google Sheets. Sheets will periodically refresh the results using the CSV link, so if we have a scheduled query set up in PopSQL this will ensure Sheets is always pulling in the latest results. You can even reference the values in any of the imported columns, and your formulas or conditional formatting will update automatically as new data is pulled in.

Refresh Rates

  • Google Sheets will update the data automatically at up to 1 hour intervals
  • To manually force Google Sheets to refresh the data, you can delete the cell with the IMPORTDATA function and press CMD/CTRL+Z or "undo".
  • PopSQL does not automatically run your queries unless you have a scheduled query configured. If you would like to get near "realtime" updates in Google Sheets, you would configure a schedule to run your query at least every hour to match the Google Sheets refresh frequency.

Cookie settings