2023-01-27 03:22:44 -08:00
import type { INodeProperties } from 'n8n-workflow' ;
2020-04-17 14:42:41 -07:00
2021-12-03 00:44:16 -08:00
export const companyOperations : INodeProperties [ ] = [
2020-04-17 14:42:41 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2020-04-17 14:42:41 -07:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a company' ,
2022-07-10 13:50:51 -07:00
action : 'Create a company' ,
2020-04-17 14:42:41 -07:00
} ,
{
name : 'Delete' ,
value : 'delete' ,
description : 'Delete a company' ,
2022-07-10 13:50:51 -07:00
action : 'Delete a company' ,
2020-04-17 14:42:41 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
description : 'Get a company' ,
2022-07-10 13:50:51 -07:00
action : 'Get a company' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2020-04-17 14:42:41 -07:00
value : 'getAll' ,
2022-09-13 03:36:36 -07:00
description : 'Get many companies' ,
2022-09-08 08:10:13 -07:00
action : 'Get many companies' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
name : 'Get Recently Created/Updated' ,
value : 'getRecentlyCreatedUpdated' ,
description : 'Get recently created/updated companies' ,
action : 'Get recently created/updated companies' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
name : 'Search' ,
2020-04-17 14:42:41 -07:00
value : 'searchByDomain' ,
2023-05-08 06:15:13 -07:00
description : 'Search companies by their website domain' ,
2022-07-10 13:50:51 -07:00
action : 'Search for a company by Domain' ,
2020-04-17 14:42:41 -07:00
} ,
{
name : 'Update' ,
value : 'update' ,
description : 'Update a company' ,
2022-07-10 13:50:51 -07:00
action : 'Update a company' ,
2020-04-17 14:42:41 -07:00
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-04-17 14:42:41 -07:00
2021-12-03 00:44:16 -08:00
export const companyFields : INodeProperties [ ] = [
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:create */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'create' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
default : '' ,
} ,
{
2023-05-08 06:15:13 -07:00
displayName : 'Company Properties' ,
2020-04-17 14:42:41 -07:00
name : 'additionalFields' ,
type : 'collection' ,
2023-05-08 06:15:13 -07:00
placeholder : 'Add Property' ,
2020-04-17 14:42:41 -07:00
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'create' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
displayName : 'About Us' ,
name : 'aboutUs' ,
type : 'string' ,
2023-05-08 06:15:13 -07:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
2020-04-17 14:42:41 -07:00
default : '' ,
} ,
{
displayName : 'Annual Revenue' ,
name : 'annualRevenue' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The actual or estimated annual revenue of the company' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The city where the company is located' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Close Date' ,
name : 'closeDate' ,
type : 'dateTime' ,
default : '' ,
2023-05-08 06:15:13 -07:00
description :
'The date the company or organization was closed as a customer. When using expressions, the time should be specified in YYYY-MM-DD hh-mm-ss format.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Company Domain Name' ,
name : 'companyDomainName' ,
type : 'string' ,
default : '' ,
2020-10-22 06:46:03 -07:00
description : 'The domain name of the company or organization' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Company Owner Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'companyOwner' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOwners' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The owner of the company. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Country/Region' ,
name : 'countryRegion' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The country/region in which the company or organization is located' ,
2020-04-17 14:42:41 -07:00
} ,
2021-02-04 06:31:48 -08:00
{
displayName : 'Custom Properties' ,
name : 'customPropertiesUi' ,
placeholder : 'Add Custom Property' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'customPropertiesValues' ,
displayName : 'Custom Property' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Property Name or ID' ,
2021-02-04 06:31:48 -08:00
name : 'property' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyCustomProperties' ,
} ,
2023-05-08 06:15:13 -07:00
default : { } ,
2022-08-17 08:50:24 -07:00
description :
'Name of the property. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2021-02-04 06:31:48 -08:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2023-05-08 06:15:13 -07:00
required : true ,
2021-02-04 06:31:48 -08:00
description : 'Value of the property' ,
} ,
] ,
} ,
] ,
} ,
2020-04-17 14:42:41 -07:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "A short statement about the company's mission and goals" ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Facebook Fans' ,
name : 'facebookFans' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'Number of facebook fans' ,
} ,
{
displayName : 'Google Plus Page' ,
name : 'googlePlusPage' ,
type : 'string' ,
default : '' ,
description : 'The URL of the Google Plus page for the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Industry Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'industry' ,
type : 'options' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
loadOptionsMethod : 'getCompanyIndustries' ,
2020-04-17 14:42:41 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of business the company performs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Is Public' ,
name : 'isPublic' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether that the company is publicly traded' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lead Status Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'leadStatus' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyleadStatuses' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The company\'s sales, prospecting or outreach status. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lifecycle Stage Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'lifecycleStatus' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanylifecycleStages' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The most advanced lifecycle stage across all contacts associated with this company or organization. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'LinkedIn Bio' ,
name : 'linkedinBio' ,
type : 'string' ,
default : '' ,
description : 'The LinkedIn bio for the company or organization' ,
} ,
{
displayName : 'LinkedIn Company Page' ,
name : 'linkedInCompanyPage' ,
type : 'string' ,
default : '' ,
description : 'The URL of the LinkedIn company page for the company or organization' ,
} ,
{
displayName : 'Number Of Employees' ,
name : 'numberOfEmployees' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The total number of employees who work for the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Original Source Type Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'originalSourceType' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanySourceTypes' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Original source for the contact with the earliest activity for this company or organization. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Phone Number' ,
name : 'phoneNumber' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "A company's primary phone number. Powered by HubSpot Insights." ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Postal Code' ,
name : 'postalCode' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The postal or zip code of the company or organization. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'State/Region' ,
name : 'stateRegion' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The state or region in which the company or organization is located. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Street Address' ,
name : 'streetAddress' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The street address of the company or organization, including unit number. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Street Address 2' ,
name : 'streetAddress2' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The additional address of the company or organization. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Target Account Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'targetAccount' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyTargetAccounts' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The Target Account property is a means to flag high priority companies if you are following an account based strategy. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Timezone' ,
name : 'timezone' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The time zone where the company or organization is located. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Total Money Raised' ,
name : 'totalMoneyRaised' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'The total amount of money raised by the company. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Twitter Bio' ,
name : 'twitterBio' ,
type : 'string' ,
2023-05-08 06:15:13 -07:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
2020-04-17 14:42:41 -07:00
default : '' ,
description : 'The Twitter bio of the company or organization' ,
} ,
{
displayName : 'Twitter Followers' ,
name : 'twitterFollowers' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The number of Twitter followers of the company or organization' ,
} ,
{
displayName : 'Twitter Handle' ,
name : 'twitterHandle' ,
type : 'string' ,
default : '' ,
description : 'The main twitter account of the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Type Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'type' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyTypes' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The optional classification of this company record - prospect, partner, etc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Web Technologies Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'webTechnologies' ,
type : 'options' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
loadOptionsMethod : 'getCompanyWebTechnologies' ,
2020-04-17 14:42:41 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The web technologies used by the company or organization. Powered by HubSpot Insights. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Website URL' ,
name : 'websiteUrl' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The main website of the company or organization. This property is used to identify unique companies. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2021-01-31 23:31:40 -08:00
displayName : 'Year Founded' ,
2020-04-17 14:42:41 -07:00
name : 'yearFounded' ,
type : 'string' ,
default : '' ,
description : 'The year the company was created. Powered by HubSpot Insights.' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:update */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
2023-05-08 06:15:13 -07:00
displayName : 'Company to Update' ,
2020-04-17 14:42:41 -07:00
name : 'companyId' ,
2023-05-08 06:15:13 -07:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2020-04-17 14:42:41 -07:00
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'update' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
2023-05-08 06:15:13 -07:00
modes : [
{
displayName : 'From List' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select from the list' ,
typeOptions : {
searchListMethod : 'searchCompanies' ,
} ,
} ,
{
displayName : 'By Id' ,
name : 'id' ,
type : 'string' ,
placeholder : '58539222' ,
validation : [
{
type : 'regex' ,
properties : {
regex : '[0-9]+' ,
errorMessage : 'Not a valid HubSpot Company ID' ,
} ,
} ,
] ,
} ,
] ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'update' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
displayName : 'About Us' ,
name : 'aboutUs' ,
type : 'string' ,
2023-05-08 06:15:13 -07:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
2020-04-17 14:42:41 -07:00
default : '' ,
} ,
{
displayName : 'Annual Revenue' ,
name : 'annualRevenue' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The actual or estimated annual revenue of the company' ,
} ,
{
displayName : 'City' ,
name : 'city' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The city where the company is located' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Close Date' ,
name : 'closeDate' ,
type : 'dateTime' ,
default : '' ,
2023-05-08 06:15:13 -07:00
description :
'The date the company or organization was closed as a customer. When using expressions, the time should be specified in YYYY-MM-DD hh-mm-ss format.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Company Domain Name' ,
name : 'companyDomainName' ,
type : 'string' ,
default : '' ,
2020-10-22 06:46:03 -07:00
description : 'The domain name of the company or organization' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-11-15 00:43:43 -08:00
displayName : 'Company Owner Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'companyOwner' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getOwners' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The owner of the company. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Country/Region' ,
name : 'countryRegion' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The country/region in which the company or organization is located' ,
2020-04-17 14:42:41 -07:00
} ,
2021-02-04 06:31:48 -08:00
{
displayName : 'Custom Properties' ,
name : 'customPropertiesUi' ,
placeholder : 'Add Custom Property' ,
type : 'fixedCollection' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
options : [
{
name : 'customPropertiesValues' ,
displayName : 'Custom Property' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Property Name or ID' ,
2021-02-04 06:31:48 -08:00
name : 'property' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyCustomProperties' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Name of the property. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2021-02-04 06:31:48 -08:00
} ,
{
displayName : 'Value' ,
name : 'value' ,
type : 'string' ,
default : '' ,
2023-05-08 06:15:13 -07:00
required : true ,
2021-02-04 06:31:48 -08:00
description : 'Value of the property' ,
} ,
] ,
} ,
] ,
} ,
2020-04-17 14:42:41 -07:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "A short statement about the company's mission and goals" ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Facebook Fans' ,
name : 'facebookFans' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'Number of facebook fans' ,
} ,
{
displayName : 'Google Plus Page' ,
name : 'googlePlusPage' ,
type : 'string' ,
default : '' ,
description : 'The URL of the Google Plus page for the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Industry Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'industry' ,
type : 'options' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
loadOptionsMethod : 'getCompanyIndustries' ,
2020-04-17 14:42:41 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The type of business the company performs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Is Public' ,
name : 'isPublic' ,
type : 'boolean' ,
default : false ,
2022-06-20 07:54:01 -07:00
description : 'Whether that the company is publicly traded' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lead Status Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'leadStatus' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyleadStatuses' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The company\'s sales, prospecting or outreach status. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Lifecycle Stage Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'lifecycleStatus' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanylifecycleStages' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The most advanced lifecycle stage across all contacts associated with this company or organization. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Linkedin Bio' ,
name : 'linkedinBio' ,
type : 'string' ,
default : '' ,
description : 'The LinkedIn bio for the company or organization' ,
} ,
{
displayName : 'LinkedIn Company Page' ,
name : 'linkedInCompanyPage' ,
type : 'string' ,
default : '' ,
description : 'The URL of the LinkedIn company page for the company or organization' ,
} ,
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
default : '' ,
} ,
{
displayName : 'Number Of Employees' ,
name : 'numberOfEmployees' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The total number of employees who work for the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Original Source Type Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'originalSourceType' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanySourceTypes' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Original source for the contact with the earliest activity for this company or organization. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Phone Number' ,
name : 'phoneNumber' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description : "A company's primary phone number. Powered by HubSpot Insights." ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Postal Code' ,
name : 'postalCode' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The postal or zip code of the company or organization. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'State/Region' ,
name : 'stateRegion' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The state or region in which the company or organization is located. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Street Address' ,
name : 'streetAddress' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The street address of the company or organization, including unit number. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Street Address 2' ,
name : 'streetAddress2' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The additional address of the company or organization. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Target Account Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'targetAccount' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyTargetAccounts' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The Target Account property is a means to flag high priority companies if you are following an account based strategy. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Timezone' ,
name : 'timezone' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The time zone where the company or organization is located. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Total Money Raised' ,
name : 'totalMoneyRaised' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
2022-08-17 08:50:24 -07:00
description :
'The total amount of money raised by the company. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Twitter Bio' ,
name : 'twitterBio' ,
type : 'string' ,
2023-05-08 06:15:13 -07:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
2020-04-17 14:42:41 -07:00
default : '' ,
description : 'The Twitter bio of the company or organization' ,
} ,
{
displayName : 'Twitter Followers' ,
name : 'twitterFollowers' ,
type : 'number' ,
typeOptions : {
minValue : 0 ,
} ,
default : 0 ,
description : 'The number of Twitter followers of the company or organization' ,
} ,
{
displayName : 'Twitter Handle' ,
name : 'twitterHandle' ,
type : 'string' ,
default : '' ,
description : 'The main twitter account of the company or organization' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Type Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'type' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getCompanyTypes' ,
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The optional classification of this company record - prospect, partner, etc. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Web Technologies Name or ID' ,
2020-04-17 14:42:41 -07:00
name : 'webTechnologies' ,
type : 'options' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
loadOptionsMethod : 'getCompanyWebTechnologies' ,
2020-04-17 14:42:41 -07:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The web technologies used by the company or organization. Powered by HubSpot Insights. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Website URL' ,
name : 'websiteUrl' ,
type : 'string' ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'The main website of the company or organization. This property is used to identify unique companies. Powered by HubSpot Insights.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2021-01-31 23:31:40 -08:00
displayName : 'Year Founded' ,
2020-04-17 14:42:41 -07:00
name : 'yearFounded' ,
type : 'string' ,
default : '' ,
description : 'The year the company was created. Powered by HubSpot Insights.' ,
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:get */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
2023-05-08 06:15:13 -07:00
displayName : 'Company to Get' ,
2020-04-17 14:42:41 -07:00
name : 'companyId' ,
2023-05-08 06:15:13 -07:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2020-04-17 14:42:41 -07:00
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'get' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
2023-05-08 06:15:13 -07:00
modes : [
{
displayName : 'From List' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select from the list' ,
typeOptions : {
searchListMethod : 'searchCompanies' ,
} ,
} ,
{
displayName : 'By Id' ,
name : 'id' ,
type : 'string' ,
placeholder : '58539222' ,
validation : [
{
type : 'regex' ,
properties : {
regex : '[0-9]+' ,
errorMessage : 'Not a valid HubSpot Company ID' ,
} ,
} ,
] ,
} ,
] ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
displayName : 'Options' ,
2020-04-17 14:42:41 -07:00
name : 'additionalFields' ,
type : 'collection' ,
2023-05-08 06:15:13 -07:00
placeholder : 'Add Option' ,
2020-04-17 14:42:41 -07:00
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'get' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
displayName : 'Include Merge Audits' ,
name : 'includeMergeAudits' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to return any merge history if the company has been previously merged with another company record. Defaults to false.' ,
2020-04-17 14:42:41 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:getAll */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'getAll' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'getAll' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
displayName : 'Include Merge Audits' ,
name : 'includeMergeAudits' ,
type : 'boolean' ,
default : false ,
2022-08-17 08:50:24 -07:00
description :
'Whether to return any merge history if a company has been previously merged with another company record. Defaults to false.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
displayName : 'Company Properties to Include' ,
name : 'propertiesCollection' ,
type : 'fixedCollection' ,
default : { } ,
options : [
{
name : 'propertiesValues' ,
displayName : 'Companies Properties to Include' ,
values : [
{
displayName : 'Companies Properties to Include' ,
name : 'properties' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getCompanyProperties' ,
} ,
default : [ ] ,
description :
'Whether to include specific Company properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
} ,
{
displayName : 'Include' ,
name : 'propertyMode' ,
type : 'options' ,
options : [
{
name : 'Value And History' ,
value : 'valueAndHistory' ,
} ,
{
name : 'Value Only' ,
value : 'valueOnly' ,
} ,
] ,
default : 'valueAndHistory' ,
description :
'Specify if the current value for a property should be fetched, or the value and all the historical values for that property' ,
} ,
] ,
} ,
] ,
2022-08-17 08:50:24 -07:00
description :
2023-05-08 06:15:13 -07:00
'Whether to include specific Company properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:delete */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
2023-05-08 06:15:13 -07:00
displayName : 'Company to Delete' ,
2020-04-17 14:42:41 -07:00
name : 'companyId' ,
2023-05-08 06:15:13 -07:00
type : 'resourceLocator' ,
default : { mode : 'list' , value : '' } ,
2020-04-17 14:42:41 -07:00
required : true ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'delete' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
2023-05-08 06:15:13 -07:00
modes : [
{
displayName : 'From List' ,
name : 'list' ,
type : 'list' ,
placeholder : 'Select from the list' ,
typeOptions : {
searchListMethod : 'searchCompanies' ,
} ,
} ,
{
displayName : 'By Id' ,
name : 'id' ,
type : 'string' ,
placeholder : '58539222' ,
validation : [
{
type : 'regex' ,
properties : {
regex : '[0-9]+' ,
errorMessage : 'Not a valid HubSpot Company ID' ,
} ,
} ,
] ,
} ,
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
2023-05-08 06:15:13 -07:00
/* getRecentlyCreatedUpdate */
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
2023-05-08 06:15:13 -07:00
operation : [ 'getRecentlyCreatedUpdated' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
2023-05-08 06:15:13 -07:00
operation : [ 'getRecentlyCreatedUpdated' ] ,
2022-08-17 08:50:24 -07:00
returnAll : [ false ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
displayName : 'Options' ,
name : 'additionalFields' ,
2020-04-17 14:42:41 -07:00
type : 'collection' ,
2023-05-08 06:15:13 -07:00
placeholder : 'Add Option' ,
2020-04-17 14:42:41 -07:00
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
2023-05-08 06:15:13 -07:00
operation : [ 'getRecentlyCreatedUpdated' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
displayName : 'Since' ,
name : 'since' ,
type : 'dateTime' ,
default : '' ,
2023-05-08 06:15:13 -07:00
description :
'Only return companys created after timestamp x. When using expressions, the time should be specified in YYYY-MM-DD hh-mm-ss format.' ,
2020-04-17 14:42:41 -07:00
} ,
{
2023-05-08 06:15:13 -07:00
displayName : 'Company Properties to Include' ,
name : 'propertiesCollection' ,
type : 'fixedCollection' ,
default : { } ,
options : [
{
name : 'propertiesValues' ,
displayName : 'Companies Properties to Include' ,
values : [
{
displayName : 'Companies Properties to Include' ,
name : 'properties' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getCompanyProperties' ,
} ,
default : [ ] ,
description :
'Whether to include specific Company properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
} ,
{
displayName : 'Include' ,
name : 'propertyMode' ,
type : 'options' ,
options : [
{
name : 'Value And History' ,
value : 'valueAndHistory' ,
} ,
{
name : 'Value Only' ,
value : 'valueOnly' ,
} ,
] ,
default : 'valueAndHistory' ,
description :
'Specify if the current value for a property should be fetched, or the value and all the historical values for that property' ,
} ,
] ,
} ,
] ,
2022-08-17 08:50:24 -07:00
description :
2023-05-08 06:15:13 -07:00
'Whether to include specific Company properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-01-31 23:31:40 -08:00
/* -------------------------------------------------------------------------- */
/* company:searchByDomain */
/* -------------------------------------------------------------------------- */
2020-04-17 14:42:41 -07:00
{
displayName : 'Domain' ,
name : 'domain' ,
type : 'string' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'searchByDomain' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
required : true ,
default : '' ,
2023-05-08 06:15:13 -07:00
description : "The company's website domain to search for, like n8n.io" ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'searchByDomain' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'searchByDomain' ] ,
returnAll : [ false ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 250 ,
} ,
default : 100 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2020-04-17 14:42:41 -07:00
} ,
{
displayName : 'Options' ,
name : 'options' ,
type : 'collection' ,
2023-05-08 06:15:13 -07:00
placeholder : 'Add Option' ,
2020-04-17 14:42:41 -07:00
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'company' ] ,
operation : [ 'searchByDomain' ] ,
2020-04-17 14:42:41 -07:00
} ,
} ,
options : [
{
2023-05-08 06:15:13 -07:00
displayName : 'Company Properties to Include' ,
2020-04-17 14:42:41 -07:00
name : 'properties' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getCompanyProperties' ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2022-08-17 08:50:24 -07:00
description :
2023-05-08 06:15:13 -07:00
'Whether to include specific Company properties in the returned results. Choose from a list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2020-04-17 14:42:41 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-04-17 14:42:41 -07:00
} ,
2021-12-03 00:44:16 -08:00
] ;