
Mailchimp Audiences NewSubscriberTrigger
CertifiedTrigger on new Mailchimp subscribers
Mailchimp Audiences NewSubscriberTrigger
Trigger on new Mailchimp subscribers
Polls GET /lists/{listId}/members for subscribed members by opt-in time (timestamp_opt) and starts one execution per poll with every new subscriber, stored as an ION file (trigger.uri, trigger.count).
The position is kept in the namespace KV Store, per flow, trigger and audience: the newest timestamp_opt seen plus the ids seen at exactly that time, so members opting in during the same second are neither lost nor fired twice. The first poll only records the current position: existing subscribers do not fire. Each poll reads at most 1000 rows (more only when they all share one timestamp), so a backlog larger than 1000 drains over several polls.
Members are tracked by opt-in time (timestamp_opt): a member imported or added with a timestamp_opt older than the stored position (for example a backfill import keeping the original opt-in dates) does not fire.
type: io.kestra.plugin.mailchimp.audiences.NewSubscriberTriggerExamples
Log every new subscriber of an audience.
id: mailchimp_new_subscriber
namespace: company.team
triggers:
- id: new_subscriber
type: io.kestra.plugin.mailchimp.audiences.NewSubscriberTrigger
apiKey: "{{ secret('MAILCHIMP_API_KEY') }}"
listId: "a1b2c3d4e5"
interval: PT5M
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "{{ trigger.count }} new subscriber(s) in {{ trigger.listId }}: {{ trigger.uri }}"
Properties
listId *string
Audience ID
Mailchimp audience (list) id, found in the audience settings or with ListAudiences.
accessToken string
OAuth access token
Set exactly one of apiKey or accessToken. server is required with an access token.
allowConcurrent boolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
apiKey string
Mailchimp API key
Set exactly one of apiKey or accessToken. The data center is taken from the key suffix (for example -us19) unless server is set.
baseUrl string
Base URL override
Replaces https://<server>.api.mailchimp.com/3.0. The credential is sent to this URL, so it must be an https *.api.mailchimp.com host.
fetchType string
STORESTOREFETCHFETCH_ONENONEFetch strategy
STORE: write the new rows as ION to internal storage and return the uri.
FETCH: return the new rows in rows (at most one page of 1000, or more when they share one timestamp).
Default STORE.
interval string
PT5MdurationPolling interval
Time between two polls. Defaults to 5 minutes, minimum 30 seconds to stay well within Mailchimp's rate limits.
maxRetries integerstring
3Max retries
Retries done by this plugin on HTTP 429 (all methods) and on 5xx or I/O errors (GET and PUT only), with exponential backoff. Default 3, between 0 and 10. Kestra's HTTP client also replays a GET or PUT once after a 429 or 503 on its own, so 0 only turns off the plugin's retries.
server string
Data center
Mailchimp data center such as us19. Required with accessToken, optional with apiKey (overrides the key suffix).
stopAfter array
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
timeout string
PT2MRequest timeout
Idle read timeout of each call: how long to wait without receiving data. Default PT2M, must be positive. Mailchimp itself cuts requests off after 120 seconds.
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
count integer
Number of new members
Number of new members, as rows in the uri file or in rows.
listId string
Audience ID
Mailchimp audience (list) id the members belong to.
rows array
New members
The new members, same fields as ListMembers, oldest first. Set when fetchType is FETCH.
uri string
uriNew members URI
ION file in internal storage, one row per member, same fields as ListMembers, oldest first. Set when fetchType is STORE.