Mailchimp and hubspot combined cache layer
Internal dashboards with one cached audience view
Compose and cache merged marketing audience JSON. For "mailchimp and hubspot combined cache layer", store MAILCHIMP_BASIC_AUTH, HUBSPOT_ACCESS_TOKEN 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/mailchimp-hubspot-shared-edge-cache with an rc_live_ client token. Enable 300s GET cache only when query params identify the resource.
Mailchimp and HubSpot rate limits from Retool traffic
Without edge caching, identical Mailchimp and HubSpot reads during a session still round-trip to the origin.
- HTTP 429 responses during launch traffic
- Surprise SaaS overages from duplicate reads
- Slower repeat views than necessary
How RealComposer Solves This at the Edge
Add vault secrets for this pipeline
Create MAILCHIMP_BASIC_AUTH, HUBSPOT_ACCESS_TOKEN vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Target the real upstream URL
Use GET against https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10. Allowed origins on the client token should match set cache ttl to 300s so repeat gets with the same query string hit caches.default.
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/mailchimp-hubspot-shared-edge-cache', {
headers: { Authorization: 'Bearer rc_live_token' }
}).then(r => r.json());
{
"requestId": "req_mailchim",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "mailchimp-hubspot-shared-edge-cache"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"mailchimp_memberId": "sample",
"mailchimp_email": "sample",
"hubspot_contactId": "sample",
"hubspot_email": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 2
- Edge cache TTL
- 300s
- Client auth
- Restricted client token
- Mapped output fields
- 4
- Payload
- 254 B to 112 B (-56%)
curl -X GET "https://realcomposer.com/v1/workspace/mailchimp-hubspot-shared-edge-cache" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Is it safe to log Mailchimp responses in Retool?
Store MAILCHIMP_BASIC_AUTH, HUBSPOT_ACCESS_TOKEN for mailchimp-hubspot-shared-edge-cache. Retool never sees decrypted values.
When does edge caching apply to this recipe?
mailchimp-hubspot-shared-edge-cache vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body.
Can I restrict which domains call this pipeline?
Rotate vault secrets for mailchimp-hubspot-shared-edge-cache anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this Retool + Mailchimp, HubSpot Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.