
【Notion】Notion APIを利用するための事前準備
Notion APIを利用するには
・インテグレーションの作成
・シークレットの取得
・インテグレーションとデータベースとの紐付け
の準備を行う必要があります。
今回はそれらの手順をご紹介します!
インテグレーションの作成方法
①まずは、以下から自身のインテグレーションを確認します
③このような画面に移るので「新しいインテグレーションを作成する」をクリック

④設定画面に移るので適当に名前を設定し、「送信」をクリック

これでインテグレーションの作成は完了です。
シークレット情報の確認
次にNotion APIを利用する際に必要となるシークレット情報を確認しましょう。
⑤"私のインテグレーション"のページから、作成したインテグレーションをクリック
※どこのページかわからない場合は①, ②の手順を参考にしてみてください

⑥シークレット確認画面に移るので「表示」をクリック

すると、シークレットが表示されるかと思います。

Notion APIではこちらのシークレット情報を使います。
データベースにインテグレーションを紐づける
最後に、Notion APIが対象のデータベースを操作するために、データベースとインテグレーションを紐づける必要があるため、その手順を説明します。
⑦データベースのメニューを開く

⑧ "コネクトの追加"から自身が作成したインテグレーションを選択

⑨ポップアップが出るので「はい」をクリック

"コネクト"に指定したインテグレーションが表示されていれば紐付け完了です
