{"id":13660000,"url":"https://github.com/litencatt/notion-db-auto-relator","last_synced_at":"2025-04-10T01:14:55.757Z","repository":{"id":43963618,"uuid":"448796586","full_name":"litencatt/notion-db-auto-relator","owner":"litencatt","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-18T00:43:46.000Z","size":67,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:14:48.469Z","etag":null,"topics":["notion","notion-database"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/litencatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-17T07:39:04.000Z","updated_at":"2025-03-10T13:59:23.000Z","dependencies_parsed_at":"2023-01-11T17:22:29.817Z","dependency_job_id":null,"html_url":"https://github.com/litencatt/notion-db-auto-relator","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"6411682e66dbeb540f84fb65d8911622b00bef4e"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fnotion-db-auto-relator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fnotion-db-auto-relator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fnotion-db-auto-relator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litencatt%2Fnotion-db-auto-relator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litencatt","download_url":"https://codeload.github.com/litencatt/notion-db-auto-relator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137891,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notion","notion-database"],"created_at":"2024-08-02T05:01:14.765Z","updated_at":"2025-04-10T01:14:55.737Z","avatar_url":"https://github.com/litencatt.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# notion-db-auto-relator\nCreate and update relation for Parent and Child DB in Notion automatically.\n\n## Usage\n### Setup in Notion\n\n1. Create a parent DB and a child DB that you want to relate automatically.\n1. Duplicate this settings DB.\n    - https://litencatt.notion.site/3dd1ccec8f0740cc90600de413261fdc\n1. Create Notion API Integration.\n    - https://www.notion.so/my-integrations\n1. Invite the API Integration to settings DB, Parent DB and Child DB.\n\n\n\n### Run `notion-db-auto-relator `locally\n```\n$ git clone git@github.com:litencatt/notion-db-auto-relator.git\n$ cd notion-db-auto-relator\n$ yarn\n$ NOTION_TOKEN=*** SETTINGS_DB_ID=*** yarn start\n```\n\n### Run `notion-db-auto-relator` as GitHub Actions\nsettings example\n\n```yaml\non:\n  workflow_dispatch:\n  schedule:\n    - cron: '00 * * * *'\n\njobs:\n  run-job:\n    name: run relation\n    runs-on: ubuntu-latest\n    env:\n      TZ: Asia/Tokyo\n      LANG: ja_JP.UTF-8\n    steps:\n      - uses: actions/checkout@v2\n      - name: Relation\n        uses: litencatt/notion-db-auto-relator@main\n        env:\n          NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}\n          SETTINGS_DB_ID: ${{ secrets.SETTINGS_DB_ID }}\n```\n### Settings DB examples and relation results\n#### Settings DB set values like this,\n\n\u003cimg width=\"1093\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743697-7c43f21a-cefb-45fd-8e2e-06cbfa960b83.png\"\u003e\n\n#### Parent DB and Child DB example\n\u003cimg width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743595-33e0eaad-5a3b-4f28-bf06-b3f269d6b1a2.png\"\u003e\n\n#### Settings1 relation execute result\nSettings1 ✅  and `Run actions` or `NOTION_TOKEN=*** SETTINGS_DB_ID=*** yarn start`\n\n- Relation property `Relation-with-Name` is created to ParentDB.\n- Related like `ParentDB JOIN ChildDB ON ParentDB.Name = ChildDB.Name`.\n\nBefore | After\n-- | --\n\u003cimg width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743595-33e0eaad-5a3b-4f28-bf06-b3f269d6b1a2.png\"\u003e|\u003cimg width=\"1097\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743670-791aaf08-a4b0-4967-96da-bf689c7d4193.png\"\u003e\n\n#### Settings2 relation execute result\nSettings2 ✅  and `Run actions` or `NOTION_TOKEN=*** SETTINGS_DB_ID=*** yarn start`\n\n- Relation property `Relation with Tags` is created to ParentDB.\n- Related like `ParentDB JOIN ChildDB ON ParentDB.Tags = ChildDB.Tags`.\n\nBefore | After\n-- | --\n\u003cimg width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743595-33e0eaad-5a3b-4f28-bf06-b3f269d6b1a2.png\"\u003e|\u003cimg width=\"1106\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743740-5c3fdfd5-6b63-4fcf-9c2d-03197b8f666c.png\"\u003e\n\n\n#### Settings3 relation execute result\nSettings3 ✅  and `Run actions` or `NOTION_TOKEN=*** SETTINGS_DB_ID=*** yarn start`\n\n- Relation property `Relation with Name,Tags` is created to ParentDB.\n- Related like `ParentDB JOIN ChildDB ON ParentDB.Name = ChildDB.Name AND ParentDB.Tags = ChildDB.Tags`.\n\nBefore | After\n-- | --\n\u003cimg width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743595-33e0eaad-5a3b-4f28-bf06-b3f269d6b1a2.png\"\u003e|\u003cimg width=\"1100\" alt=\"image\" src=\"https://user-images.githubusercontent.com/17349045/153743756-0ee469e5-eaea-4488-a0dc-b6a46d8f8c3a.png\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitencatt%2Fnotion-db-auto-relator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitencatt%2Fnotion-db-auto-relator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitencatt%2Fnotion-db-auto-relator/lists"}