Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhomble/notion-secretary
administer notion things
https://github.com/nhomble/notion-secretary
Last synced: about 1 month ago
JSON representation
administer notion things
- Host: GitHub
- URL: https://github.com/nhomble/notion-secretary
- Owner: nhomble
- Created: 2022-05-04T00:08:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-25T22:15:35.000Z (over 1 year ago)
- Last Synced: 2023-05-25T23:22:48.486Z (over 1 year ago)
- Language: TypeScript
- Size: 112 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# notion secretary
manage/automate things on notion
## Usage
Checkout `./bin` for various utilities written along the way.
```
$ export NOTION_KEY=secret_heymadeyoulook
```### `find-databases`
```
$ ./bin/find-databases
```Quickly list out the names/ids of databases my integration key has access to!
### `sync`
```
$ ./bin/sync CONTROL_DB
```Currently, there isn't a way to manage reocurring tasks in notion databases, so this sync job can be ran on a cron to add new tasks.
To keep my data private and easy to configure, the script requires several databases
##### Control Db
A read-only db to help make configuring new database ids private to my notion page. It's a table like
|Name|Id|
|----|--|
|TASKS_DB||
|CONTEXTS_DB||
|REOCURRING_DB||##### Tasks Db
A write database to write the new tasks.
|Name|Start|Repeats?|
|----|-----|--------|##### Context Db
Just a normal database with the `Name` title such that we can perform queries for relations.
##### Reoccuring Db
A read database to retrieve the reoccuring task list
|Name|Frequency|Context|
|----|---------|-------|It expects a **Name** (`title`) and a **Frequency** multi select which is one of [`daily`, `weekly`]; Context is optionally going to point to something in the **CONTEXTS_DB**.
### `add-task`
Quickly add tasks from the shell with
```sh
$ ./bin/add-task hello from the shell
```The same `Control Db` concept is used and its id is sourced from an environment variable `NOTION_CONTROL_DB`.
## Notes
### Msft Graph Auth Token
Impersonate yourself by going to https://developer.microsoft.com/en-us/graph/graph-explorer and plucking out the token.