Mailchimp campaign stats trim for analytics card
Ops dashboards with KPI fields only
Opens clicks and send time without full report trees. For "mailchimp campaign stats trim for analytics card", store MAILCHIMP_BASIC_AUTH in Secret Vault, call https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 from a Worker, and let Retool hit only https://realcomposer.com/v1/workspace/trim-mailchimp-campaign-stats-json with an rc_live_ client token.
Mailchimp JSON bloat on Retool
Oversized Mailchimp payloads inflate parse time and mobile data charges for Retool users.
- Main-thread JSON parse stalls on low-end phones
- Accidentally exposing PII fields to the client
- Downstream components re-render on unused keys
How RealComposer Solves This at the Edge
Store upstream credentials in Secret Vault
Create MAILCHIMP_BASIC_AUTH vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Target the real upstream URL
Configure headersTemplate to inject vault secrets, target https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10, and Map only the UI fields in output mapping so clients never download audit or nested blobs.
Query from Retool
Allowed origins on the token should list every Retool host that calls this URL.
// REST resource or JS query
const rows = await fetch('https://realcomposer.com/v1/workspace/trim-mailchimp-campaign-stats-json', {
headers: { Authorization: 'Bearer rc_live_token' }
}).then(r => r.json());
{
"requestId": "req_trim-mai",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "trim-mailchimp-campaign-stats-json"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"memberId": "sample",
"email": "sample",
"status": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 3
- Payload
- 253 B to 56 B (-78%)
curl -X GET "https://realcomposer.com/v1/workspace/trim-mailchimp-campaign-stats-json" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Is it safe to log Mailchimp responses in Retool?
Yes for trim-mailchimp-campaign-stats-json. Ship only an rc_live_ client token in Retool; RealComposer injects MAILCHIMP_BASIC_AUTH on https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10.
Will Anthropic or Linear prompt bodies be rewritten?
trim-mailchimp-campaign-stats-json POST steps bypass caches.default even if cacheTtlSeconds is set in the dashboard.
Can I restrict which domains call this pipeline?
Upstream steps in trim-mailchimp-campaign-stats-json honor timeoutMs and optional fallback JSON without leaking secrets.
Sources & Definitions Used in This Answer
Deploy this Retool + Mailchimp Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.