2020-10-16 01:27:09 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2020-02-10 12:55:28 -08:00
2021-12-03 00:44:16 -08:00
export const leadOperations : INodeProperties [ ] = [
2020-02-10 12:55:28 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-02-10 12:55:28 -08:00
displayOptions : {
show : {
resource : [
'lead' ,
] ,
} ,
} ,
options : [
2020-02-12 22:35:56 -08:00
{
name : 'Add Lead To Campaign' ,
value : 'addToCampaign' ,
description : 'Add lead to a campaign' ,
} ,
{
name : 'Add Note' ,
value : 'addNote' ,
description : 'Add note to a lead' ,
} ,
2020-02-10 12:55:28 -08:00
{
name : 'Create' ,
value : 'create' ,
description : 'Create a lead' ,
} ,
2021-06-09 20:25:20 -07:00
{
name : 'Create or Update' ,
value : 'upsert' ,
description : 'Create a new lead, or update the current one if it already exists (upsert)' ,
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
name : 'Delete' ,
value : 'delete' ,
description : 'Delete a lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get a lead' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all leads' ,
} ,
{
2020-02-12 22:35:56 -08:00
name : 'Get Summary' ,
value : 'getSummary' ,
2022-05-06 14:01:25 -07:00
description : 'Returns an overview of Lead\'s metadata' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
name : 'Update' ,
value : 'update' ,
description : 'Update a lead' ,
2020-02-10 12:55:28 -08:00
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-02-10 12:55:28 -08:00
2021-12-03 00:44:16 -08:00
export const leadFields : INodeProperties [ ] = [
2020-02-10 12:55:28 -08:00
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:create */
/* -------------------------------------------------------------------------- */
2021-06-09 20:25:20 -07:00
{
2022-06-03 10:23:49 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
2021-06-09 20:25:20 -07:00
displayName : 'Match Against' ,
name : 'externalId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getExternalIdFields' ,
loadOptionsDependsOn : [
'resource' ,
] ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'upsert' ,
] ,
} ,
} ,
2022-06-03 10:23:49 -07:00
description : 'The field to check to see if the lead already exists. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-06-09 20:25:20 -07:00
} ,
{
displayName : 'Value to Match' ,
name : 'externalIdValue' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'upsert' ,
] ,
} ,
} ,
2022-04-22 09:29:51 -07:00
description : 'If this value exists in the \'match against\' field, update the lead. Otherwise create a new one.' ,
2021-06-09 20:25:20 -07:00
} ,
2020-02-10 12:55:28 -08:00
{
displayName : 'Company' ,
name : 'company' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'create' ,
2021-06-09 20:25:20 -07:00
'upsert' ,
2020-10-16 01:27:09 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
description : 'Company of the lead. If person account record types have been enabled, and if the value of Company is null, the lead converts to a person account.' ,
} ,
{
displayName : 'Last Name' ,
name : 'lastname' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'create' ,
2021-06-09 20:25:20 -07:00
'upsert' ,
2020-10-16 01:27:09 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
description : 'Required. Last name of the lead. Limited to 80 characters.' ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'create' ,
2021-06-09 20:25:20 -07:00
'upsert' ,
2020-02-10 12:55:28 -08:00
] ,
} ,
} ,
options : [
2020-02-12 22:35:56 -08:00
{
displayName : 'Annual Revenue' ,
name : 'annualRevenue' ,
type : 'number' ,
typeOptions : {
numberPrecision : 2 ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Annual revenue for the company of the lead' ,
2020-02-12 22:35:56 -08:00
} ,
2020-02-10 12:55:28 -08:00
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'City for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
2022-05-23 23:56:33 -07:00
{
displayName : 'Country' ,
name : 'country' ,
type : 'string' ,
default : '' ,
description : 'Country of the lead' ,
} ,
2020-10-16 01:27:09 -07:00
{
displayName : 'Custom Fields' ,
name : 'customFieldsUi' ,
placeholder : 'Add Custom Field' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Filter by custom fields' ,
2020-10-16 01:27:09 -07:00
default : { } ,
options : [
{
name : 'customFieldsValues' ,
displayName : 'Custom Field' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Field Name or ID' ,
2020-10-16 01:27:09 -07:00
name : 'fieldId' ,
type : 'options' ,
typeOptions : {
2021-04-17 01:11:18 -07:00
loadOptionsMethod : 'getCustomFields' ,
2020-10-16 01:27:09 -07:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-10-16 01:27:09 -07:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The value to set on custom field' ,
2020-10-16 01:27:09 -07:00
} ,
] ,
} ,
] ,
} ,
2020-02-12 22:35:56 -08:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Description of the lead' ,
2020-02-12 22:35:56 -08:00
} ,
2020-02-10 12:55:28 -08:00
{
displayName : 'Email' ,
name : 'email' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Email address for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Fist Name' ,
name : 'firstname' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'First name of the lead. Limited to 40 characters.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Industry' ,
name : 'industry' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Website for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Is Unread By Owner' ,
name : 'IsUnreadByOwner' ,
2021-12-03 00:44:16 -08:00
type : 'boolean' ,
2020-02-12 22:35:56 -08:00
default : false ,
2022-05-23 23:56:33 -07:00
description : 'Whether true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Jigsaw' ,
name : 'jigsaw' ,
type : 'string' ,
default : '' ,
2022-05-23 23:56:33 -07:00
description : 'References the ID of a contact in Data.com. If a lead has a value in this field, it means that a contact was imported as a lead from Data.com.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lead Source Name or ID' ,
2020-02-12 22:35:56 -08:00
name : 'leadSource' ,
2020-02-10 12:55:28 -08:00
type : 'options' ,
typeOptions : {
2020-02-12 22:35:56 -08:00
loadOptionsMethod : 'getLeadSources' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'Source from which the lead was obtained. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
2021-03-10 09:36:26 -08:00
{
displayName : 'Mobile Phone' ,
name : 'mobilePhone' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Contact’ s mobile phone number' ,
2021-03-10 09:36:26 -08:00
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
displayName : 'Number Of Employees' ,
name : 'numberOfEmployees' ,
type : 'number' ,
2020-02-10 12:55:28 -08:00
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Number of employees at the lead’ s company. Label is Employees.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Owner Name or ID' ,
2020-02-10 12:55:28 -08:00
name : 'owner' ,
type : 'options' ,
typeOptions : {
2021-04-24 10:25:30 -07:00
loadOptionsMethod : 'getLeadOwners' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'The owner of the lead. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Phone' ,
name : 'phone' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Phone number for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Postal Code' ,
name : 'postalCode' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Postal code for the address of the lead. Label is Zip/Postal Code.' ,
2020-02-10 12:55:28 -08:00
} ,
2021-08-07 00:41:00 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Record Type Name or ID' ,
2021-08-07 00:41:00 -07:00
name : 'recordTypeId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getRecordTypes' ,
} ,
default : '' ,
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
displayName : 'Rating' ,
name : 'rating' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Rating of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Salutation' ,
name : 'salutation' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Salutation for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'State' ,
name : 'state' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'State for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Status Name or ID' ,
2020-02-12 22:35:56 -08:00
name : 'status' ,
type : 'options' ,
2020-02-10 12:55:28 -08:00
typeOptions : {
2020-02-12 22:35:56 -08:00
loadOptionsMethod : 'getLeadStatuses' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'Status code for this converted lead. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Street' ,
name : 'street' ,
type : 'string' ,
2020-02-10 12:55:28 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Street number and name for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Title for the lead, for example CFO or CEO' ,
2020-02-12 22:35:56 -08:00
} ,
{
displayName : 'Website' ,
name : 'website' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Website for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:update */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Lead ID' ,
name : 'leadId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'update' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of Lead that needs to be fetched' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
options : [
{
2020-02-12 22:35:56 -08:00
displayName : 'Annual Revenue' ,
name : 'annualRevenue' ,
type : 'number' ,
typeOptions : {
numberPrecision : 2 ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Annual revenue for the company of the lead' ,
2020-02-12 22:35:56 -08:00
} ,
{
displayName : 'City' ,
name : 'city' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'City for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Company' ,
name : 'company' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Company of the lead. If person account record types have been enabled, and if the value of Company is null, the lead converts to a person account.' ,
2020-02-10 12:55:28 -08:00
} ,
2022-05-23 23:56:33 -07:00
{
displayName : 'Country' ,
name : 'country' ,
type : 'string' ,
default : '' ,
description : 'Country of the lead' ,
} ,
2020-10-16 01:27:09 -07:00
{
displayName : 'Custom Fields' ,
name : 'customFieldsUi' ,
placeholder : 'Add Custom Field' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Filter by custom fields' ,
2020-10-16 01:27:09 -07:00
default : { } ,
options : [
{
name : 'customFieldsValues' ,
displayName : 'Custom Field' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Field Name or ID' ,
2020-10-16 01:27:09 -07:00
name : 'fieldId' ,
type : 'options' ,
typeOptions : {
2021-04-17 01:11:18 -07:00
loadOptionsMethod : 'getCustomFields' ,
2020-10-16 01:27:09 -07:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'The ID of the field to add custom field to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-10-16 01:27:09 -07:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The value to set on custom field' ,
2020-10-16 01:27:09 -07:00
} ,
] ,
} ,
] ,
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
displayName : 'Description' ,
name : 'description' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
2020-02-12 22:35:56 -08:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
2020-02-10 12:55:28 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Description of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Email' ,
name : 'email' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Email address for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Fist Name' ,
name : 'firstname' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'First name of the lead. Limited to 40 characters.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Industry' ,
name : 'industry' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Website for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Is Unread By Owner' ,
name : 'IsUnreadByOwner' ,
2021-12-03 00:44:16 -08:00
type : 'boolean' ,
2020-02-12 22:35:56 -08:00
default : false ,
2022-05-23 23:56:33 -07:00
description : 'Whether true, lead has been assigned, but not yet viewed. See Unread Leads for more information. Label is Unread By Owner.' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Jigsaw' ,
name : 'jigsaw' ,
type : 'string' ,
default : '' ,
2022-05-23 23:56:33 -07:00
description : 'References the ID of a contact in Data.com. If a lead has a value in this field, it means that a contact was imported as a lead from Data.com.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Last Name' ,
name : 'lastname' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Required. Last name of the lead. Limited to 80 characters.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lead Source Name or ID' ,
2020-02-12 22:35:56 -08:00
name : 'leadSource' ,
2020-02-10 12:55:28 -08:00
type : 'options' ,
typeOptions : {
2020-02-12 22:35:56 -08:00
loadOptionsMethod : 'getLeadSources' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'Source from which the lead was obtained. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
2021-03-10 09:36:26 -08:00
{
displayName : 'Mobile Phone' ,
name : 'mobilePhone' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Contact’ s mobile phone number' ,
2021-03-10 09:36:26 -08:00
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
displayName : 'Number Of Employees' ,
name : 'numberOfEmployees' ,
type : 'number' ,
2020-02-10 12:55:28 -08:00
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Number of employees at the lead’ s company. Label is Employees.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Owner Name or ID' ,
2020-02-10 12:55:28 -08:00
name : 'owner' ,
type : 'options' ,
typeOptions : {
2021-04-24 10:25:30 -07:00
loadOptionsMethod : 'getLeadOwners' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'The owner of the lead. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Postal Code' ,
name : 'postalCode' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2020-02-12 22:35:56 -08:00
description : 'Postal code for the address of the lead. Label is Zip/Postal Code.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Phone' ,
name : 'phone' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Phone number for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
2021-08-07 00:41:00 -07:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Record Type Name or ID' ,
2021-08-07 00:41:00 -07:00
name : 'recordTypeId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getRecordTypes' ,
} ,
default : '' ,
} ,
2020-02-10 12:55:28 -08:00
{
2020-02-12 22:35:56 -08:00
displayName : 'Rating' ,
name : 'rating' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Rating of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Salutation' ,
name : 'salutation' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Salutation for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'State' ,
name : 'state' ,
2020-02-10 12:55:28 -08:00
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'State for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Status Name or ID' ,
2020-02-12 22:35:56 -08:00
name : 'status' ,
type : 'options' ,
2020-02-10 12:55:28 -08:00
typeOptions : {
2020-02-12 22:35:56 -08:00
loadOptionsMethod : 'getLeadStatuses' ,
2020-02-10 12:55:28 -08:00
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'Status code for this converted lead. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Street' ,
name : 'street' ,
type : 'string' ,
2020-02-10 12:55:28 -08:00
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Street number and name for the address of the lead' ,
2020-02-10 12:55:28 -08:00
} ,
{
2020-02-12 22:35:56 -08:00
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Title for the lead, for example CFO or CEO' ,
2020-02-12 22:35:56 -08:00
} ,
{
displayName : 'Website' ,
name : 'website' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Website for the lead' ,
2020-02-10 12:55:28 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:get */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Lead ID' ,
name : 'leadId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'get' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of Lead that needs to be fetched' ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:delete */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Lead ID' ,
name : 'leadId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'delete' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of Lead that needs to be fetched' ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:getAll */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'getAll' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
default : 50 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
options : [
2021-01-13 01:45:41 -08:00
{
displayName : 'Conditions' ,
name : 'conditionsUi' ,
placeholder : 'Add Condition' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The condition to set' ,
2021-01-13 01:45:41 -08:00
default : { } ,
options : [
{
name : 'conditionValues' ,
displayName : 'Condition' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Field Name or ID' ,
2021-01-13 01:45:41 -08:00
name : 'field' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getLeadFields' ,
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'For date, number, or boolean, please use expressions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-01-13 01:45:41 -08:00
} ,
2022-05-20 14:47:24 -07:00
// eslint-disable-next-line n8n-nodes-base/node-param-operation-without-no-data-expression
2021-01-13 01:45:41 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
options : [
2022-06-03 10:23:49 -07:00
{
name : '<' ,
value : '<' ,
} ,
{
name : '<=' ,
value : '<=' ,
} ,
2021-01-13 01:45:41 -08:00
{
name : '=' ,
value : 'equal' ,
} ,
{
name : '>' ,
value : '>' ,
} ,
{
name : '>=' ,
value : '>=' ,
} ,
] ,
default : 'equal' ,
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
2020-02-10 12:55:28 -08:00
{
displayName : 'Fields' ,
name : 'fields' ,
type : 'string' ,
default : '' ,
description : 'Fields to include separated by ,' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* contact:addToCampaign */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Lead ID' ,
name : 'leadId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addToCampaign' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of contact that needs to be fetched' ,
2020-02-10 12:55:28 -08:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Campaign Name or ID' ,
2020-02-10 12:55:28 -08:00
name : 'campaignId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCampaigns' ,
} ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addToCampaign' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-06-03 10:23:49 -07:00
description : 'ID of the campaign that needs to be fetched. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addToCampaign' ,
] ,
} ,
} ,
options : [
{
displayName : 'Status' ,
name : 'status' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Controls the HasResponded flag on this object' ,
2020-02-10 12:55:28 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
2021-01-13 01:45:41 -08:00
/* -------------------------------------------------------------------------- */
/* lead:addNote */
/* -------------------------------------------------------------------------- */
2020-02-10 12:55:28 -08:00
{
displayName : 'Lead ID' ,
name : 'leadId' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addNote' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'ID of lead that needs to be fetched' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addNote' ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'Title of the note' ,
2020-02-10 12:55:28 -08:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'lead' ,
] ,
operation : [
'addNote' ,
] ,
} ,
} ,
options : [
{
displayName : 'Body' ,
name : 'body' ,
type : 'string' ,
default : '' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
description : 'Body of the note. Limited to 32 KB.' ,
} ,
2020-02-12 22:35:56 -08:00
{
displayName : 'Is Private' ,
name : 'isPrivate' ,
type : 'boolean' ,
default : false ,
2022-05-23 23:56:33 -07:00
description : 'Whether true, only the note owner or a user with the “Modify All Data” permission can view the note or query it via the API' ,
2020-02-12 22:35:56 -08:00
} ,
2020-02-10 12:55:28 -08:00
{
2022-06-03 10:23:49 -07:00
displayName : 'Owner Name or ID' ,
2020-02-10 12:55:28 -08:00
name : 'owner' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getUsers' ,
} ,
default : '' ,
2022-06-03 10:23:49 -07:00
description : 'ID of the user who owns the note. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2020-02-10 12:55:28 -08:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-02-10 12:55:28 -08:00
} ,
2021-12-03 00:44:16 -08:00
] ;