Questions tagged [notion-js]

8 questions
5
votes
0 answers

How to get count of pages in database

I would like to ask if there is a way to easily get the number of pages in the database? Since I didn't find any endpoint for that, I came up with this not very nice solution: let count = 0 let hasMore = true let nextCursor = undefined …
4
votes
2 answers

Retry failed API call in for...of loop

I am trying to build a wrapper over Notion JS SDK's iteratePaginatedAPI that handles errors as well. I feel particularly lost on how do I catch API errors in such a way that I can actually retry them (aka retry the iteration that failed). Here's my…
linkyndy
  • 17,038
  • 20
  • 114
  • 194
4
votes
3 answers

Facing Notion API problem while trying updating databases properties: can't update checkbox

with Notion API and node.js, I'm trying to update database properties, especially the checkbox property, for my routine ToDo tasks checker. But I couldn't find the correct way to do so. Error messages say my setting of the checkbox property isn't…
tori_san
  • 41
  • 3
1
vote
1 answer

Confusing NotionAPI Validation Error (Javascript)

I am submitting the following object with my request to notion.pages.create(): { parent: { type: 'database_id', database_id: databaseID }, properties: { Name: { title: [ { type:…
0
votes
0 answers

Unable To Set Parent As database_id When Creating A Page With Notion SDK

I'm trying to make this request: const response = await notion.pages.create({ parent: { database_id: tasksDatabaseId, type: "database_id", }, properties, }); Which works fine until I add the time_zone property to my date…
Alex S
  • 190
  • 3
  • 15
0
votes
0 answers

Reminders in my siri shortcuts to notion task manager integration

I'm exploring Siri Shortcuts integrations to ease the inputs on my notion databases using the notion API and so far is so good how easy it has become to do it. However i'm having the problem that in my task manager I can't automate reminders to the…
0
votes
0 answers

In Notion, why are some pages displaying page descriptions and some other not, and how to change it?

In Notion, I have some pages where when I hover with the mouse over the page Title or the cover image, I get a little grey button between the cover and the title saying "Afficher la Description" (Display the description). If I click on it I get a…
Hugues
  • 164
  • 1
  • 12
0
votes
0 answers

How to add secure urls when uploading externally hosted files using notion api?

We are trying to upload files to notion using notion api. As per the documentation, notion api doesn't support file uploads. It does support adding files or media which are hosted on third-party services. If we are uploading externally hosted media…