FlowmageDocs

List segments

BetaReads dataVersion 2

Lists an audience's segments, and the tags stored as static segments.

Settings

SettingWhat it is
ConnectionRequiredThe Mailchimp connection the step signs in with.
Audience idPicked from the list Mailchimp offers.
Only this kind"" or "saved" or "static" or "fuzzy"
Leave out this kindA tag is a static segment in Mailchimp's data model, so leaving static out here is how you list saved segments only.
Count cleaned contactstrue/false
Count transactional contactstrue/false
Count unsubscribed contactstrue/false
Created sincetext
Created beforetext
Changed sincetext
Changed beforetext
Fields to fetchMailchimp returns everything unless you name the fields you want.
Segments per call1 to 1,000.
Skip this manynumber
Fetch every pageWalks Mailchimp's pages, and refuses past 5,000 rows rather than answering a short list.
CursorPaste a previous run's Next cursor to read the page after it.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `mailchimp`)
audienceIdtexta value from the vendor's own list
type"" or "saved" or "static" or "fuzzy"
excludeType"" or "saved" or "static" or "fuzzy"
includeCleanedtrue/false, by default false
includeTransactionaltrue/false, by default false
includeUnsubscribedtrue/false, by default false
sinceCreatedAttext
beforeCreatedAttext
sinceUpdatedAttext
beforeUpdatedAttext
fieldstext
limitnumber, by default 100
offsetnumber, by default 0
returnAlltrue/false, by default false
cursortext

Output

FieldType
segmentsarray
segmentCountSegments in this answernumber
hasMoreMore segments are waiting behind this pageboolean
totalItemsSegments in totalnumber
nextCursorCursor for the next pagestring
Sample output, and the expression for each field
  • hasMorefalse
  • segmentCount0
  • segments[]
  • totalItems0

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "audienceId": "",
    "beforeCreatedAt": "",
    "beforeUpdatedAt": "",
    "connection": "<connection id>",
    "cursor": "",
    "excludeType": "",
    "fields": "",
    "includeCleaned": false,
    "includeTransactional": false,
    "includeUnsubscribed": false,
    "limit": 100,
    "offset": 0,
    "returnAll": false,
    "sinceCreatedAt": "",
    "sinceUpdatedAt": "",
    "type": ""
  },
  "label": "List segments",
  "type": "mailchimp.listSegments",
  "version": 2
}

Older versions

A flow that already has this version keeps running it. A new step always gets the newest.

Version 1
SettingWhat it is
ConnectionRequiredThe Mailchimp connection the step signs in with.
Audience idPicked from the list Mailchimp offers.
Only this kind"" or "saved" or "static" or "fuzzy"
Leave out this kindA tag is a static segment in Mailchimp's data model, so leaving static out here is how you list saved segments only.
Count cleaned contactstrue/false
Count transactional contactstrue/false
Count unsubscribed contactstrue/false
Created sincetext
Created beforetext
Changed sincetext
Changed beforetext
Fields to fetchMailchimp returns everything unless you name the fields you want.
Segments per call1 to 1,000.
Skip this manynumber
Fetch every pageWalks Mailchimp's pages, and refuses past 5,000 rows rather than answering a short list.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `mailchimp`)
audienceIdtexta value from the vendor's own list
type"" or "saved" or "static" or "fuzzy"
excludeType"" or "saved" or "static" or "fuzzy"
includeCleanedtrue/false, by default false
includeTransactionaltrue/false, by default false
includeUnsubscribedtrue/false, by default false
sinceCreatedAttext
beforeCreatedAttext
sinceUpdatedAttext
beforeUpdatedAttext
fieldstext
limitnumber, by default 100
offsetnumber, by default 0
returnAlltrue/false, by default false