Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
/ Jira2Notion Public archive

A small Python app to create Notion pages from Jira issues

License

Notifications You must be signed in to change notification settings

keremkoseoglu/Jira2Notion

Repository files navigation

Jira to Notion

This little program will capture a Jira issue and create a corresponding Notion subpage. Mac users can fetch the current issue from the foremost Chrome or Safari window. Others will get a popup asking for the issue number.

Screenshot

Installation

OS independent

  • Install Python First. The program won't work unless you install Python. Click here to install Python. The official Python docs are good enough to help you through the installation.

  • Create a folder (presumably called j2n), and download all of the files in this repository there

  • Open a terminal window, go to the j2n folder and type the following commands:

python3 -m venv venv

Windows

If you are using Windows, continue with the following commands:

venv\Scripts\activate.bat
pip install notion
pip install jira

Mac / Linux

If you are using Mac or Linux, continue with the following commands:

. venv/bin/activate
pip install notion
pip install jira

Setup

OS independent

  • Ensure that you have Notion and Jira accounts (doh)
  • Create a new config file which looks like sample_config.txt. You are going to fill this file with your credentials. Jira credentials are intuitive. Notion credentials are explained below.
  • Ensure that config.py points to your own configuration file, which you have prepared above

Jira2Notion can run via to distinct API's: The (deferred, slow) unofficial API, and the (recommended, fast) official API.

If you want to use the unofficial Notion API:

  • Remove the "notion_official" section from your config file
  • Fill the "notion" section in your config file with the following values:
    • token_v2: The value you should enter here is stored in a cookie called token_v2, which will be found in the browser you are logged in to Notion.
    • page: This is the URL of the page you are going to transfer your Jira issues to. Simply copy & paste the page URL from your browser.
  • (Optional) modify notion_dao/api_v1.py to change the content of your cards

If you want to use the official API:

  • Follow the steps in Notion API documentation - check "Getting Started" to enable API's in your Notion account. You will end up with a database ID and secret token.
  • Put those values into the "notion_official" section of your config file.
  • (Optional) modify notion_dao/api_v2.py to change the content of your cards

Mac OS (optional)

If you wish to fetch the Jira issue in your current browser window automatically; open "Chrome - Jira to Notion.applescript" or "Safari - Jira to Notion.applescript" using Apple Script Editor and export as j2n.app (or whatever name you like)

Usage

Windows

Simply run main.py. This will open a popup and ask for your Jira issue number. The issue you enter here will be read from Jira and transferred to Notion. You can run main.py from the command line by typing:

cd j2n
venv\Scripts\activate.bat
python3 main.py

Obviously, you should change the folder name j2n with your own installation path. Feel free to create a .bat file including this command for easy startup.

Linux

Simply run main.py. This will open a popup and ask for your Jira issue number. The issue you enter here will be read from Jira and transferred to Notion. You can run main.py from the command line by typing:

cd j2n
. venv/bin/activate
python3 main.py

Obviously, you should change the folder name j2n with your own installation path. Feel free to create a .sh file including this command for easy startup.

Mac OS

Follow the Linux steps for the popup.

If you have completed the optional Mac setup steps; you can also transfer the Jira issue in your current browser to Notion.

  • Open a new issue in Chrome or Safari
  • Run j2n.app

Releases

No releases published

Packages

No packages published