mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
✨ Add Notion node V2 (#2437)
* ⚡ Add versioning * ⚡ Add credentials verification * ⚡ Add folmula filtering * ⚡ Add file support * ⚡ Apply internal review * ⚡ Improvements * ⚡ Add page updated event to trigger * ⚡ Use name instead of id when setting expression in select type * ⚡ improvements * ⚡ Improvements * ⚡ Improvement to descriptions * ⚡ Add filter to databasePage:getAll * ⚡ Improvements * ⚡ Add database:search operation * ⚡ Add page:archive operation * ⚡ Allow clearing fields date type * ⚡ Allow setting single value in people type field * asasas * asasas * aaaaa * ⚡ Improvements * ⚡ Fix merging issues * 🐛 Fix filename * ⚡ Minor fix Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -34,6 +34,7 @@ export class NotionTrigger implements INodeType {
|
||||
{
|
||||
name: 'notionApi',
|
||||
required: true,
|
||||
testedBy: 'notionApiCredentialTest',
|
||||
},
|
||||
],
|
||||
polling: true,
|
||||
@@ -49,10 +50,10 @@ export class NotionTrigger implements INodeType {
|
||||
name: 'Page Added to Database',
|
||||
value: 'pageAddedToDatabase',
|
||||
},
|
||||
// {
|
||||
// name: 'Record Updated',
|
||||
// value: 'recordUpdated',
|
||||
// },
|
||||
{
|
||||
name: 'Paged Updated in Database',
|
||||
value: 'pagedUpdatedInDatabase',
|
||||
},
|
||||
],
|
||||
required: true,
|
||||
default: '',
|
||||
@@ -68,26 +69,28 @@ export class NotionTrigger implements INodeType {
|
||||
show: {
|
||||
event: [
|
||||
'pageAddedToDatabase',
|
||||
'pagedUpdatedInDatabase',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'The ID of this database.',
|
||||
description: 'The ID of this database',
|
||||
},
|
||||
{
|
||||
displayName: 'Simple',
|
||||
displayName: 'Simplify Output',
|
||||
name: 'simple',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
event: [
|
||||
'pageAddedToDatabase',
|
||||
'pagedUpdatedInDatabase',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
description: 'When set to true a simplify version of the response will be used else the raw data.',
|
||||
description: 'Whether to return a simplified version of the response instead of the raw data',
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -148,7 +151,7 @@ export class NotionTrigger implements INodeType {
|
||||
|
||||
if (this.getMode() === 'manual') {
|
||||
if (simple === true) {
|
||||
data = simplifyObjects(data);
|
||||
data = simplifyObjects(data, false, 1);
|
||||
}
|
||||
if (Array.isArray(data) && data.length) {
|
||||
return [this.helpers.returnJsonArray(data)];
|
||||
@@ -172,7 +175,7 @@ export class NotionTrigger implements INodeType {
|
||||
}
|
||||
|
||||
if (simple === true) {
|
||||
records = simplifyObjects(records);
|
||||
records = simplifyObjects(records, false, 1);
|
||||
}
|
||||
|
||||
webhookData.lastRecordProccesed = data[0].id;
|
||||
|
||||
Reference in New Issue
Block a user