A small Node app to create or update Notion pages from Jira issues.
- ✅ Import issues from JIRA into Notion regularly
- Regularly time: Every hour from 09:00 (UTC+8) through 21:00 (UTC+8) on every day-of-week from Monday through Friday.
- Condition: Has been updated in the past 12 hours and is the current user’s issue.
- ✅ Check whether the issue already exists in Notion to avoid repeated import.
- ✅ Check whether the issue status of the existing Notion is the same as the status in JIRA, and update it.
- ✅ Use Firestore to save all sensitive data.
If you did not serve your own server, you do not need to create Firestore database.
Just follow step 1 to 23 generate your JIRA and Notion token and setup Notion page.
And give your token to somebody who serves the server and Firestore database.
We need JIRA token to access your JIRA data without user ID and password.
-
- Login and go to Atlassian manage profile. Click create API token.
The page which you want to import the JIRA issues need to have specified columns.
In the real version, we have defined the following fields.
We expect to add more fields in the future and manage these fields through config.
- Done
- type:
Checkbox
- type:
- Status
- type:
Single select
- type:
- Name
- type:
Title
- type:
- JIRA Key
- type:
Text
- type:
- JIRA Link
- type:
URL
- type:
We need Notion token to access your Notion database.
-
- Login and go to Notion integrations page. Click create new integration.
-
- Copy the database ID.
https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=... |--------- Database ID --------|
In order to store sensitive data, including information such as certificates and mailboxes, and to manage configuration parameters through the Firestore database in the future.
We must first create a Firestore database and link it.
-
- Go to Firestore console and create new project
Go to your Firebase console, and setup Database with following schema.
-
Path
users (collection) --> <AUTO_GENERATE_UID> (document) ----> (fields)
-
Fields
{ "jiraEmail": "<YOUR_JIRA_ACCOUNT_EMAIL>", "jiraToken": "<YOUR_JIRA_ACCOUNT_TOKEN>", "notionDatabaseId": "<YOUR_NOTION_DATABASE_ID>", "notionToken": "<YOUR_NOTION_TOKEN>" }
When everything is done, your Firestore will look like this:
If you need handle multiple account, just add data in (document) below users
(collection)
- Node: v14.16.1
After you finish the above configurations, then do
sh ./scripts/runScript.sh
It will build the latest version of the code and name the container to jira2notion
and auto run it.
cd server
yarn install
yarn start
docker build -f scripts/Dockerfile -t jira2notion:latest .
docker run --name jira2notion -dit jira2notion
Released under the MIT License.