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
2
votes
0 answers

How to format the notion import markdown code

I use typora to write markdown documents, but I want to import to notion for viewing anywhere, but during the import process, there are problems with missing pictures and wrong code formatting The following example image // …
moluzhui
  • 1,003
  • 14
  • 34
2
votes
0 answers

Find all "databases" using the Notion API in Node

I'm trying to get a list of all the databases to which my app has access in the Notion API. All I actually need is at most this { object: 'list', results: [ { object: 'block', id: 'a87f6026-9f2b-43cc-943d-fc2479a605b4', …
philolegein
  • 1,099
  • 10
  • 28
2
votes
1 answer

Rollup of rollup in Notion API

I have rollup from one database to another and I need to have a number from that rollup in the third database. Since Notion doesn't support rollup to rollup, I've created a formula that simply refers to rollup property, and third database has a…
2
votes
1 answer

The value fetched for rollup properties in Notion seems wrong. Am I missing something, or is it not working?

After using Notion API for a couple of months now, one thing seems off with relation-type-properties related query results. I manage to find a workaround most of the time, but there isn't any this time. Context I'm using Notion API via the Google…
2
votes
1 answer

Notion API: OAuth authentication with mobile app

I'd like to consume the Notion API from a mobile app that I am developing. When trying to set up the redirect URI, it doesn't seem possible to use a redirect URI that does not use the https scheme. Every time that I type in a custom scheme, it gets…
Michael Collins
  • 289
  • 2
  • 13
2
votes
2 answers

How do you solve for multiple bulleted_list_item

If you have a couple of list items, this list items are returned as individual objects with their tokens/content. So you can essentially have
  • content
  • each with its own parent
      . I believe the way the should be returned is multiple…
    2
    votes
    1 answer

    Notion API doesn't return file URL anymore

    For several weeks, I fetch my articles in Notion with images and like the documentation, I had name, url and expiry_time in my File Object (as described one the doc ) But since yesterday, I get this: "Image": { "id":…
    Axel Paris
    • 303
    • 3
    • 7
    2
    votes
    1 answer

    Clearing Date object using Notion API?

    I haven't seen this question asked yet - I want to "Clear" a date (see screenshot for a visual representation). Every time I make a PATCH request to update a Page object, I receive an error because date isn't formatted properly. From what I can…
    dasbuilder
    • 43
    • 7
    2
    votes
    0 answers

    page_id should be present error when creating a page in a notion database with API

    I'm trying to create a new page in a database in notion. Here is my code: data = { "parent": {"database_id": parent}, "properties": { "Name": { "title": [{"type": "text", "text": {"content": assignment}}] …
    lovefaithswing
    • 1,510
    • 1
    • 21
    • 37
    2
    votes
    2 answers

    How to avoid CORS errors when calling Notion API with serverless react app

    I'm developing a serverless react app that makes calls to the Notion API from the browser but I can't seem to avoid getting CORS errors no matter what I do. What headers do I need to set to make this work?
    T3db0t
    • 3,491
    • 4
    • 28
    • 45
    2
    votes
    1 answer

    Get related Notion tables data

    I faced one problem. My tables have columns where one table is related to another, and when I try to get data from those columns, no related block information is provided. What method can be used to get such data? block =…
    2
    votes
    1 answer

    Add reminder to page or database page

    I'm searching for a way to create a reminder to a page as a mention or in a date property of a database page. Is there a possibility with the API yet? In this example I want to create a new daabse entry with a reminder for the Date…
    oliveb9
    • 21
    • 2
    2
    votes
    2 answers

    Google Cloud Functions | Provided Module Can't be loaded - Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /workspace/index.js

    I am hoping to use Google Cloud Functions to interact with the Notion API. I'm getting started by lifting the first example from their API doc and putting it into a CF (see below). However I'm getting the following error log: Detailed stack trace:…
    2
    votes
    2 answers

    Add an @mention object to a notion page title?

    I want to automate the setup for my daily journal which generally has the title "Daily Journal @today" The body of my post request looks like this: body: { parent: { database_id: databaseId }, properties: { title: { …
    2
    votes
    1 answer

    Notion - Querying databases and pages provide limited properties

    I am trying to access a single database in my Notion via the REST API. When querying or listing my database in Notion, I only receive a subset of the expected properties. There are 23 properties in my accessed database as you can see in the last…
    Spectrem
    • 682
    • 1
    • 11
    • 37