1
0

Notion APIでロールアップのカラムを検索できないメモ

Last updated at Posted at 2024-08-12

"Notion APIでロールアップのカラムの検索をする"という記事を前に書いてましたが、Notion APIでロールアップのカラムを検索できない事象が発生していました。

事象

//色々省略

console.log(res.results[21].properties['課題カテゴリ']);
        console.log(res.results[21].properties['カテゴリ(自動化用)']);
{
  id: 'XXxW',
  type: 'rollup',
  rollup: { type: 'array', array: [], function: 'show_original' }
}
{
  id: '%7Cyt~',
  type: 'formula',
  formula: { type: 'string', string: null }
}

インテグレーションへの権限付与ミス

資料Checker的なインテグレーションを作っていて、そいつに権限があればアクセスできるようにしてたのですが、ロールアップ先のDBに対してインテグレーションの権限付与ができていなかったのが原因でした。

スクリーンショット 2024-08-12 16.00.29.png

スクリーンショット 2024-08-12 15.59.34.png

こんな感じでセットすればOK

修正後

課題カテゴリという項目ロールアップで別DBに中身があり、取得できてなかったのですが、ちゃんと取得できるようになりました。

{
  id: 'XXxW',
  type: 'rollup',
  rollup: { type: 'array', array: [ [Object] ], function: 'show_original' }
}
{
  id: '%7Cyt~',
  type: 'formula',
  formula: { type: 'string', string: '最終制作企画' }
}

まとめ

しっかり確認しましょう。
APIの仕様変更疑ってしまった。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0