This script updates a specific page in Notion using the Notion API. It requires the Notion API token, the ID of the page to be updated, and the new property values for the update. The script sets up the necessary headers, constructs the request body with the provided property updates, and sends a PATCH request to the Notion API to apply the updates. If successful, it returns the updated page data; otherwise, it throws an error with details about the failure.
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 | |
41 | |
42 | |
43 | |
44 | |