Merge mailchimp campaigns with sendgrid stats
Email performance unified report
Campaign metadata from Mailchimp plus delivery stats from SendGrid. For "merge mailchimp campaigns with sendgrid stats", store MAILCHIMP_BASIC_AUTH, SENDGRID_API_KEY in Secret Vault, call https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10 from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-mailchimp-with-sendgrid-stats with an rc_live_ client token.
Serial Mailchimp and SendGrid calls slow Frontend / Web pages
Each extra Mailchimp and SendGrid hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.
- One slow upstream blocking an entire page
- Partial failures leaving UI in inconsistent states
- Duplicate auth refresh logic per service
How RealComposer Solves This at the Edge
Add vault secrets for this pipeline
Create MAILCHIMP_BASIC_AUTH, SENDGRID_API_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Set headers, mapping, and cache TTL
Configure headersTemplate to inject vault secrets, target https://{{secrets.MAILCHIMP_DC}}.api.mailchimp.com/3.0/lists/{{query.listId}}/members?count=10, and Add output mapping fields that mirror the JSON contract your screen already expects.
Call from Frontend / Web
Call https://realcomposer.com/v1/workspace/merge-mailchimp-with-sendgrid-stats with a restricted rc_live_ client token. Frontend / Web never sends upstream secrets.
const res = await fetch('https://realcomposer.com/v1/workspace/merge-mailchimp-with-sendgrid-stats', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_merge-ma",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "merge-mailchimp-with-sendgrid-stats"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"mailchimp_memberId": "sample",
"mailchimp_email": "sample",
"sendgrid_delivered": "sample",
"sendgrid_opens": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 2
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 4
- Payload
- 254 B to 114 B (-55%)
curl -X GET "https://realcomposer.com/v1/workspace/merge-mailchimp-with-sendgrid-stats" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Does Frontend / Web need CORS changes after adding RealComposer?
Store MAILCHIMP_BASIC_AUTH, SENDGRID_API_KEY for merge-mailchimp-with-sendgrid-stats. Frontend / Web never sees decrypted values.
When does edge caching apply to this recipe?
merge-mailchimp-with-sendgrid-stats keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache.
Can I restrict which domains call this pipeline?
Rotate vault secrets for merge-mailchimp-with-sendgrid-stats anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this Frontend / Web + Mailchimp, SendGrid Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.