https://github.com/stepzen-dev/headless-notion-cms
https://github.com/stepzen-dev/headless-notion-cms
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stepzen-dev/headless-notion-cms
- Owner: stepzen-dev
- License: mit
- Created: 2022-12-09T14:57:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T14:59:02.000Z (over 3 years ago)
- Last Synced: 2025-09-13T05:52:42.291Z (9 months ago)
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StepZen Headless Notion
This is a StepZen schema to create a GraphQL API on top of the Notion API for the purpose of using Notion as a headless CMS.
## Getting Started
In order to use this schema with your Notion account, you will need to create a Notion Integration and get your API key. Learn more about Notion Integrations [here](https://developers.notion.com/docs/getting-started).
It is important to follow steps 2 and 3 in the [guide](https://developers.notion.com/docs/create-a-notion-integration#step-2-share-a-database-with-your-integration) to share a database with your integration, and save the database ID.
Once you have your Notion API key and database ID, create a `.env` file in the root of this project and add the following:
```
STEPZEN_NOTION_KEY=your-notion-api-key
STEPZEN_NOTION_DB_ID=your-database-id
```
The schema is designed to look for a Checkbox property in your Notion database called `published`. This is not required but is recommended. If you wish to use other properties, you will need to adjust the schema to match your database. Look at the `Properties` type in the schema to see which properties are currently supported.
## Deploying to StepZen
The config.yaml file is already set up to use the `.env` file for environment variables. You can deploy this schema to StepZen by running the following command:
```
stepzen start
```