Skip to content

Commit afa8fb1

Browse files
[Notion] config - ignore new pages but not updates (#14144)
* ignore new pages but not updates * bump versions
1 parent a3c822c commit afa8fb1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/notion/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/notion",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Pipedream Notion Components",
55
"main": "notion.app.mjs",
66
"keywords": [

components/notion/sources/updated-page/updated-page.mjs

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
key: "notion-updated-page",
1010
name: "Updated Page in Database", /* eslint-disable-line pipedream/source-name */
1111
description: "Emit new event when a page in a database is updated. To select a specific page, use `Updated Page ID` instead",
12-
version: "0.1.0",
12+
version: "0.1.1",
1313
type: "source",
1414
dedupe: "unique",
1515
props: {
@@ -171,7 +171,7 @@ export default {
171171
});
172172
}
173173

174-
if (!pageExistsInDB && this.includeNewPages) {
174+
if (!pageExistsInDB) {
175175
isNewPage = true;
176176
propertyHasChanged = true;
177177
propertyValues[page.id] = {
@@ -185,6 +185,11 @@ export default {
185185
}
186186
}
187187

188+
if (isNewPage && !this.includeNewPages) {
189+
console.log(`Ignoring new page: ${page.id}`);
190+
continue;
191+
}
192+
188193
if (propertyHasChanged) {
189194
this.emitEvent(page, changes, isNewPage);
190195
}

0 commit comments

Comments
 (0)