Developer tools

Connecting Notion tables to Google Sheets

Alex Black

Alex Black

Overview

Do you use notion? Have you setup tables with lots of data? Using the SyncWith Google Sheets Addon, you can easily create a live connection to pull all the rows in a table live into Google Sheets using the Notion API.

Step 1: Get your API access token

To use Notion's API you'll need an access token, in the format secret_x1BBlsE5pEV5gi5avoaW3NNywenxBHMHLCtP6qvurzn
To get an access token, you need to create an Integration at Notion. I created an internal integration. You can read more here: https://developers.notion.com/docs/authorization

Step 2: Share page(s) with your integration

Before your integration can access any pages (which contain the tables you're interested in), you'll need to share those pages with the integration.
To do this click Share on the top right of the page in Notion that has the table you want to connect to Google Sheets, then in the invite box click to find the integration you setup in Step 1.

Step 3: Find the ID of the table you want

In Notion's API a table is called a database. So we'll use the Notion API endpoint to list databases, and find each of the databases that you've shared with your integration, so you can get the id of the database (or table) you're interested in, which you'll need in the next step.

List notion databases

Please fill in any necessary fields and click Run.

GET

Preview

View the API data, get a live Google Sheet dashboard

object
id
cover
icon
created_time
last_edited_time
title
properties
parent
url
          
          
          

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards

Step 4: Get the rows for the table

Now that you've found the ID of the table (aka database) that you're interested (in Step 3 above), we can use Notion's query database API endpoint to pull all the rows out of the Notion table.
Once you've got the data, you'll need to use the SyncWith + expand feature to expand the properties column to access the properties (columns) of each table row.

Query a notion database

Please fill in any necessary fields and click Run.

POST

Preview

View the API data, get a live Google Sheet dashboard

object
id
created_time
last_edited_time
cover
icon
archived
properties
url
         
         
         

Get a live Google Sheet

Export your data to a google sheet, with the SyncWith Addon, or download to CSV

Automatically updated

Add data sources

Build reports & dashboards