Skip to content

[Notion] config - ignore new pages but not updates #14144

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/notion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/notion",
"version": "0.2.0",
"version": "0.2.1",
"description": "Pipedream Notion Components",
"main": "notion.app.mjs",
"keywords": [
Expand Down
9 changes: 7 additions & 2 deletions components/notion/sources/updated-page/updated-page.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "notion-updated-page",
name: "Updated Page in Database", /* eslint-disable-line pipedream/source-name */
description: "Emit new event when a page in a database is updated. To select a specific page, use `Updated Page ID` instead",
version: "0.1.0",
version: "0.1.1",
type: "source",
dedupe: "unique",
props: {
Expand Down Expand Up @@ -171,7 +171,7 @@ export default {
});
}

if (!pageExistsInDB && this.includeNewPages) {
if (!pageExistsInDB) {
isNewPage = true;
propertyHasChanged = true;
propertyValues[page.id] = {
Expand All @@ -185,6 +185,11 @@ export default {
}
}

if (isNewPage && !this.includeNewPages) {
console.log(`Ignoring new page: ${page.id}`);
continue;
}

if (propertyHasChanged) {
this.emitEvent(page, changes, isNewPage);
}
Expand Down
Loading