first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,209 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const campaignOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Create',
|
||||
value: 'create',
|
||||
description: 'Create a campaign',
|
||||
action: 'Create a campaign',
|
||||
},
|
||||
],
|
||||
default: 'create',
|
||||
},
|
||||
];
|
||||
|
||||
export const campaignFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* campaign:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'From Name',
|
||||
name: 'fromName',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'From name' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'From Email',
|
||||
name: 'fromEmail',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'From email' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'Reply To',
|
||||
name: 'replyTo',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'Reply to' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'Title',
|
||||
name: 'title',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'Title' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'Subject',
|
||||
name: 'subject',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'Subject' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'HTML Text',
|
||||
name: 'htmlText',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: "The 'HTML version' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'Send Campaign',
|
||||
name: 'sendCampaign',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description:
|
||||
'Whether to send the campaign as well and not just create a draft. Default is false.',
|
||||
},
|
||||
{
|
||||
displayName: 'Brand ID',
|
||||
name: 'brandId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['create'],
|
||||
resource: ['campaign'],
|
||||
sendCampaign: [false],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['campaign'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Exclude List IDs',
|
||||
name: 'excludeListIds',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Lists to exclude from your campaign. List IDs should be single or comma-separated.',
|
||||
},
|
||||
{
|
||||
displayName: 'Exclude Segment IDs',
|
||||
name: 'excludeSegmentIds',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'Segments to exclude from your campaign. Segment IDs should be single or comma-separated.',
|
||||
},
|
||||
{
|
||||
displayName: 'List IDs',
|
||||
name: 'listIds',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'List IDs should be single or comma-separated',
|
||||
},
|
||||
{
|
||||
displayName: 'Plain Text',
|
||||
name: 'plainText',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: "The 'Plain text version' of your campaign",
|
||||
},
|
||||
{
|
||||
displayName: 'Querystring',
|
||||
name: 'queryString',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Google Analytics tags',
|
||||
},
|
||||
{
|
||||
displayName: 'Segment IDs',
|
||||
name: 'segmentIds',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Segment IDs should be single or comma-separated',
|
||||
},
|
||||
{
|
||||
displayName: 'Track Clicks',
|
||||
name: 'trackClicks',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Whether to disable clicks tracking. Default is true.',
|
||||
},
|
||||
{
|
||||
displayName: 'Track Opens',
|
||||
name: 'trackOpens',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Whether to disable opens tracking. Default is true.',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -0,0 +1,41 @@
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
IHttpRequestMethods,
|
||||
ILoadOptionsFunctions,
|
||||
IRequestOptions,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
export async function sendyApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
path: string,
|
||||
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
_option = {},
|
||||
): Promise<any> {
|
||||
const credentials = await this.getCredentials('sendyApi');
|
||||
|
||||
body.api_key = credentials.apiKey;
|
||||
|
||||
body.boolean = true;
|
||||
|
||||
const options: IRequestOptions = {
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
method,
|
||||
form: body,
|
||||
qs,
|
||||
uri: `${credentials.url}${path}`,
|
||||
};
|
||||
|
||||
try {
|
||||
return await this.helpers.request.call(this, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"node": "n8n-nodes-base.sendy",
|
||||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Communication", "Marketing"],
|
||||
"resources": {
|
||||
"credentialDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/credentials/sendy/"
|
||||
}
|
||||
],
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.sendy/"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,313 @@
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeConnectionTypes, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { campaignFields, campaignOperations } from './CampaignDescription';
|
||||
import { sendyApiRequest } from './GenericFunctions';
|
||||
import { subscriberFields, subscriberOperations } from './SubscriberDescription';
|
||||
|
||||
export class Sendy implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Sendy',
|
||||
name: 'sendy',
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
|
||||
icon: 'file:sendy.png',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Consume Sendy API',
|
||||
defaults: {
|
||||
name: 'Sendy',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'sendyApi',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'Campaign',
|
||||
value: 'campaign',
|
||||
},
|
||||
{
|
||||
name: 'Subscriber',
|
||||
value: 'subscriber',
|
||||
},
|
||||
],
|
||||
default: 'subscriber',
|
||||
},
|
||||
...campaignOperations,
|
||||
...campaignFields,
|
||||
...subscriberOperations,
|
||||
...subscriberFields,
|
||||
],
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
const returnData: IDataObject[] = [];
|
||||
const length = items.length;
|
||||
let responseData;
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
for (let i = 0; i < length; i++) {
|
||||
if (resource === 'campaign') {
|
||||
if (operation === 'create') {
|
||||
const fromName = this.getNodeParameter('fromName', i) as string;
|
||||
|
||||
const fromEmail = this.getNodeParameter('fromEmail', i) as string;
|
||||
|
||||
const replyTo = this.getNodeParameter('replyTo', i) as string;
|
||||
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
|
||||
const subject = this.getNodeParameter('subject', i) as string;
|
||||
|
||||
const htmlText = this.getNodeParameter('htmlText', i) as boolean;
|
||||
|
||||
const sendCampaign = this.getNodeParameter('sendCampaign', i) as boolean;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
let brandId = null;
|
||||
if (!sendCampaign) {
|
||||
brandId = this.getNodeParameter('brandId', i) as string;
|
||||
}
|
||||
|
||||
const body: IDataObject = {
|
||||
from_name: fromName,
|
||||
from_email: fromEmail,
|
||||
reply_to: replyTo,
|
||||
title,
|
||||
subject,
|
||||
send_campaign: sendCampaign ? 1 : 0,
|
||||
html_text: htmlText,
|
||||
};
|
||||
|
||||
if (brandId) {
|
||||
body.brand_id = brandId;
|
||||
}
|
||||
|
||||
if (additionalFields.plainText) {
|
||||
body.plain_text = additionalFields.plainText;
|
||||
}
|
||||
|
||||
if (additionalFields.listIds) {
|
||||
body.list_ids = additionalFields.listIds as string;
|
||||
}
|
||||
|
||||
if (additionalFields.segmentIds) {
|
||||
body.segment_ids = additionalFields.segmentIds as string;
|
||||
}
|
||||
|
||||
if (additionalFields.excludeListIds) {
|
||||
body.exclude_list_ids = additionalFields.excludeListIds as string;
|
||||
}
|
||||
|
||||
if (additionalFields.excludeSegmentIds) {
|
||||
body.exclude_segments_ids = additionalFields.excludeSegmentIds as string;
|
||||
}
|
||||
|
||||
if (additionalFields.queryString) {
|
||||
body.query_string = additionalFields.queryString as string;
|
||||
}
|
||||
|
||||
if (additionalFields.trackOpens) {
|
||||
body.track_opens = (additionalFields.trackOpens as boolean) ? 1 : 0;
|
||||
}
|
||||
|
||||
if (additionalFields.trackClicks) {
|
||||
body.track_clicks = (additionalFields.trackClicks as boolean) ? 1 : 0;
|
||||
}
|
||||
|
||||
responseData = await sendyApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/api/campaigns/create.php',
|
||||
body,
|
||||
);
|
||||
|
||||
const success = ['Campaign created', 'Campaign created and now sending'];
|
||||
|
||||
if (success.includes(responseData as string)) {
|
||||
responseData = { message: responseData };
|
||||
} else {
|
||||
throw new NodeApiError(this.getNode(), responseData as JsonObject, { httpCode: '400' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (resource === 'subscriber') {
|
||||
if (operation === 'add') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
list: listId,
|
||||
};
|
||||
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
responseData = await sendyApiRequest.call(this, 'POST', '/subscribe', body);
|
||||
|
||||
if (responseData === '1') {
|
||||
responseData = { success: true };
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Sendy error response [${400}]: ${responseData}`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation === 'count') {
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const body: IDataObject = {
|
||||
list_id: listId,
|
||||
};
|
||||
|
||||
responseData = await sendyApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/api/subscribers/active-subscriber-count.php',
|
||||
body,
|
||||
);
|
||||
|
||||
const errors = [
|
||||
'No data passed',
|
||||
'API key not passed',
|
||||
'Invalid API key',
|
||||
'List ID not passed',
|
||||
'List does not exist',
|
||||
];
|
||||
|
||||
if (!errors.includes(responseData as string)) {
|
||||
responseData = { count: responseData };
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Sendy error response [${400}]: ${responseData}`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation === 'delete') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
list_id: listId,
|
||||
};
|
||||
|
||||
responseData = await sendyApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/api/subscribers/delete.php',
|
||||
body,
|
||||
);
|
||||
|
||||
if (responseData === '1') {
|
||||
responseData = { success: true };
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Sendy error response [${400}]: ${responseData}`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation === 'remove') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
list: listId,
|
||||
};
|
||||
|
||||
responseData = await sendyApiRequest.call(this, 'POST', '/unsubscribe', body);
|
||||
|
||||
if (responseData === '1') {
|
||||
responseData = { success: true };
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Sendy error response [${400}]: ${responseData}`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (operation === 'status') {
|
||||
const email = this.getNodeParameter('email', i) as string;
|
||||
|
||||
const listId = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
const body: IDataObject = {
|
||||
email,
|
||||
list_id: listId,
|
||||
};
|
||||
|
||||
responseData = await sendyApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/api/subscribers/subscription-status.php',
|
||||
body,
|
||||
);
|
||||
|
||||
const status = [
|
||||
'Subscribed',
|
||||
'Unsubscribed',
|
||||
'Unconfirmed',
|
||||
'Bounced',
|
||||
'Soft bounced',
|
||||
'Complained',
|
||||
];
|
||||
|
||||
if (status.includes(responseData as string)) {
|
||||
responseData = { status: responseData };
|
||||
} else {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Sendy error response [${400}]: ${responseData}`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Array.isArray(responseData)) {
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
} else if (responseData !== undefined) {
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
return [this.helpers.returnJsonArray(returnData)];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,260 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const subscriberOperations: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
name: 'Add',
|
||||
value: 'add',
|
||||
description: 'Add a subscriber to a list',
|
||||
action: 'Add a subscriber',
|
||||
},
|
||||
{
|
||||
name: 'Count',
|
||||
value: 'count',
|
||||
description: 'Count subscribers',
|
||||
action: 'Count a subscriber',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
description: 'Delete a subscriber from a list',
|
||||
action: 'Delete a subscriber',
|
||||
},
|
||||
{
|
||||
name: 'Remove',
|
||||
value: 'remove',
|
||||
description: 'Unsubscribe user from a list',
|
||||
action: 'Remove a subscriber',
|
||||
},
|
||||
{
|
||||
name: 'Status',
|
||||
value: 'status',
|
||||
description: 'Get the status of subscriber',
|
||||
action: "Get subscriber's status",
|
||||
},
|
||||
],
|
||||
default: 'add',
|
||||
},
|
||||
];
|
||||
|
||||
export const subscriberFields: INodeProperties[] = [
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* subscriber:add */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['add'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Email address of the subscriber',
|
||||
},
|
||||
{
|
||||
displayName: 'List ID',
|
||||
name: 'listId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['add'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
type: 'collection',
|
||||
placeholder: 'Add Field',
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['add'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Country',
|
||||
name: 'country',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: "User's 2 letter country code",
|
||||
},
|
||||
{
|
||||
displayName: 'GDPR',
|
||||
name: 'gdpr',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: "Whether you're signing up EU users in a GDPR compliant manner",
|
||||
},
|
||||
{
|
||||
displayName: 'Honeypot',
|
||||
name: 'hp',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
||||
description:
|
||||
"Include this 'honeypot' field to prevent spambots from signing up via this API call. When spambots fills in this field, this API call will exit, preventing them from signing up fake addresses to your form. This parameter is only supported in Sendy 3.0 onwards.",
|
||||
},
|
||||
{
|
||||
displayName: 'IP Address',
|
||||
name: 'ipaddress',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: "User's IP address",
|
||||
},
|
||||
{
|
||||
displayName: 'Name',
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: "User's name",
|
||||
},
|
||||
{
|
||||
displayName: 'Referrer',
|
||||
name: 'referrer',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The URL where the user signed up from',
|
||||
},
|
||||
{
|
||||
displayName: 'Silent',
|
||||
name: 'silent',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
||||
description:
|
||||
"Set to \"true\" if your list is 'Double opt-in' but you want to bypass that and signup the user to the list as 'Single Opt-in instead' (optional)",
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* subscriber:count */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'List ID',
|
||||
name: 'listId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['count'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* subscriber:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Email address of the subscriber',
|
||||
},
|
||||
{
|
||||
displayName: 'List ID',
|
||||
name: 'listId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* subscriber:remove */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['remove'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Email address of the subscriber',
|
||||
},
|
||||
{
|
||||
displayName: 'List ID',
|
||||
name: 'listId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['remove'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* subscriber:status */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Email',
|
||||
name: 'email',
|
||||
type: 'string',
|
||||
placeholder: 'name@email.com',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['status'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Email address of the subscriber',
|
||||
},
|
||||
{
|
||||
displayName: 'List ID',
|
||||
name: 'listId',
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['subscriber'],
|
||||
operation: ['status'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description:
|
||||
'The list ID you want to subscribe a user to. This encrypted & hashed ID can be found under View all lists section named ID.',
|
||||
},
|
||||
];
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user