✨ Add Freshworks node (#2017)
* ✨ Create Freshworks node * ⚡ Implement all getAll operations * ⚡ Add tz to appointment:create and update * ⚡ Fix repetition in email in contact:create * ⚡ Add tz to salesActivity:create and update * ⚡ Add tz to task:create and update * 🔥 Remove required from due date * ⚡ Add all-day setting to appointment * ⚡ Add filters to all operations * ⚡ Improvements * ⚡ Minor improvements * ⚡ Additional parameter display name changes Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -0,0 +1,214 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export const noteOperations = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a note',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a note',
|
||||
},
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Update a note',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
||||
export const noteFields = [
|
||||
// ----------------------------------------
|
||||
// note: create
|
||||
// ----------------------------------------
|
||||
{
|
||||
displayName: 'Content',
|
||||
name: 'description',
|
||||
description: 'Content of the note',
|
||||
type: 'string',
|
||||
required: true,
|
||||
typeOptions: {
|
||||
rows: 5,
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Target Type',
|
||||
name: 'targetableType',
|
||||
description: 'Type of the entity for which the note is created',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: 'Contact',
|
||||
options: [
|
||||
{
|
||||
name: 'Contact',
|
||||
value: 'Contact',
|
||||
},
|
||||
{
|
||||
name: 'Deal',
|
||||
value: 'Deal',
|
||||
},
|
||||
{
|
||||
name: 'Sales Account',
|
||||
value: 'SalesAccount',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Target ID',
|
||||
name: 'targetable_id',
|
||||
description: 'ID of the entity for which note is created. The type of entity is selected in "Target Type".',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------------
|
||||
// note: delete
|
||||
// ----------------------------------------
|
||||
{
|
||||
displayName: 'Note ID',
|
||||
name: 'noteId',
|
||||
description: 'ID of the note to delete',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------------
|
||||
// note: update
|
||||
// ----------------------------------------
|
||||
{
|
||||
displayName: 'Note ID',
|
||||
name: 'noteId',
|
||||
description: 'ID of the note to update',
|
||||
type: 'string',
|
||||
required: true,
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Update Fields',
|
||||
name: 'updateFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'note',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Content',
|
||||
name: 'description',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
rows: 5,
|
||||
},
|
||||
default: '',
|
||||
description: 'Content of the note',
|
||||
},
|
||||
{
|
||||
displayName: 'Target ID',
|
||||
name: 'targetable_id',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'ID of the entity for which the note is updated',
|
||||
},
|
||||
{
|
||||
displayName: 'Target Type',
|
||||
name: 'targetable_type',
|
||||
type: 'options',
|
||||
default: 'Contact',
|
||||
description: 'Type of the entity for which the note is updated',
|
||||
options: [
|
||||
{
|
||||
name: 'Contact',
|
||||
value: 'Contact',
|
||||
},
|
||||
{
|
||||
name: 'Deal',
|
||||
value: 'Deal',
|
||||
},
|
||||
{
|
||||
name: 'Sales Account',
|
||||
value: 'SalesAccount',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
||||
Reference in New Issue
Block a user