A CloudFlare Worker / script / bot to sync Notion pages publicly as GitHub Discussions.

Overview

notion-github-sync

This bot syncs public Notion pages as GitHub Discussions/Issues. It's done periodically, based on the pages shared with the Notion Integration, and based on metadata specific on your Notion page.

Usage

To use this tool, please make sure to have the following:

  1. Deploy this tool or run it locally with the relevant env vars.
  2. Make sure to add the user your wish to use as collaborator in your repos (this is needed only in order to delete Discussions)
  3. To make a Notion page public and syncable, first make sure to share this page with the Notion Integration you created:

image

  1. If you wish to make the Notion page public (with the Notion url), also tick Share to web:

image

  1. Annotate the top of your Notion page with the repo you wish to sync the page with the following text (NOT as code block, just as text - this should be the first block of your Notion page):
/github-public dotansimha/test-notion-sync discussion

You can also specify a custom GitHub Discussion category (the default is General):

/github-public dotansimha/test-notion-sync discussion General

Or, as an issue:

You can also specify a custom GitHub Discussion category (the default is General):

/github-public dotansimha/test-notion-sync issue

You can find a synced example page here: dotansimha/test-notion-sync#12

To remove a public discussion:

  1. Make sure to delete the annotation from your page.
  2. Wait for the next sync (or, manually run it)
  3. You can also remove now the integration access from the page.

Getting started (development)

  1. Clone this repo
  2. Make sure to install Wrangler CLI: https://developers.cloudflare.com/workers/wrangler/get-started/
  3. Create a Notion integration and get your Notion token (see https://www.notion.so/my-integrations). Use the token as NOTION_TOKEN env var.
  4. Create a GitHub Personal Access token for the relevant user (to create/update/delete the GH Discussions). Use the token as GH_BOT_TOKEN env var.
  5. Run npm install
  6. Run npm start for development.

We use Wrangler for the Worker development.

Deployment (as CloudFlare Worker)

  • Every change to main branch will run CI and deploy to prod.
  • Make sure to configure your NOTION_TOKEN and GH_BOT_TOKEN (PAT) as part of the env vars.
  • You can also deploy from local env by running: npm run deploy

If you wish to have a clone of your own, make sure to rename worker name in the wrangler.toml file

Comments
Owner
The Guild
A group of open source developers, bringing a different approach for sustainable open source. Our philosophy is to place our libraries under a person's name.
The Guild
A Technical Blogging Website that utilizes Notion as a CMS for ease of modification with the help of the notion-API & whose content has been rendered with next-js and react-notion-x

GDSC MCE Blogs This repo is what GDSC MCE uses to power their blogging website gdsc-mce-blogs. It uses Notion as a CMS, fetching content from Notion a

null 7 Dec 16, 2022
Connect to a Postgres database from a Cloudflare Worker, using Cloudflare Tunnel

Cloudflare Workers Postgres Client This is an experimental module. Heavily based on cloudflare/worker-template-postgres, but cleaned up and bundled in

BubblyDoo 17 Dec 22, 2022
A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON.

notion-fetch A Cloudflare Workers service that fetches and renders Notion pages as HTML, Markdown, or JSON. Powered by Durable Objects and R2. Usage P

Heyang Zhou 7 Jan 6, 2023
rss github discussions api

rgd RSS - GitHub Discussions API npm install -g rgd # or npm install -D rgd Usage: rgd Options: --owner --repo --token: generate token -> http

Len C... 6 Jul 11, 2022
Script to synchronize between a Notion database and Google Calendar both ways. Uses Google App Script.

Yet Another Two Way Notion-Google Calendar Sync Script A script to sync events between Google calendar and a Notion database. Features! Google App Scr

kat 41 Jan 7, 2023
Cloudflare worker function to update github bio automatically with leetcode and codeforces profile stats 🚀

Stats check ?? Cloudflare worker function to update github bio automatically with leetcode and codeforces profile stats ?? You can see it in action he

Vaibhav Chopra 2 Feb 15, 2022
🍎 A simple application which enables you to sync readings from your Withings scale to a Notion page.

weight-logger weight-logger is a simple application which enables you to sync readings from your Withings scale to a Notion page. Preview Installation

Juri Adams 2 Jan 14, 2022
Remix Blues Stack - Community discussions web app

Remix Blues Stack - Community discussions web app

Alex Ruheni 4 Jul 16, 2022
A utility for cloning all your repos, including issues, discussions, stargazers and more!

github-takeout A utility for cloning all your repos, including issues, discussions, stargazers and more! The tool gives you the ability to download a

Lukas Bach 5 Oct 26, 2022
A Cloudflare Worker for fetching data from Twitter User API.

cloudflare-worker-twitter This is a Cloudflare Worker for fetching data from Twitter User API. ❔ About this project I created this Worker to hide my A

Arda Soytürk 12 Oct 1, 2022
A cloudflare worker to use the user-agent for ~~rickrolling~~ without a discord embed

nextcord.gay A cloudflare worker to use the user-agent for rickrolling without a discord embed Build npm run build Find the output in ./dist/worker.mj

Oliver Wilkes 10 Oct 4, 2022
A cloudflare worker based REST API for your R2 bucket.

A cloudflare worker based REST API for your R2 bucket. Usage: Change the bucket_name and preview_bucket_name in wrangler.toml if you want. Set ENCRYPT

Proselog 19 Nov 7, 2022
An example Worker for copying Cloudflare Pub/Sub messages to R2 storage

pubsub-to-r2 An example Cloudflare Worker that acts as an on-publish hook for Pub/Sub and copies a subset of messages to R2 object storage. To deploy

Matt Silverlock 4 Jul 1, 2022
Automatically sync your leetcode solutions to your github account - top 5 trending GitHub repository

LeetHub - Automatically sync your code to GitHub. Top 5 Trending JavaScript Repositories Available on: What is LeetHub? A chrome extension that automa

Qasim Wani 2.8k Dec 31, 2022
API and site for discovering publicly-available Desmos graphs. Not affiliated with Desmos.

desmosearch-api API and site for discovering, cataloguing, and keeping track of publicly-available Desmos graphs. Not affiliated with Desmos. This pro

null 4 Feb 24, 2022
Non-interactive publicly verifiable distributed key generation and resharing algorithm over BLS12-381

NPVDKG-RS This repository contains a mathematical presentation and some code to demonstrate our developed non-interactive publicly verifiable distribu

NATRIX Official 8 May 19, 2022
🧠 My second brain — Ideas, thoughts, resources, notes… All publicly shared in one place.

?? Second Brain Welcome to my second brain. This is a collection of notes, journals, and resources written or collected by me (@pixelsbyeryc), in an a

ERYC 4 May 4, 2022
Open Harvest is a technology designed farmers to publicly share the details of their crops/land to allow all farmers to stay informed on the best crops they can grow without risking a surplus crisis.

OpenHarvest OpenHarvest is a web application designed to balance farming production in India. Farmers in India are struggling with marketing their cro

Call for Code® with The Linux Foundation 11 Dec 8, 2022
Github Actions를 사용해 Github issue와 Notion 데이터베이스를 동기화하여 Notion에서 팀원들과 진행상황을 쉽게 공유해보세요🥳

Github Actions x notion-sdk-js x docker Demo Abstract notion-sdk-js는 Notion 데이터베이스와 Github의 issue의 를 동기화시켜주는 Node-JS application 입니다. 이를 사용하기 위해선 사용자가

SeungHyun-Hong 58 Nov 27, 2022