Skip to content

Files

Latest commit

 

History

History

notion-github-sync

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Sample Integration: GitHub Issues to Notion

drawing

About the Integration

This Notion integration syncs GitHub Issues for a specific repo to a Notion Database. This integration was built using this database template and GitHub's Octokit Library. Changes made to issues in the Notion database will not be reflected in GitHub. For an example which allows you to take actions based on changes in a database go here.

Running Locally

1. Setup your local project

# Clone this repository locally
git clone https://github.com/makenotion/notion-sdk-js.git

# Switch into this project
cd notion-sdk-js/examples/notion-github-sync

# Install the dependencies
npm install

2. Set your environment variables in a .env file

GITHUB_KEY=<your-github-personal-access-token>
NOTION_KEY=<your-notion-api-key>
NOTION_DATABASE_ID=<notion-database-id>
GITHUB_REPO_OWNER=<github-owner-username>
GITHUB_REPO_NAME=<github-repo-name>

You can create your Notion API key here.

You can create your GitHub Personal Access token by following the guide here.

To create a Notion database that will work with this example, duplicate this empty database template.

Your Notion integration will need access to the Notion database you have created. To provide access, follow the instructions found in Notion's Integration guide.

3. Run code

node index.js