You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ID of the data source you want to run the integration on. This is required if you have multiple data sources in your database. You can find the ID under the `Manage data sources` menu in the database settings. If you only have one data source (which is the default), you can leave this property empty.
74
+
75
+
<imgsrc="images/CopyDataSourceId.png"alt="Notion data source ID location"style="height:600px;">
76
+
77
+
| Type | Default value | Possible values | Required |
78
+
|---|---|---|---|
79
+
|`string`|`""`| A valid data source ID of one of the data sources in your database | Yes, if you have multiple data sources in your database. |
Copy file name to clipboardExpand all lines: config.schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,11 @@
20
20
"type": "string",
21
21
"default": ""
22
22
},
23
+
"notionDataSourceId": {
24
+
"description": "The ID of the data source you want to run the integration on. This is required if you have multiple data sources in your database. You can find the ID under the \"Manage data sources\" menu in the database settings. If you only have one data source (which is the default), you can leave this property empty.",
25
+
"type": "string",
26
+
"default": ""
27
+
},
23
28
"inputFile": {
24
29
"description": "The JSON file to import to Notion.",
console.error("Error validating configuration file: Notion database does not contain a data source with the ID specified in the configuration file. Check the \"notionDataSourceId\" property in your config.json");
console.error("Error validating configuration file: Notion database contains multiple data sources, but no data source ID to use is specified in the configuration file. Provide the \"notionDataSourceId\" property in your config.json");
97
+
process.exit(1);
98
+
}
99
+
100
+
constresponse=awaitNOTION.dataSources.retrieve({
101
+
data_source_id: DATASOURCE_ID
84
102
});
85
103
86
104
// If any of the properties are not found in the database, exit the program
@@ -181,8 +199,8 @@ export async function getExistingPagesFromNotionDatabase() {
181
199
182
200
// Fetch all pages from the database that have the specified property set to anything but null
Copy file name to clipboardExpand all lines: package.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
{
2
2
"name": "json-to-notion",
3
3
"type": "module",
4
-
"version": "1.2.0",
4
+
"version": "1.3.0",
5
5
"description": "Utility that is able to \"import\" JSON files to Notion - for cases where a CSV file is simply not available, and the conversion from JSON to CSV would be too complicated.",
0 commit comments