-
Notifications
You must be signed in to change notification settings - Fork 0
[enhancement] pull review from Notion page content #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pausing the work briefly because I'm running this too often locally and getting ratelimited by Notion (whoops). This highlights two problems: page pagination is killing me & having to hit the blocks endpoint as well for every review each time the job is run might lead to increased rate limiting. |
|
As of ce75ad2, this PR will do the absolute basics to pull a review from a page if the property is not present. If I'd like to preserve any text styling (bold, italics, &c.) then I'll need to add a bit more finesse. Additionally, I'll need to preserve the use of blockquotes (which are used in a small sample of existing reviews) and I haven't dug into what that will take just yet. For these reasons, I'm going to leave this as a draft until I have time to come back and give it some finishing touches. |
|
Was curious about blockquotes and couldn't help myself. Looks like they're a unique object type: {
object: 'block',
id: '2940ce2f-0a7e-805a-88ad-e8d80466cb1a',
parent: {
type: 'page_id',
page_id: '26d0ce2f-0a7e-80f8-823e-eca5fe8a63ce'
},
created_time: '2025-10-22T08:49:00.000Z',
last_edited_time: '2025-10-22T08:49:00.000Z',
created_by: { object: 'user', id: '1e4d872b-594c-81bf-baed-0002aa4eb4f1' },
last_edited_by: { object: 'user', id: '1e4d872b-594c-81bf-baed-0002aa4eb4f1' },
has_children: false,
archived: false,
in_trash: false,
type: 'quote',
quote: {
rich_text: [
{
type: 'text',
text: { content: 'What about a blockquote?', link: null },
annotations: {
bold: false,
italic: false,
strikethrough: false,
underline: false,
code: false,
color: 'default'
},
plain_text: 'What about a blockquote?',
href: null
}
],
color: 'default'
}
} |
|
Might come in handy later: https://developers.notion.com/reference/request-limits
|
|
Thinking this over & I want to add a new It also will allow me to live in the intermediate state of having review data in two different places a bit more gracefully. |
|
With 6d3848a this should now better support pulling review content from child page blocks in Notion. It also supports every style annotation I imagine that I'll use. On the data side I've added a My plan is to publish this & have the code running, then I can update the pages in Notion at my own leisure. Once all of my reviews have been moved to the child pages & I no longer have handwritten html directly in an attribute, I'll go ahead and deprecate the |

Closes #270
Basic idea here is that instead of having to cram html into a page property that I write/edit very clumsily. I can just type a review on a given book's associated page and then the action will pull all of the data and parse it into the correct html output.