From 3ccfe207d17069cdeefe710c000596dccf12e67f Mon Sep 17 00:00:00 2001 From: David R Date: Wed, 8 Jan 2025 13:52:42 +0100 Subject: [PATCH] Fix Mailchimp Node: added missing status_if_new parameter --- .../nodes/Mailchimp/Mailchimp.node.ts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts index 890ca72360..92ca50fe38 100644 --- a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts @@ -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',