{"id":13998381,"url":"https://github.com/azu/bluenotiondb","last_synced_at":"2026-01-31T12:18:10.017Z","repository":{"id":183235356,"uuid":"669798487","full_name":"azu/bluenotiondb","owner":"azu","description":"Sync Bluesky/GitHub/Calendar/RSS to Notion.","archived":false,"fork":false,"pushed_at":"2024-04-14T03:55:00.000Z","size":386,"stargazers_count":23,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-05T23:10:04.076Z","etag":null,"topics":["bluesky","github","notion","search"],"latest_commit_sha":null,"homepage":"https://azu.github.io/bluenotiondb/","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/azu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"azu"}},"created_at":"2023-07-23T13:15:32.000Z","updated_at":"2025-01-25T00:49:02.000Z","dependencies_parsed_at":"2024-01-15T19:44:48.427Z","dependency_job_id":"ac8f706c-03fd-4d2f-a9bb-b23747d38b63","html_url":"https://github.com/azu/bluenotiondb","commit_stats":null,"previous_names":["azu/bluenotiondb"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fbluenotiondb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fbluenotiondb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fbluenotiondb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azu%2Fbluenotiondb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azu","download_url":"https://codeload.github.com/azu/bluenotiondb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590619,"owners_count":21772939,"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":["bluesky","github","notion","search"],"created_at":"2024-08-09T19:01:37.560Z","updated_at":"2026-01-31T12:18:10.011Z","avatar_url":"https://github.com/azu.png","language":"TypeScript","readme":"# bluenotiondb\n\nBluenotionDB Sync any service to Notion using Cron services like GitHub Actions.\n\n## Purpose\n\nNotion does not support custom sync DB.\nI want to create sync DB for Bluesky or Twitter etc...\n\n`bluenotiondb` is customizable sync DB for Notion.\n\n## Supported Services\n\n- [Bluesky](https://bsky.app/)\n    - Pull Posts from Bluesky and push to Notion\n- [GitHub Activity](https://github.com/)\n    - Pull events of GitHub user and push to Notion \n    - Open/Close/Comment of Issues/PRs etc...\n- [GitHub Search](https://github.com/search)\n    - Pull Issues/PRs or Repositories from GitHub Search and push to Notion\n    - **Required**: need to setup `actions/cache` action to prevent duplicated items\n- [Linear](https://linear.app/)\n    - Assigned Issues, Created Issues, and Activity (comments, status changes, etc.)\n    - **Required**: need to setup `actions/cache` action to prevent duplicated items\n- iCal calendar like [Google Calendar](https://calendar.google.com/)\n    - Pull events from iCal and push to Notion\n    - **Required**: need to setup `actions/cache` action to prevent duplicated items\n- RSS Feeds\n    - Pull posts from RSS Feeds and push to Notion\n    - **Required**: need to setup `actions/cache` action to prevent duplicated items\n\n## Usage\n\n## Setup Notion\n\n1. Duplicate [This Notion Template](https://efcl.notion.site/Demo-Bluenotion-0f9885a393874c2aa7a4765ff5ddf0be)\n2. Create Notion Integration\n    - \u003chttps://www.notion.so/my-integrations\u003e\n    - Copy the API key\n    - Also, You need to install the integration to your Notion Database\n3. Create `BLUENOTION_ENVS` env var using [bluenotiondb env generator](https://azu.github.io/bluenotiondb/)\n    - \u003chttps://azu.github.io/bluenotiondb/\u003e\n\n### via CLI\n\n```bash\n$ BLUENOTION_ENVS='[...]' ./bluenotiondb\n```\n\n### via GitHub Actions\n\n1. Create GitHub repository\n2. Put `.github/workflows/update.yml` to the repository\n3. Copy from \u003chttps://github.com/azu/bluenotiondb/releases/latest\u003e and Paste to `.github/workflows/update.yml`\n4. Set `BLUENOTION_ENVS` to GitHub repository secret\n\n```yaml\nname: Update\non:\n  push:\n    branches:\n      - main\n  schedule:\n    # every 30 minutes\n    - cron: \"*/30 * * * *\"\n  workflow_dispatch:\n\nenv:\n  BLUENOTION_VERSION: v2.3.0\n\npermissions:\n  contents: none\njobs:\n  update:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Download\n        run: |\n          curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb\n          chmod +x bluenotiondb\n      - name: Update\n        run: ./bluenotiondb \u003e /dev/null 2\u003e\u00261\n        env:\n          BLUENOTION_ENVS: ${{ secrets.BLUENOTION_ENVS }}\n```\n\n## Advanced Usage\n\n### Add custom field\n\n- `notion_property_names` option is used for custom property name\n\nYou can change the property name by `notion_property_names` option.\n\n- `Title`: title column\n- `URL`: URL type column\n- `Type`: Select type column\n- `Date`: Date type column\n- `Parent`: Parent type column\n  - Enable \"Sub Item\" in Notion\n  - It will be used for reply representation\n\nFor example, if you want to change `Title` to `Tasks` and `URL` to `url`, you can use `notion_property_names` option.\n\n```\n[..., \"notion_property_names\":{ \"Title\": \"Tasks\", \"URL\": \"url\" }]\n```\n\n- `notion_extra` field is an object like `{ propertyNames: propertyValue }`\n    - `propertyNames` is property name\n    - `propertyValue` is [notion payload](https://developers.notion.com/reference/property-object)\n\nFor example, if you want to add `Tags` column to Notion, you can use `notion_extra` option.\n\n```\n[..., \"notion_extra\":{ \"Tags\": { \"multi_select\": [{ \"name\": \"TEST\" }] }}]\n```\n\n\nLimitation: Currently does not put non-Ascii characters to `.env`.\nYou can use unicode escape sequence like `\\u30bf\\u30b9\\u30af\\u540d` instead of non-Ascii characters.\n\n- [Unicodeエスケープシーケンス変換｜コードをホームページに載せる時に便利 | すぐに使える便利なWEBツール | Tech-Unlimited](https://tech-unlimited.com/escape-unicode.html).\n\n## Recipe\n\n### Sync Google Calendar to Notion\n\n1. Copy your iCal URL from Google Calendar\n2. Create `BLUENOTION_ENVS` env var using [bluenotiondb env generator](https://azu.github.io/bluenotiondb/)\n    - \u003chttps://azu.github.io/bluenotiondb/\u003e\n3. Create Update Calendar workflow\n\n```yaml\nname: Update Calendar\non:\n  schedule:\n    # every 12 hours\n    - cron: \"0 */12 * * *\"\n  workflow_dispatch:\nenv:\n  BLUENOTION_VERSION: v2.3.0\n\npermissions:\n  contents: read\n  actions: write # require to delete cache\njobs:\n  calendar:\n    runs-on: ubuntu-latest\n    env:\n      cache-name: cache-bluenotion-calendar\n    steps:\n      # actions/cache does not support overwrite cache\n      # https://github.com/actions/cache/issues/342\n      # This job implement overwrite cache using restore + delete + save\n      - name: Checkout\n        uses: actions/checkout@v3 # gh command require repository\n      - name: Restore Cache\n        id: cache-restore\n        uses: actions/cache/restore@v3\n        with:\n          path: ./cache\n          key: ${{ env.cache-name }}\n      - name: Download\n        run: |\n          curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb\n          chmod +x bluenotiondb\n      - name: Update\n        run: ./bluenotiondb  \u003e /dev/null 2\u003e\u00261\n        env:\n          CACHE_DIR: ./cache\n          BLUE_NOTION_ENVS: ${{ secrets.BLUE_NOTION_ENVS }}\n      # overwrite cache key\n      - name: Delete Previous Cache\n        if: ${{ steps.cache-restore.outputs.cache-hit }}\n        continue-on-error: true\n        run: |\n          gh extension install actions/gh-actions-cache\n          gh actions-cache delete \"${{ env.cache-name }}\" --confirm\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Save Cache\n        uses: actions/cache/save@v3\n        with:\n          path: ./cache\n          key: ${{ env.cache-name }}\n```\n\n### Sync GitHub Search Results to Notion\n\n1. Create `BLUENOTION_ENVS` env var using [bluenotiondb env generator](https://azu.github.io/bluenotiondb/)\n    - e.g. Fetch your assigned Issue and PR\n      - Query: `assignee:@me state:open`\n      - Type: `Issues`\n2. Create Update GitHub Search workflow\n\n```yaml\nname: Update GitHub Search\non:\n  schedule:\n    # every hour\n    - cron: \"0 * * * *\"\n  workflow_dispatch:\nenv:\n  BLUENOTION_VERSION: v2.3.0\n\npermissions:\n  contents: read\n  actions: write # require to delete cache\njobs:\n  github-search:\n    runs-on: ubuntu-latest\n    env:\n      cache-name: cache-bluenotion-github-search\n    steps:\n      # actions/cache does not support overwrite cache\n      # https://github.com/actions/cache/issues/342\n      # This job implement overwrite cache using restore + delete + save\n      - name: Checkout\n        uses: actions/checkout@v3\n      - name: Restore Cache\n        id: cache-restore\n        uses: actions/cache/restore@v3\n        with:\n          path: ./cache\n          key: ${{ env.cache-name }}\n      - name: Download\n        run: |\n          curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb\n          chmod +x bluenotiondb\n      - name: Update\n        run: ./bluenotiondb  \u003e /dev/null 2\u003e\u00261\n        env:\n          CACHE_DIR: ./cache\n          BLUE_NOTION_ENVS: ${{ secrets.BLUE_NOTION_ENVS }}\n      # overwrite cache key\n      - name: Delete Previous Cache\n        if: ${{ steps.cache-restore.outputs.cache-hit }}\n        continue-on-error: true\n        run: |\n          gh extension install actions/gh-actions-cache\n          gh actions-cache delete \"${{ env.cache-name }}\" --confirm\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - name: Save Cache\n        uses: actions/cache/save@v3\n        with:\n          path: ./cache\n          key: ${{ env.cache-name }}\n```\n\n### Overwrite `type` column\n\nIf you want to overwrite built-in `type` column, you can use `notion_extra` option.\n\n```bash\nBLUENOTION_ENVS='[{\"notion_database_id\":\"xxx\",\"notion_api_key\":\"xxx\",\"rss_url\":\"https://rsshub.app/github/repos/azu\",\"notion_extra\":{\"Type\":{\"select\":{\"name\":\"My GitHub Repository\"}}}}]'\n```\n\n## Related\n\n- [azu/mytweets: Search all your tweets of Twitter/Bluesky](https://github.com/azu/mytweets)\n\n## Architecture\n\n1. Fetch posts from Service\n2. Convert post to ServiceItem\n3. Push ServiceItem to Notion\n\n```mermaid\ngraph LR\n    A[Fetch Service] --\u003e B[Convert to ServiceItem]\n    B --\u003e C[Push ServiceItem to Notion]\n```\n\nIf you want to support a new service, you need to implement the following:\n\n1. Add `services/\u003cservice-name\u003e.ts`\n2. Implement `fetch~` function\n3. Add Env type to `notion/envs.ts`\n4. Add `fetch~` to `index.ts`\n\n## Cache\n\nIf future date will be added, this service should be cached.\nOtherwise, dedupe events by using last updated date.\n\n## Development\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\nTo use local env:\n\n1. Create `BLUENOTION_ENVS` env var using [bluenotiondb env generator](https://azu.github.io/bluenotiondb/)\n2. Crate `.env` file and paste `BLUENOTION_ENVS` to `.env`\n\n```bash\nBLUENOTION_ENVS='[...]'\n````\n\nTo run:\n\n```bash\nbun run main\n```\n\nThis project was created using `bun init` in bun v0.6.0. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.\n\n## Debug\n\nYou can use `DEBUG` env to debug.\n\n```bash\nDEBUG=1 ./bluenotiondb\n```\n\n## Release Flow\n\n```\nnpm version {patch,minor,major}\nnpm run sync-version\ngit push --follow-tags\n```\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/azu"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Fbluenotiondb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazu%2Fbluenotiondb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazu%2Fbluenotiondb/lists"}