List segments
Lists an audience's segments, and the tags stored as static segments.
Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Mailchimp connection the step signs in with. |
| Audience id | Picked from the list Mailchimp offers. |
| Only this kind | "" or "saved" or "static" or "fuzzy" |
| Leave out this kind | A tag is a static segment in Mailchimp's data model, so leaving static out here is how you list saved segments only. |
| Count cleaned contacts | true/false |
| Count transactional contacts | true/false |
| Count unsubscribed contacts | true/false |
| Created since | text |
| Created before | text |
| Changed since | text |
| Changed before | text |
| Fields to fetch | Mailchimp returns everything unless you name the fields you want. |
| Segments per call | 1 to 1,000. |
| Skip this many | number |
| Fetch every page | Walks Mailchimp's pages, and refuses past 5,000 rows rather than answering a short list. |
| Cursor | Paste a previous run's Next cursor to read the page after it. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `mailchimp`) |
audienceId | texta value from the vendor's own list |
type | "" or "saved" or "static" or "fuzzy" |
excludeType | "" or "saved" or "static" or "fuzzy" |
includeCleaned | true/false, by default false |
includeTransactional | true/false, by default false |
includeUnsubscribed | true/false, by default false |
sinceCreatedAt | text |
beforeCreatedAt | text |
sinceUpdatedAt | text |
beforeUpdatedAt | text |
fields | text |
limit | number, by default 100 |
offset | number, by default 0 |
returnAll | true/false, by default false |
cursor | text |
Output
| Field | Type |
|---|---|
segments | array |
segmentCountSegments in this answer | number |
hasMoreMore segments are waiting behind this page | boolean |
totalItemsSegments in total | number |
nextCursorCursor for the next page | string |
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
| Setting | What it is |
|---|---|
| ConnectionRequired | The Mailchimp connection the step signs in with. |
| Audience id | Picked from the list Mailchimp offers. |
| Only this kind | "" or "saved" or "static" or "fuzzy" |
| Leave out this kind | A tag is a static segment in Mailchimp's data model, so leaving static out here is how you list saved segments only. |
| Count cleaned contacts | true/false |
| Count transactional contacts | true/false |
| Count unsubscribed contacts | true/false |
| Created since | text |
| Created before | text |
| Changed since | text |
| Changed before | text |
| Fields to fetch | Mailchimp returns everything unless you name the fields you want. |
| Segments per call | 1 to 1,000. |
| Skip this many | number |
| Fetch every page | Walks Mailchimp's pages, and refuses past 5,000 rows rather than answering a short list. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `mailchimp`) |
audienceId | texta value from the vendor's own list |
type | "" or "saved" or "static" or "fuzzy" |
excludeType | "" or "saved" or "static" or "fuzzy" |
includeCleaned | true/false, by default false |
includeTransactional | true/false, by default false |
includeUnsubscribed | true/false, by default false |
sinceCreatedAt | text |
beforeCreatedAt | text |
sinceUpdatedAt | text |
beforeUpdatedAt | text |
fields | text |
limit | number, by default 100 |
offset | number, by default 0 |
returnAll | true/false, by default false |