Fix Mailchimp Node: added missing status_if_new parameter

This commit is contained in:
David R 2025-01-08 13:52:42 +01:00
parent be2dcffc94
commit 3ccfe207d1

View file

@ -35,6 +35,7 @@ interface ICreateMemberBody {
email_address: string;
email_type?: string;
status?: Status;
status_if_new?: Status;
language?: string;
vip?: boolean;
location?: ILocation;
@ -1127,6 +1128,35 @@ export class Mailchimp implements INodeType {
default: '',
description: "Subscriber's current status",
},
{
displayName: 'Status If New',
name: 'status_if_new',
type: 'options',
options: [
{
name: 'Cleaned',
value: 'cleaned',
},
{
name: 'Pending',
value: 'pending',
},
{
name: 'Subscribed',
value: 'subscribed',
},
{
name: 'Transactional',
value: 'transactional',
},
{
name: 'Unsubscribed',
value: 'unsubscribed',
},
],
default: '',
description: "This status is required only if the email address is not already present on the list",
},
{
displayName: 'Vip',
name: 'vip',
@ -1929,6 +1959,9 @@ export class Mailchimp implements INodeType {
if (updateFields.ipOptIn) {
body.ip_opt = updateFields.ipOptIn as string;
}
if (updateFields.status_if_new) {
body.status_if_new = updateFields.status_if_new as Status;
}
if (updateFields.timestampOpt) {
body.timestamp_opt = moment(updateFields.timestampOpt as string).format(
'YYYY-MM-DD HH:MM:SS',