Questions tagged [notion-api]

Questions related to the Notion API. The API is REST-based and the officially supported SDK is written in TypeScript.

The Notion API is a JSON-based REST API for working with the Notion application.

It allows you to work with and manipulate data in Databases, Pages, and Properties in your Notion workspace(s).

You can find documentation for the API on Notion's Developer Portal.

The official client is written in TypeScript.

299 questions
0
votes
1 answer

Invalid Request Url error when Creating New User in Notion / Internal Server Error using scim api to create user

I'm new to notion api. I'm trying to create a test user in notion using both notion api and notion scim api but both are giving me errors. I'm doing this in postman. Using notion api, I'm doing a post to create the account POST:…
explorer
  • 1
  • 1
0
votes
0 answers

Replace with a regex formula prop has quotation mark issue

On notion i am trying to create a formula. that uses replace inside of a replaceall with a regex im having an issue on putting the prop value inside the double quotes in the replace. The code in working state; replaceAll(replace(prop("all chapter…
shac
  • 9
  • 3
0
votes
2 answers

Notion API - set url or number property as blank or empty

I'm executing this query: import { Client } from '@notionhq/client' import https from 'https' const auth = process.env.NOTION_TOKEN const notion = new Client({ auth, agent: new https.Agent({ keepAlive: true }) }) notion.pages.update({ …
Manuel Spigolon
  • 11,003
  • 5
  • 50
  • 73
0
votes
0 answers

Setting page icon via the API - reusing the page first block image

I am trying to use first image found on the page and set it as a page cover and page icon. The reason is because in the page I can just paste the image and create a gallery like this , and then I would like to set this image as page icon, so that…
Dalibor
  • 147
  • 1
  • 7
0
votes
1 answer

Unable to access notion comments via API/python

I'm trying to read the comments on a database entry in notion but I can't figure out how I need to make the request. import requests _url = 'https://api.notion.com/v1/comments' _headers = {"Authorization": _auth, "Notion-Version":…
ninhenzo64
  • 702
  • 1
  • 9
  • 23
0
votes
0 answers

Notion API unreadable dictionary keys

I am getting the following properties dictionary: value: { id: 'e44ddbba-580a-42af-882c-****', version: 70, type: 'page', properties: { '==~K': [ [ 'Yes' ] ], '=bhc': [ [ 'Yes' ] ], …
snake_case
  • 11
  • 2
0
votes
0 answers

How to watch deleted database items in Notion API?

It's pretty easy to fecth and watch created nor updated items of a Notion Database. But I can't see any way to watch deleted items of a database. The fetch query doesn't return them anymore, and it's look there is no filter to do so. How can we…
Gael.D
  • 500
  • 1
  • 5
  • 16
0
votes
1 answer

Adding to a database creates a new database within page in notion

Here's my current code: import json import requests def createPage(database_id, page_id, headers, url): newPageData = { "parent": { "database_id": database_id, "page_id": page_id, }, …
0
votes
0 answers

API Configuration to send data to Notion (400 error)

Attempting to send data to Notion using Apple Shortcuts. Can't seem to figure out the error with the json. Can someone help me figure out the error? {"status":400,"object":"error","code":"validation_error","message":"body failed validation:…
Raijah03
  • 1
  • 2
0
votes
0 answers

Single select property in Notion API

How do I access single select options in using the JavaScript SDK for Notion API? I tried the method of multi_select by WebDevSimplified, but it didn't work, don't know why.
0
votes
0 answers

Upload Images to Notion Page Content-Block (Notion API, Python)

I'm working on a way to upload local images(JPEG) to a page in Notion via Notion-API with Python. I already converted the picture in base64 and now I want to add it in a block, inside a existing page. I know theres a way to upload images from a URL…
0
votes
0 answers

How to query Notion-API database with people filter?

I read Notion-API documentation hundred times and I still can't understand how to query database by page_id or at least I think it should be a page_id. I have two databases, let's say that db1 is events and db2 is persons. Events database has a…
Josip B.
  • 2,434
  • 1
  • 25
  • 30
0
votes
1 answer

Cannot filter by status in a notion database using the notion js client

I am trying to find all tasks in my database that do not have the completed status, but I get a "Could not find property with name or id: status" error. my notion db (async () => { const databaseId = 'a secret'; const response = await…
skearya
  • 3
  • 1
0
votes
0 answers

Javascript API connection to Notion database not right

I'm not a developer but am trying to connect data entered into a Notion database with an Equals spreadsheet. I've written a preliminary connection by using help from Chat GPT 3 but something's not right. Can someone please help? Here is what I…
Abbey
  • 1
0
votes
0 answers

Is there a way to update a Notion block so it adds another elemtent inside ["paragraph"]["text"]?

I want to be able to update a Notion block in a way that it adds a piece of text when it finds a bolded word. I want it in this way: This text is important for some reason. The text before running the code. This text is important(1) for some…
Sanval
  • 1