Sync Bluesky/GitHub/Calendar/RSS to Notion.
BluenotionDB Sync any service to Notion using Cron services like GitHub Actions.
Notion does not support custom sync DB. I want to create sync DB for Bluesky or Twitter etc...
bluenotiondb is customizable sync DB for Notion.
actions/cache action to prevent duplicated itemsactions/cache action to prevent duplicated itemsactions/cache action to prevent duplicated itemsactions/cache action to prevent duplicated itemsactions/cache action to prevent duplicated itemsBLUENOTION_ENVS env var using bluenotiondb env generator
$ BLUENOTION_ENVS='[...]' ./bluenotiondb
.github/workflows/update.yml to the repository.github/workflows/update.ymlBLUENOTION_ENVS to GitHub repository secretname: Update
on:
push:
branches:
- main
schedule:
# every 30 minutes
- cron: "*/30 * * * *"
workflow_dispatch:
env:
BLUENOTION_VERSION: v2.5.2
permissions:
contents: none
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Download
run: |
curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb
chmod +x bluenotiondb
- name: Update
run: ./bluenotiondb > /dev/null 2>&1
env:
BLUENOTION_ENVS: ${{ secrets.BLUENOTION_ENVS }}
notion_property_names option is used for custom property nameYou can change the property name by notion_property_names option.
Title: title columnURL: URL type columnType: Select type columnDate: Date type columnParent: Parent type column
For example, if you want to change Title to Tasks and URL to url, you can use notion_property_names option.
[..., "notion_property_names":{ "Title": "Tasks", "URL": "url" }]
notion_extra field is an object like { propertyNames: propertyValue }
propertyNames is property namepropertyValue is notion payloadFor example, if you want to add Tags column to Notion, you can use notion_extra option.
[..., "notion_extra":{ "Tags": { "multi_select": [{ "name": "TEST" }] }}]
Limitation: Currently does not put non-Ascii characters to .env.
You can use unicode escape sequence like \u30bf\u30b9\u30af\u540d instead of non-Ascii characters.
BLUENOTION_ENVS env var using bluenotiondb env generator
name: Update Calendar
on:
schedule:
# every 12 hours
- cron: "0 */12 * * *"
workflow_dispatch:
env:
BLUENOTION_VERSION: v2.5.2
permissions:
contents: read
actions: write # require to delete cache
jobs:
calendar:
runs-on: ubuntu-latest
env:
cache-name: cache-bluenotion-calendar
steps:
# actions/cache does not support overwrite cache
# https://github.com/actions/cache/issues/342
# This job implement overwrite cache using restore + delete + save
- name: Checkout
uses: actions/checkout@v3 # gh command require repository
- name: Restore Cache
id: cache-restore
uses: actions/cache/restore@v3
with:
path: ./cache
key: ${{ env.cache-name }}
- name: Download
run: |
curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb
chmod +x bluenotiondb
- name: Update
run: ./bluenotiondb > /dev/null 2>&1
env:
CACHE_DIR: ./cache
BLUE_NOTION_ENVS: ${{ secrets.BLUE_NOTION_ENVS }}
# overwrite cache key
- name: Delete Previous Cache
if: ${{ steps.cache-restore.outputs.cache-hit }}
continue-on-error: true
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ env.cache-name }}" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Cache
uses: actions/cache/save@v3
with:
path: ./cache
key: ${{ env.cache-name }}
BLUENOTION_ENVS env var using bluenotiondb env generator
assignee:@me state:openIssuesname: Update GitHub Search
on:
schedule:
# every hour
- cron: "0 * * * *"
workflow_dispatch:
env:
BLUENOTION_VERSION: v2.5.2
permissions:
contents: read
actions: write # require to delete cache
jobs:
github-search:
runs-on: ubuntu-latest
env:
cache-name: cache-bluenotion-github-search
steps:
# actions/cache does not support overwrite cache
# https://github.com/actions/cache/issues/342
# This job implement overwrite cache using restore + delete + save
- name: Checkout
uses: actions/checkout@v3
- name: Restore Cache
id: cache-restore
uses: actions/cache/restore@v3
with:
path: ./cache
key: ${{ env.cache-name }}
- name: Download
run: |
curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb
chmod +x bluenotiondb
- name: Update
run: ./bluenotiondb > /dev/null 2>&1
env:
CACHE_DIR: ./cache
BLUE_NOTION_ENVS: ${{ secrets.BLUE_NOTION_ENVS }}
# overwrite cache key
- name: Delete Previous Cache
if: ${{ steps.cache-restore.outputs.cache-hit }}
continue-on-error: true
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ env.cache-name }}" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Cache
uses: actions/cache/save@v3
with:
path: ./cache
key: ${{ env.cache-name }}
type columnIf you want to overwrite built-in type column, you can use notion_extra option.
BLUENOTION_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"}}}}]'
BLUENOTION_ENVS env var using bluenotiondb env generator
name: Update Location
on:
schedule:
# every hour
- cron: "0 * * * *"
workflow_dispatch:
env:
BLUENOTION_VERSION: v2.5.2
permissions:
contents: read
actions: write # require to delete cache
jobs:
location:
runs-on: ubuntu-latest
env:
cache-name: cache-bluenotion-location
steps:
# actions/cache does not support overwrite cache
# https://github.com/actions/cache/issues/342
# This job implement overwrite cache using restore + delete + save
- name: Checkout
uses: actions/checkout@v3
- name: Restore Cache
id: cache-restore
uses: actions/cache/restore@v3
with:
path: ./cache
key: ${{ env.cache-name }}
- name: Download
run: |
curl -L https://github.com/azu/bluenotiondb/releases/download/${{env.BLUENOTION_VERSION}}/bluenotiondb -o bluenotiondb
chmod +x bluenotiondb
- name: Update
run: ./bluenotiondb > /dev/null 2>&1
env:
CACHE_DIR: ./cache
BLUE_NOTION_ENVS: ${{ secrets.BLUE_NOTION_ENVS }}
# overwrite cache key
- name: Delete Previous Cache
if: ${{ steps.cache-restore.outputs.cache-hit }}
continue-on-error: true
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete "${{ env.cache-name }}" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save Cache
uses: actions/cache/save@v3
with:
path: ./cache
key: ${{ env.cache-name }}
graph LR
A[Fetch Service] --> B[Convert to ServiceItem]
B --> C[Push ServiceItem to Notion]
If you want to support a new service, you need to implement the following:
services/<service-name>.tsfetch~ functionnotion/envs.tsfetch~ to index.tsIf future date will be added, this service should be cached. Otherwise, dedupe events by using last updated date.
To install dependencies:
bun install
To use local env:
BLUENOTION_ENVS env var using bluenotiondb env generator.env file and paste BLUENOTION_ENVS to .envBLUENOTION_ENVS='[...]'
To run:
bun run main
This project was created using bun init in bun v0.6.0. Bun is a fast all-in-one JavaScript runtime.
You can use DEBUG env to debug.
DEBUG=1 ./bluenotiondb
npm version {patch,minor,major}
npm run sync-version
git push --follow-tags
MIT
atproto explorer - mirror to https://tangled.org/pds.ls/pdsls
Fix X/Twitter and Bluesky embeds! Use multiple images, videos, polls, translations and more on Discord, Telegram and others
AT Protocol Reference Implementation (TypeScript)
Git scraping of AT Protocol/Bluesky instances
Git scraping of Bluesky labelers/label providers
web interface for labeling content in atproto / Bluesky
Your Brand Here!
50K+ engaged viewers every month
Limited spots available!
📧 Contact us via email🦋 Contact us on Bluesky