Open4
Notion AI とテーブル
Notion AI を試していて、シンプルテーブルの操作をしてみたらちょっと驚いたので。
結合
区切り線の中のようなシンプルテーブルを作成する。
商品テーブル
コード | 品名 | 単価 |
---|---|---|
aaa | オレンジ | 300 |
bbb | アップル | 250 |
ccc | パイナップル | 400 |
売上テーブル
コード | 個数 |
---|---|
bbb | 5 |
ccc | 1 |
ccc | 1 |
aaa | 6 |
aaa | 5 |
bbb | 2 |
ccc | 1 |
テーブルを範囲選択しておいて ctrl
+ j
で下記のように入力する。
コードをキーにしてテーブルを結合してコード毎の売り上げのテーブルを作成してください。
区切り線の中のような結果になった。
以下のテーブルを作成しました。
コード | 品名 | 単価 | 個数 | 売り上げ |
---|---|---|---|---|
aaa | オレンジ | 300 | 11 | 3300 |
bbb | アップル | 250 | 7 | 1750 |
ccc | パイナップル | 400 | 3 | 1200 |
JSON からテーブル
下記の折りたたんだ中のような JSON 配列を含むコードブロックを作成(Notion 上では折りたたんでいません)。
長いの折りたたんでいます
リポジトリ一覧のJSON配列
[
{
"description": "",
"name": "hankei6km",
"repositoryTopics": null,
"updatedAt": "2022-03-04T16:10:16Z",
"url": "https://github.com/hankei6km/hankei6km"
},
{
"description": "",
"name": "mardock",
"repositoryTopics": null,
"updatedAt": "2022-05-21T06:14:10Z",
"url": "https://github.com/hankei6km/mardock"
},
{
"description": "",
"name": "test-functions-framework-pubsub-ts",
"repositoryTopics": null,
"updatedAt": "2023-01-22T17:29:16Z",
"url": "https://github.com/hankei6km/test-functions-framework-pubsub-ts"
},
{
"description": "",
"name": "h6-dev-containers",
"repositoryTopics": null,
"updatedAt": "2022-06-06T06:59:12Z",
"url": "https://github.com/hankei6km/h6-dev-containers"
},
{
"description": "",
"name": "mdast-wbr",
"repositoryTopics": null,
"updatedAt": "2023-01-31T20:42:40Z",
"url": "https://github.com/hankei6km/mdast-wbr"
},
{
"description": "",
"name": "gas-gchanges2notion",
"repositoryTopics": null,
"updatedAt": "2022-05-01T10:28:41Z",
"url": "https://github.com/hankei6km/gas-gchanges2notion"
},
{
"description": "Google Drive で OCR を行い、結果を Notion データベースへ送信する Google Apps Script ライブラリー。",
"name": "gas-gocr2notion",
"repositoryTopics": [
{
"name": "google-apps-script"
},
{
"name": "notion-api"
},
{
"name": "ocr"
}
],
"updatedAt": "2023-02-07T12:44:07Z",
"url": "https://github.com/hankei6km/gas-gocr2notion"
},
{
"description": "Google Drive を操作する簡易ツール。",
"name": "guratan",
"repositoryTopics": [
{
"name": "google-drive"
}
],
"updatedAt": "2023-01-16T17:16:02Z",
"url": "https://github.com/hankei6km/guratan"
},
{
"description": "",
"name": "notion2content",
"repositoryTopics": null,
"updatedAt": "2023-01-30T11:48:25Z",
"url": "https://github.com/hankei6km/notion2content"
},
{
"description": "RSS フィードを Notion データベースへ送信する Google Apps Script ライブラリー。",
"name": "gas-feed2notion",
"repositoryTopics": [
{
"name": "google-apps-script"
},
{
"name": "notion"
},
{
"name": "notion-api"
},
{
"name": "notion-database"
},
{
"name": "typescript"
}
],
"updatedAt": "2023-02-08T08:10:47Z",
"url": "https://github.com/hankei6km/gas-feed2notion"
},
{
"description": "GitHub App の Access Token 取得をサポートする Google Apps Script のライブラリー。",
"name": "gas-github-app-token",
"repositoryTopics": [
{
"name": "github"
},
{
"name": "googleappsscript"
},
{
"name": "token"
},
{
"name": "githubapp"
}
],
"updatedAt": "2022-04-01T07:53:34Z",
"url": "https://github.com/hankei6km/gas-github-app-token"
},
{
"description": "",
"name": "chanpuru",
"repositoryTopics": null,
"updatedAt": "2022-02-23T13:55:00Z",
"url": "https://github.com/hankei6km/chanpuru"
},
{
"description": "",
"name": "hankei6km-zenn-content",
"repositoryTopics": null,
"updatedAt": "2022-01-11T03:48:53Z",
"url": "https://github.com/hankei6km/hankei6km-zenn-content"
},
{
"description": "",
"name": "test-nix-channel-simple",
"repositoryTopics": null,
"updatedAt": "2023-02-07T03:53:18Z",
"url": "https://github.com/hankei6km/test-nix-channel-simple"
},
{
"description": "",
"name": "gdrive-act-share",
"repositoryTopics": null,
"updatedAt": "2022-03-21T03:54:02Z",
"url": "https://github.com/hankei6km/gdrive-act-share"
},
{
"description": "",
"name": "gdrive-act-send",
"repositoryTopics": null,
"updatedAt": "2022-03-18T10:07:11Z",
"url": "https://github.com/hankei6km/gdrive-act-send"
},
{
"description": "Command line utility to quote null splited lines for Bash command line.",
"name": "xquo",
"repositoryTopics": [
{
"name": "cli"
},
{
"name": "rust"
}
],
"updatedAt": "2023-01-31T20:04:34Z",
"url": "https://github.com/hankei6km/xquo"
},
{
"description": "",
"name": "notion2hast",
"repositoryTopics": null,
"updatedAt": "2022-05-17T06:56:38Z",
"url": "https://github.com/hankei6km/notion2hast"
},
{
"description": "",
"name": "gdrive-act-recv",
"repositoryTopics": null,
"updatedAt": "2022-03-25T14:08:08Z",
"url": "https://github.com/hankei6km/gdrive-act-recv"
},
{
"description": "",
"name": "test-marp-ogimage",
"repositoryTopics": null,
"updatedAt": "2022-11-23T11:03:21Z",
"url": "https://github.com/hankei6km/test-marp-ogimage"
},
{
"description": "",
"name": "test-csb-podman-docker-compose",
"repositoryTopics": null,
"updatedAt": "2023-02-02T03:30:25Z",
"url": "https://github.com/hankei6km/test-csb-podman-docker-compose"
},
{
"description": "",
"name": "test-git-sim-csb-docker-mock",
"repositoryTopics": null,
"updatedAt": "2023-01-30T09:26:50Z",
"url": "https://github.com/hankei6km/test-git-sim-csb-docker-mock"
},
{
"description": "",
"name": "test-git-sim-csb-docker-import",
"repositoryTopics": null,
"updatedAt": "2023-01-30T06:34:01Z",
"url": "https://github.com/hankei6km/test-git-sim-csb-docker-import"
},
{
"description": "",
"name": "test-git-sim-csb-docker",
"repositoryTopics": null,
"updatedAt": "2023-01-29T09:50:59Z",
"url": "https://github.com/hankei6km/test-git-sim-csb-docker"
},
{
"description": "",
"name": "test-csb-docker-rust",
"repositoryTopics": null,
"updatedAt": "2023-01-12T07:21:14Z",
"url": "https://github.com/hankei6km/test-csb-docker-rust"
},
{
"description": "",
"name": "test-codeql-default-event",
"repositoryTopics": null,
"updatedAt": "2023-01-24T16:38:28Z",
"url": "https://github.com/hankei6km/test-codeql-default-event"
},
{
"description": "",
"name": "test-cleanup-caches-by-branch",
"repositoryTopics": null,
"updatedAt": "2023-01-20T15:08:58Z",
"url": "https://github.com/hankei6km/test-cleanup-caches-by-branch"
},
{
"description": "",
"name": "test-devcontainers-cli-compose",
"repositoryTopics": null,
"updatedAt": "2022-06-13T10:20:04Z",
"url": "https://github.com/hankei6km/test-devcontainers-cli-compose"
},
{
"description": "",
"name": "test-gha-env-config-var",
"repositoryTopics": null,
"updatedAt": "2023-01-19T16:22:50Z",
"url": "https://github.com/hankei6km/test-gha-env-config-var"
},
{
"description": "",
"name": "test-gha-env-var-by-file",
"repositoryTopics": null,
"updatedAt": "2023-01-19T07:43:37Z",
"url": "https://github.com/hankei6km/test-gha-env-var-by-file"
}
]
コードブロックを範囲選択しておいて ctrl
+ j
で下記のように入力する。
nameが"test-"で始まる項目のテーブルを作成してください。
区切り線の中のような結果になった。すべてではないが JSON からテーブルを作ったりもできそう。
名前 | 更新日 | リポジトリトピック | URL |
---|---|---|---|
test-functions-framework-pubsub-ts | 2023-01-22T17:29:16Z | https://github.com/hankei6km/test-functions-framework-pubsub-ts | |
test-nix-channel-simple | 2023-02-07T03:53:18Z | https://github.com/hankei6km/test-nix-channel-simple | |
test-marp-ogimage | 2022-11-23T11:03:21Z | https://github.com/hankei6km/test-marp-ogimage | |
test-csb-podman-docker-compose | 2023-02-02T03:30:25Z | https://github.com/hankei6km/test-csb-podman-docker-compose | |
test-git-sim-csb-docker-mock | 2023-01-30T09:26:50Z | https://github.com/hankei6km/test-git-sim-csb-docker-mock | |
test-git-sim-csb-docker-import | 2023-01-30T06:34:01Z | https://github.com/hankei6km/test-git-sim-csb-docker-import |
コマンド使ってもできるといえばできるけど、テキスト入力中にその場でテーブル操作できるのはよさげかなと。
難点は、AI は間違っている内容でも自信ありげに答えるところかな(「わかりました。〇〇を作りました」と返答しておいて実は作ってないとか、わりとある)。