Combine intercom users with clerk user metadata
Support sidebar with auth context
Clerk user profile and Intercom contact record stitched for in-app chat. For "combine intercom users with clerk user metadata", store INTERCOM_ACCESS_TOKEN, CLERK_SECRET_KEY in Secret Vault, call https://api.intercom.io/contacts from a Worker, and let React / Flutter / Mobile hit only https://realcomposer.com/v1/workspace/combine-intercom-with-clerk-users with an rc_live_ client token.
Serial Intercom and Clerk calls slow React / Flutter / Mobile pages
Each extra Intercom and Clerk 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
Store upstream credentials in Secret Vault
Create INTERCOM_ACCESS_TOKEN, CLERK_SECRET_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders.
Configure upstream steps and output mapping
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 / Flutter / Mobile
Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.
const res = await fetch('https://realcomposer.com/v1/workspace/combine-intercom-with-clerk-users', {
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_combine-",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "combine-intercom-with-clerk-users"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"intercom_contactId": "sample",
"intercom_email": "sample",
"clerk_userId": "sample",
"clerk_email": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 2
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 4
- Payload
- 252 B to 104 B (-59%)
curl -X GET "https://realcomposer.com/v1/workspace/combine-intercom-with-clerk-users" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Does React / Flutter / Mobile need CORS changes after adding RealComposer?
Log request IDs for combine-intercom-with-clerk-users, not raw Intercom payloads, because upstream bodies may include PII.
What cache key does RealComposer use?
combine-intercom-with-clerk-users keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache.
How do I rotate upstream credentials?
Upstream steps in combine-intercom-with-clerk-users honor timeoutMs and optional fallback JSON without leaking secrets.
Sources & Definitions Used in This Answer
Deploy this React / Flutter / Mobile + Intercom, Clerk Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.