Notion helps users schedule tasks, manage files, save documents, set reminders, keep agendas, organize their work. We can use the Notion API to import data from Notion into Google Sheets. In this tutorial, we’ll show you how to connect the Notion REST API to Google Sheets in 5 steps:
Apipheny is a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser:
Go to https://www.notion.so/my-integrations and click the + New integration button:
Complete all the basic information and then click the Submit → button:
In the Integration type section, check the Internal integration radio button and then click the Save Changes button:
From the Secrets section above, copy the Internal integration token to a safe location, because you’ll need it in the next steps.
A very important step that enables your interation to access your account’s databases is to share those databases with the integration. Begin by opening your database in Notion and going to the Share menu in the upper-right corner.
You’ll see a popup, where you must click Invite:
Click on your newly created integration:
Your integration has been added, now click the Invite button:
Now, your integration will be displayed in the Share popup:
In this section, we’ll show you how to browse the Notion API documentation to find the endpoint that retrieves the information you need from your account. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Notion API documentation page: https://developers.notion.com/reference/intro
The menu on the left contains an Introduction section and a list of endpoints for this API:
An example endpoint is Retrieve a page, which displays a page by id. The URL for this endpoint is:
If you use this URL don’t forget to replace page_id with a real page id.
The endpoint’s documentation contains its HTTP method (GET) and URI, a list of accepted path parameters, an example cURL command and its associated response:
All endpoints can be accessed with the following base domain: https://api.notion.com/v1/
Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the Import tab. With the Import tab open, enter these details into the add-on:
API URL: In Step 3, we explained how you can find the Notion API endpoint that you need. Now copy and paste your complete API URL into the Apipheny add-on, where it says API URL Path, followed by any parameters required for your query (if applicable).
For this example, we are using the Retrieve a database endpoint, which displays a database by id. This is what the whole URL looks like:
If you use this URL, don’t forget to replace database_id with your database id.
Headers: In the Headers section of Apipheny, add two rows with the following keys and values:
Header 1 Key: Notion-Version Value: 2021-08-16 Header 2 Key: Authorization Value: Bearer api_key
In Header 1, make sure to check the current Notion API version and replace header 1’s value with the most current version, if it has changed.
In Header 2, make sure to replace api_key wth the value you previously obtained in Step 2. There should be a space between Bearer and your API key.
Here’s what our API request looks like in Apipheny:
Finally, the last step is to click the Run button at the bottom of the Apipheny add-on and then wait for the Notion API data to be imported into your Google Sheet. Here’s what our request looked like when completed:
That’s it! You’ve successfully connected your Notion account to Google Sheets using the Notion API, Google Sheets API, and the Apipheny add-on.
After making a successful request to the Notion API, try querying a different Notion API endpoint, or try using one of the more advanced features in the Apipheny add-on.
Crypto API Tutorials: