RealComposer

Combine intercom users with clerk user metadata

Support sidebar with auth context

Direct Answer & Architecture Summary

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.

Security LevelAES-256-GCM Vault
Edge LatencySub-10ms Response
InfrastructureZero Server Maintenance
The Problem Solved

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.

Critical Security & Operational Risks:
  • One slow upstream blocking an entire page
  • Partial failures leaving UI in inconsistent states
  • Duplicate auth refresh logic per service
Architecture & Step-by-Step Implementation

How RealComposer Solves This at the Edge

1

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.

2

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).

3

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' }
});
                  
Payload Slimming Comparison
59% Bandwidth Reduction
Raw Upstream Response252 B
              {
  "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"
    }
  }
}
            
RealComposer Slimmed Edge Payload104 B
              {
  "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%)
Call from Terminal or Client
curl -X GET "https://realcomposer.com/v1/workspace/combine-intercom-with-clerk-users" \
  -H "Authorization: Bearer rc_live_client_token"
Frequently Asked Questions

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

Instant Deployment

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.

CLONE THIS RECIPE
Related Architecture Recipes