n8n-nodes-base
Version:
Base nodes of n8n
126 lines (122 loc) • 4.5 kB
text/typescript
/**
* HubSpot Node - Version 1
* Discriminator: resource=form, operation=submit
*/
interface Credentials {
hubspotApi: CredentialReference;
hubspotAppToken: CredentialReference;
hubspotOAuth2Api: CredentialReference;
}
/** Submit data to a form */
export type HubspotV1FormSubmitParams = {
resource: 'form';
operation: 'submit';
authentication?: 'apiKey' | 'appToken' | 'oAuth2' | Expression<string>;
/**
* The ID of the form you're sending data to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
formId?: string | Expression<string>;
/**
* Additional Fields
* @default {}
*/
additionalFields?: {
/** Whether or not to skip validation based on the form settings
* @default false
*/
skipValidation?: boolean | Expression<boolean>;
/** Time of the form submission
*/
submittedAt?: string | Expression<string>;
};
/**
* Context
* @default {}
*/
contextUi?: {
/** Context
*/
contextValue?: {
/** Include this parameter and set it to the hubspotutk cookie value to enable cookie tracking on your submission
*/
hutk?: string | Expression<string> | PlaceholderValue;
/** The IP address of the visitor filling out the form
*/
ipAddress?: string | Expression<string> | PlaceholderValue;
/** The URI of the page the submission happened on
*/
pageUri?: string | Expression<string> | PlaceholderValue;
/** The name or title of the page the submission happened on
*/
pageName?: string | Expression<string> | PlaceholderValue;
/** The ID of a page created on the HubSpot CMS
*/
pageId?: string | Expression<string> | PlaceholderValue;
/** If the form is for an account using the HubSpot Salesforce Integration, you can include the ID of a Salesforce campaign to add the contact to the specified campaign
*/
sfdcCampaignId?: string | Expression<string> | PlaceholderValue;
/** If the form is for an account using the HubSpot GoToWebinar Integration, you can include the ID of a webinar to enroll the contact in that webinar when they submit the form
*/
goToWebinarWebinarKey?: string | Expression<string> | PlaceholderValue;
};
};
/**
* Legal Consent
* @default {}
*/
lengalConsentUi?: {
/** Consent
*/
lengalConsentValues?: {
/** Whether or not the visitor checked the Consent to process checkbox
* @default false
*/
consentToProcess?: boolean | Expression<boolean>;
/** The text displayed to the visitor for the Consent to process checkbox
*/
text?: string | Expression<string> | PlaceholderValue;
/** Communications
* @default {}
*/
communicationsUi?: {
/** Communication
*/
communicationValues?: Array<{
/** The ID of the specific subscription type. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
subscriptionTypeId?: string | Expression<string>;
/** Whether or not the visitor checked the checkbox for this subscription type
* @default false
*/
value?: boolean | Expression<boolean>;
/** The text displayed to the visitor for this specific subscription checkbox
*/
text?: string | Expression<string> | PlaceholderValue;
}>;
};
};
/** Legitimate Interest
*/
legitimateInterestValues?: {
/** The ID of the specific subscription type that this forms indicates interest to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
subscriptionTypeId?: string | Expression<string>;
/** This must be true when using the 'legitimateInterest' option, as it reflects the consent indicated by the visitor when submitting the form
* @default false
*/
value?: boolean | Expression<boolean>;
/** The privacy text displayed to the visitor
*/
legalBasis?: 'CUSTOMER' | 'LEAD' | Expression<string>;
/** The privacy text displayed to the visitor
*/
text?: string | Expression<string> | PlaceholderValue;
};
};
};
export type HubspotV1FormSubmitNode = {
type: 'n8n-nodes-base.hubspot';
version: 1;
credentials?: Credentials;
config: NodeConfig<HubspotV1FormSubmitParams>;
};