Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

Notion x GitHub Action

Actions
Sync GitHub issues to a Notion database
1.0.0
Star (89)

Notion x GitHub Action

Code Style: Google

Connect your GitHub issues to a Notion database.


Configure

  1. Create a new internal Notion integration and note the value of the Internal Integration Token.
  2. In your GitHub repository, go to Settings > Secrets, and add a New repository secret. Set the Name to NOTION_TOKEN and the Value to the Internal Integration Token you created in the previous step.
  3. Set up your Notion Database. Use this template and duplicate it to your workspace. Screen Shot 2021-06-14 at 11 37 51 AM
  4. In your Notion Database page's Share menu, add the Notion integration you created as a member with the Can edit privilege. You may have to type your integration's name in the Invite field. Screen Shot 2021-06-14 at 11 41 25 AM
  5. Find the ID of your Database by copying the link to it. The link will have the format
https://www.notion.so/abc?v=123

where abc is the database id.

  1. Add the Database's ID as a repository secret for your GitHub repository. Set the Name to NOTION_DATABASE and the Value to the id of your Database.

Use the Action

In your GitHub repository, create a GitHub workflow to use this Action in.

At minimum, the workflow must run on issues.opened. To have the database update, the workflow must also run on the following issue types: opened, edited, labeled, unlabeled, assigned, unassigned, milestoned, demilestoned, reopened, closed.

Create a file in your repository called .github/workflows/issues-notion-sync.yml.

on:
  issues:
    types: [opened, edited, labeled, unlabeled, assigned, unassigned, milestoned, demilestoned, reopened, closed]

jobs:
  notion_job:
    runs-on: ubuntu-latest
    name: Add GitHub Issues to Notion
    steps:
      - name: Add GitHub Issues to Notion
        uses: instantish/[email protected]
        with:
          notion-token: ${{ secrets.NOTION_TOKEN }}
          notion-db: ${{ secrets.NOTION_DATABASE }}

Notion x GitHub Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Sync GitHub issues to a Notion database
1.0.0

Notion x GitHub Action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.