Intercom conversation api payload reduce size
Inbox previews without full message graphs
Map conversation id state and latest snippet for list UIs. For "intercom conversation api payload reduce size", store INTERCOM_ACCESS_TOKEN in Secret Vault, call https://api.intercom.io/contacts from a Worker, and let React hit only https://realcomposer.com/v1/workspace/reduce-intercom-conversation-payload with an rc_live_ client token.
Intercom JSON bloat on React
Oversized Intercom payloads inflate parse time and mobile data charges for React 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
Add vault secrets for this pipeline
Create INTERCOM_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://api.intercom.io/contacts. Allowed origins on the client token should match leave cache ttl at 0 when each response is user-specific (include userid or record id in query params before enabling cache).
Call from React
Allowed origins on the token should list every React host that calls this URL.
const res = await fetch('https://realcomposer.com/v1/workspace/reduce-intercom-conversation-payload', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
const data = await res.json();
{
"requestId": "req_reduce-i",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "reduce-intercom-conversation-payload"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"contactId": "sample",
"email": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 1
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 2
- Payload
- 255 B to 39 B (-85%)
curl -X GET "https://realcomposer.com/v1/workspace/reduce-intercom-conversation-payload" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
What should React store instead of Intercom secrets?
Yes for reduce-intercom-conversation-payload. Ship only an rc_live_ client token in React; RealComposer injects INTERCOM_ACCESS_TOKEN on https://api.intercom.io/contacts.
Will Anthropic or Linear prompt bodies be rewritten?
Cache key for reduce-intercom-conversation-payload: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.
What happens if an upstream step times out?
Rotate vault secrets for reduce-intercom-conversation-payload anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this React + Intercom Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.