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

API: Relation Property

API: Relation Property Good I am sending information to a Notion table. The problem I have is with a relation property. I have tried passing name, passing id, but I can't find the correct call. Does anyone have an example or a link where they report…
0
votes
3 answers

How to use notion API to create tag

I am going to use python to track my wish list of film from the other website. Now I want to give every film some different tags. But notion reference told me Multi-select property value objects contain an array of multi-select option values within…
Jimmysime
  • 1
  • 1
  • 1
0
votes
2 answers

Changing HTML span style using CSS

I use Notion, which does not have many styling options, but thankfully, someone made an extra component called notion enhancer that allows for many options, including uploading your own css file. Here's my issue: I changed the color of bold and…
shastings
  • 13
  • 5
0
votes
2 answers

Is there a way to get the list length for a given database?

I can get the paginated list of children for a given database with https://api.notion.com/v1/databases/:id/query. But can I get the current number of children anywhere?
gorniczy
  • 67
  • 1
  • 7
0
votes
2 answers

List databases return no results

I have a workspace with 2 databases shared with my integration, basically it works and I get 200 OK code. That's the function I have, the headers contain the authentication token: def listDatabases(self): r =…
bustrama
  • 61
  • 1
  • 9
0
votes
1 answer

notion-api invalid_client oauth integration

I am creating a notion API integration with OAuth authentication. I keep getting an invalid_client error when the user clicks allow access button and OAuth follow hits my callback URL. Also, auth_token is created in base64 format via…
oakar
  • 1,187
  • 2
  • 7
  • 21
-1
votes
2 answers

How to solve TypeError: Cannot read properties of undefined (reading 'map') in Next.js?

I am a beginner who wants to build a blog using Notion API, Next.js and Tailwind CSS. I learned the following code from here: https://egghead.io/lessons/next-js-request-notion-database-data-from-the-api-with-next-js. The following code works fine in…
New Boy
  • 1
  • 1
  • 1
-1
votes
1 answer

How do I traverse a complicated associative array that I'm getting from Json_decode($x, true);

I'm decoding a json that I get from Notion's API in an associative array. When I var_dump it, it outputs as follows (with some information removed for security): array(4) { ["object"]=> string(4) "list" ["results"]=> array(1) { [0]=> …
-1
votes
1 answer

Notion API, Vanilla JS, Fetch does not work

I don't understand why a simple fetch request is unsuccessful via Vanilla JS but successful via Postman: const getNotion = () => { fetch( "https://api.notion.com/v1/databases/[DBID_HERE]", { method: "GET", headers: { …
Ben
  • 345
  • 2
  • 4
  • 13
-1
votes
1 answer

How to listen for Database-changes using an RestAPI from Google/Microsoft/Notion?

I am trying to integrate Google Calendar and Microsoft Todo into my Notion Workspace using NodeJS. It is quite easy to make Requests in order to create, read, update and delete data but I was wondering how I could listen for changes in the database.…
ungarmichael
  • 101
  • 1
  • 9
-2
votes
1 answer

A button that can add person name in Person property in database in Notion

I need your help guys. I am in charge of building a workspace in Notion for my team where we can cast our votes on ideas. I've to use the Person property for a member to put their names on it if they like the ideas and use formulas to count. But it…
Hoko NgPh
  • 1
  • 1
-2
votes
1 answer

GET read info for: new users, last edited database, most viewed page, & more

can I use the API to GET read info on several different stats of my Notion workspace? A few examples of stats I'd like to see: Last edited page Most viewed page Last active user New users Last edited database Last edited item inside a specific…
1 2 3
19
20