Notion database rows into Google Sheets
Recipe notion for Sheets API Connector.
1. Get a key
You need an internal integration secret (notion.so/my-integrations). Then open the database in Notion, choose ··· > Connections, and add the integration, or every request returns 404.
2. Load the example
In Google Sheets open Extensions > Sheets API Connector > Open request builder. Under Load example, pick this recipe. The form fills in with the settings below.
3. Fill in your details and run
Replace DATABASE_ID with the 32-character id in the database URL. The body is {"page_size":100}; add a Notion filter or sorts to it if you need them.
Paste your key under Auth, then click Run. Click Save to keep it, and set Scheduled refresh to refresh it daily or hourly (paid plans).
Settings
| Method | POST |
|---|---|
| URL | https://api.notion.com/v1/databases/DATABASE_ID/query |
| Headers | Notion-Version: 2022-06-28 |
| Auth | Bearer token: your integration secret |
| Pagination | Cursor · Cursor path next_cursor · Cursor param start_cursor · Has-more path has_more · Cursor goes in: JSON body · Max pages 50 |
| Records path | results |
| Layout | One row per record |
| Only these fields | (all; property values appear under properties.<name>) |
Notion's database query is a POST and takes the next cursor in the JSON body as start_cursor, so the cursor goes in the body rather than the URL.
If it fails
- HTTP 404: The database is not shared with the integration (Connections), or the id is wrong.
- HTTP 400: The JSON body is not valid JSON.
- Anything else: click Copy diagnostics on the error card and email it to support@tanglement.ai. Keys and tokens are removed from the report. Failed runs do not count toward your monthly requests.
Google Sheets is a trademark of Google LLC. This add-on is not made or endorsed by Google. Other product names are trademarks of their owners.