
Mailchimp Campaigns CampaignSentTrigger
CertifiedTrigger on sent Mailchimp campaigns
Mailchimp Campaigns CampaignSentTrigger
Trigger on sent Mailchimp campaigns
Polls GET /campaigns?status=sent by send time (send_time) and starts one execution per poll with every campaign sent since the last poll, stored as an ION file (trigger.uri, trigger.count). campaignId, sendTime and title describe the latest one; set includeReport to also get its report summary.
The position is kept in the namespace KV Store, per flow, trigger and listId filter: the newest send_time seen plus the campaign ids sent at exactly that time. The first poll only records the current position: campaigns already sent 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.
type: io.kestra.plugin.mailchimp.campaigns.CampaignSentTriggerExamples
Post the report of every sent campaign.
id: mailchimp_campaign_sent
namespace: company.team
triggers:
- id: campaign_sent
type: io.kestra.plugin.mailchimp.campaigns.CampaignSentTrigger
apiKey: "{{ secret('MAILCHIMP_API_KEY') }}"
listId: "a1b2c3d4e5"
includeReport: true
interval: PT15M
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Campaign '{{ trigger.title }}' sent at {{ trigger.sendTime }}, {{ trigger.report.emailsSent ?? 'n/a' }} emails"
Properties
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.
includeReport booleanstring
falseInclude report
Also fetch GET /reports/{id} for the latest sent campaign into report. Default false.
interval string
PT5MdurationPolling interval
Time between two polls. Defaults to 5 minutes, minimum 30 seconds to stay well within Mailchimp's rate limits.
listId string
Audience ID
Only campaigns sent to this audience (list_id). All audiences when not set.
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
campaignId string
Latest campaign ID
Id of the most recently sent campaign in this poll.
count integer
Number of newly sent campaigns
Number of newly sent campaigns, as rows in the uri file or in rows.
report object
Latest campaign report
Report summary of the latest campaign, as GetCampaignReport returns it. Only set when includeReport is true; empty when Mailchimp has no report for it (404).
rows array
Sent campaigns
The newly sent campaigns, same fields as ListCampaigns, oldest first. Set when fetchType is FETCH.
sendTime string
date-timeLatest campaign send time
Send time of the latest campaign.
title string
Latest campaign title
Subject-line title of the most recently sent campaign in this poll.
uri string
uriSent campaigns URI
ION file in internal storage, one row per campaign, same fields as ListCampaigns, oldest first.