feat(Lemlist Node): Add V2 to support more API operations (#10615)
This commit is contained in:
@@ -0,0 +1,301 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const activityOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'getAll',
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many activities',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['activity'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const activityFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// activity: getAll
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['activity'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
default: 5,
|
||||
description: 'Max number of results to return',
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 1000,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['activity'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['activity'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
default: '',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
description:
|
||||
'ID of the campaign to retrieve activity for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Is First',
|
||||
name: 'isFirst',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
displayName: 'Lead ID',
|
||||
name: 'leadId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Type',
|
||||
name: 'type',
|
||||
type: 'options',
|
||||
default: 'emailsOpened',
|
||||
description: 'Type of activity to retrieve',
|
||||
options: [
|
||||
{
|
||||
name: 'Aircall Created',
|
||||
value: 'aircallCreated',
|
||||
},
|
||||
{
|
||||
name: 'Aircall Done',
|
||||
value: 'aircallDone',
|
||||
},
|
||||
{
|
||||
name: 'Aircall Ended',
|
||||
value: 'aircallEnded',
|
||||
},
|
||||
{
|
||||
name: 'Aircall Interested',
|
||||
value: 'aircallInterested',
|
||||
},
|
||||
{
|
||||
name: 'Aircall Not Interested',
|
||||
value: 'aircallNotInterested',
|
||||
},
|
||||
{
|
||||
name: 'Api Done',
|
||||
value: 'apiDone',
|
||||
},
|
||||
{
|
||||
name: 'Api Failed',
|
||||
value: 'apiFailed',
|
||||
},
|
||||
{
|
||||
name: 'Api Interested',
|
||||
value: 'apiInterested',
|
||||
},
|
||||
{
|
||||
name: 'Api Not Interested',
|
||||
value: 'apiNotInterested',
|
||||
},
|
||||
{
|
||||
name: 'Attracted',
|
||||
value: 'attracted',
|
||||
},
|
||||
{
|
||||
name: 'Connection Issue',
|
||||
value: 'connectionIssue',
|
||||
},
|
||||
{
|
||||
name: 'Contacted',
|
||||
value: 'contacted',
|
||||
},
|
||||
{
|
||||
name: 'Custom Domain Errors',
|
||||
value: 'customDomainErrors',
|
||||
},
|
||||
{
|
||||
name: 'Emails Bounced',
|
||||
value: 'emailsBounced',
|
||||
},
|
||||
{
|
||||
name: 'Emails Clicked',
|
||||
value: 'emailsClicked',
|
||||
},
|
||||
{
|
||||
name: 'Emails Failed',
|
||||
value: 'emailsFailed',
|
||||
},
|
||||
{
|
||||
name: 'Emails Interested',
|
||||
value: 'emailsInterested',
|
||||
},
|
||||
{
|
||||
name: 'Emails Not Interested',
|
||||
value: 'emailsNotInterested',
|
||||
},
|
||||
{
|
||||
name: 'Emails Opened',
|
||||
value: 'emailsOpened',
|
||||
},
|
||||
{
|
||||
name: 'Emails Replied',
|
||||
value: 'emailsReplied',
|
||||
},
|
||||
{
|
||||
name: 'Emails Send Failed',
|
||||
value: 'emailsSendFailed',
|
||||
},
|
||||
{
|
||||
name: 'Emails Sent',
|
||||
value: 'emailsSent',
|
||||
},
|
||||
{
|
||||
name: 'Emails Unsubscribed',
|
||||
value: 'emailsUnsubscribed',
|
||||
},
|
||||
{
|
||||
name: 'Hooked',
|
||||
value: 'hooked',
|
||||
},
|
||||
{
|
||||
name: 'Interested',
|
||||
value: 'interested',
|
||||
},
|
||||
{
|
||||
name: 'Lemwarm Paused',
|
||||
value: 'lemwarmPaused',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Interested',
|
||||
value: 'linkedinInterested',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Invite Accepted',
|
||||
value: 'linkedinInviteAccepted',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Invite Done',
|
||||
value: 'linkedinInviteDone',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Invite Failed',
|
||||
value: 'linkedinInviteFailed',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Not Interested',
|
||||
value: 'linkedinNotInterested',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Replied',
|
||||
value: 'linkedinReplied',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Send Failed',
|
||||
value: 'linkedinSendFailed',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Sent',
|
||||
value: 'linkedinSent',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Visit Done',
|
||||
value: 'linkedinVisitDone',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Visit Failed',
|
||||
value: 'linkedinVisitFailed',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Voice Note Done',
|
||||
value: 'linkedinVoiceNoteDone',
|
||||
},
|
||||
{
|
||||
name: 'LinkedIn Voice Note Failed',
|
||||
value: 'linkedinVoiceNoteFailed',
|
||||
},
|
||||
{
|
||||
name: 'Manual Interested',
|
||||
value: 'manualInterested',
|
||||
},
|
||||
{
|
||||
name: 'Manual Not Interested',
|
||||
value: 'manualNotInterested',
|
||||
},
|
||||
{
|
||||
name: 'Not Interested',
|
||||
value: 'notInterested',
|
||||
},
|
||||
{
|
||||
name: 'Opportunities Done',
|
||||
value: 'opportunitiesDone',
|
||||
},
|
||||
{
|
||||
name: 'Paused',
|
||||
value: 'paused',
|
||||
},
|
||||
{
|
||||
name: 'Resumed',
|
||||
value: 'resumed',
|
||||
},
|
||||
{
|
||||
name: 'Send Limit Reached',
|
||||
value: 'sendLimitReached',
|
||||
},
|
||||
{
|
||||
name: 'Skipped',
|
||||
value: 'skipped',
|
||||
},
|
||||
{
|
||||
name: 'Warmed',
|
||||
value: 'warmed',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
displayName: 'Version',
|
||||
name: 'version',
|
||||
type: 'string',
|
||||
default: 'v2',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,149 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const campaignOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'getAll',
|
||||
options: [
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many campaigns',
|
||||
},
|
||||
{
|
||||
name: 'Get Stats',
|
||||
value: 'getStats',
|
||||
action: 'Get campaign stats',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const campaignFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// campaign: getAll
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
default: 5,
|
||||
description: 'Max number of results to return',
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 1000,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
name: 'filters',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Filter',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Version',
|
||||
name: 'version',
|
||||
type: 'string',
|
||||
default: 'v2',
|
||||
},
|
||||
],
|
||||
},
|
||||
// ----------------------------------
|
||||
// campaign: getStats
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
description:
|
||||
'ID of the campaign to get stats for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getStats'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Start Date',
|
||||
name: 'startDate',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
required: true,
|
||||
placeholder: 'e.g. 2024-09-03 00:00:00Z',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getStats'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'End Date',
|
||||
name: 'endDate',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
placeholder: 'e.g. 2024-09-03 00:00:00Z',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getStats'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Timezone',
|
||||
name: 'timezone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
placeholder: 'e.g. Europe/Paris',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['getStats'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,172 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const enrichmentOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'get',
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Fetches a previously completed enrichment',
|
||||
},
|
||||
{
|
||||
name: 'Enrich Lead',
|
||||
value: 'enrichLead',
|
||||
action: 'Enrich a lead using an email or LinkedIn URL',
|
||||
},
|
||||
{
|
||||
name: 'Enrich Person',
|
||||
value: 'enrichPerson',
|
||||
action: 'Enrich a person using an email or LinkedIn URL',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const enrichmentFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// enrichment: get
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Enrichment ID',
|
||||
name: 'enrichId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
description: 'ID of the enrichment to retrieve',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
// ----------------------------------
|
||||
// enrichment: enrichLead
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Lead ID',
|
||||
name: 'leadId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichLead'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Find Email',
|
||||
name: 'findEmail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichLead', 'enrichPerson'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Verify Email',
|
||||
name: 'verifyEmail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichLead', 'enrichPerson'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Linkedin Enrichment',
|
||||
name: 'linkedinEnrichment',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichLead', 'enrichPerson'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Find Phone',
|
||||
name: 'findPhone',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichLead', 'enrichPerson'],
|
||||
},
|
||||
},
|
||||
},
|
||||
// ----------------------------------
|
||||
// enrichment: enrichPerson
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['enrich'],
|
||||
operation: ['enrichPerson'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'First Name',
|
||||
name: 'firstName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Last Name',
|
||||
name: 'lastName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Linkedin Url',
|
||||
name: 'linkedinUrl',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Company Name',
|
||||
name: 'companyName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Company Domain',
|
||||
name: 'companyDomain',
|
||||
type: 'string',
|
||||
default: '',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,281 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const leadOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'create',
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
action: 'Create a lead',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete a lead',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get a lead',
|
||||
},
|
||||
{
|
||||
name: 'Unsubscribe',
|
||||
value: 'unsubscribe',
|
||||
action: 'Unsubscribe a lead',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const leadFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// lead: create
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
description:
|
||||
'ID of the campaign to create the lead under. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email of the lead to create',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Company Name',
|
||||
name: 'companyName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Company name of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Company Domain',
|
||||
name: 'companyDomain',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Company domain of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Deduplicate',
|
||||
name: 'deduplicate',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description:
|
||||
'Whether to do not insert if this email is already present in another campaign',
|
||||
},
|
||||
{
|
||||
displayName: 'Find Email',
|
||||
name: 'findEmail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to find verified email',
|
||||
},
|
||||
{
|
||||
displayName: 'Find Phone',
|
||||
name: 'findPhone',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to find phone number',
|
||||
},
|
||||
{
|
||||
displayName: 'First Name',
|
||||
name: 'firstName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'First name of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Icebreaker',
|
||||
name: 'icebreaker',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Icebreaker of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Job Title',
|
||||
name: 'jobTitle',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Job title of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Last Name',
|
||||
name: 'lastName',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Last name of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Linkedin Enrichment',
|
||||
name: 'linkedinEnrichment',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to run the LinkedIn enrichment',
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'LinkedIn URL',
|
||||
name: 'linkedinUrl',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'LinkedIn URL of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Phone',
|
||||
name: 'phone',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Phone number of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Picture URL',
|
||||
name: 'picture',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Picture URL of the lead to create',
|
||||
},
|
||||
{
|
||||
displayName: 'Verify Email',
|
||||
name: 'verifyEmail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to verify existing email (debounce)',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// lead: delete
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
description:
|
||||
'ID of the campaign to remove the lead from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email of the lead to delete',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// lead: get
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email of the lead to retrieve',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// lead: unsubscribe
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Campaign Name or ID',
|
||||
name: 'campaignId',
|
||||
type: 'options',
|
||||
required: true,
|
||||
default: [],
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getCampaigns',
|
||||
},
|
||||
description:
|
||||
'ID of the campaign to unsubscribe the lead from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['unsubscribe'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email of the lead to unsubscribe',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['lead'],
|
||||
operation: ['unsubscribe'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const teamOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'get',
|
||||
options: [
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
action: 'Get a team',
|
||||
},
|
||||
{
|
||||
name: 'Get Credits',
|
||||
value: 'getCredits',
|
||||
action: 'Get a team',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['team'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const teamFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// team: get
|
||||
// ----------------------------------
|
||||
];
|
||||
@@ -0,0 +1,106 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const unsubscribeOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
default: 'add',
|
||||
options: [
|
||||
{
|
||||
name: 'Add',
|
||||
value: 'add',
|
||||
action: 'Add an email to an unsubscribe list',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
action: 'Delete an email from an unsubscribe list',
|
||||
},
|
||||
{
|
||||
name: 'Get Many',
|
||||
value: 'getAll',
|
||||
action: 'Get many unsubscribed emails',
|
||||
},
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['unsubscribe'],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const unsubscribeFields: INodeProperties[] = [
|
||||
// ----------------------------------
|
||||
// unsubscribe: add
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email to add to the unsubscribes',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['unsubscribe'],
|
||||
operation: ['add'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// unsubscribe: delete
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
default: '',
|
||||
description: 'Email to delete from the unsubscribes',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['unsubscribe'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// unsubscribe: getAll
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Return All',
|
||||
name: 'returnAll',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['unsubscribe'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Limit',
|
||||
name: 'limit',
|
||||
type: 'number',
|
||||
default: 5,
|
||||
description: 'Max number of results to return',
|
||||
typeOptions: {
|
||||
minValue: 1,
|
||||
maxValue: 1000,
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['unsubscribe'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './ActivityDescription';
|
||||
export * from './CampaignDescription';
|
||||
export * from './EnrichmentDescription';
|
||||
export * from './LeadDescription';
|
||||
export * from './TeamDescription';
|
||||
export * from './UnsubscribeDescription';
|
||||
Reference in New Issue
Block a user