RealComposer
ReactIntercomPostHogMulti-API Aggregation

Combine intercom with posthog user events

Support tool with product analytics context

Direct Answer & Architecture Summary

Intercom conversation list plus PostHog person properties in one payload. For "combine intercom with posthog user events", store INTERCOM_ACCESS_TOKEN, POSTHOG_PERSONAL_API_KEY in Secret Vault, call https://api.intercom.io/contacts from a Worker, and let React hit only https://realcomposer.com/v1/workspace/combine-intercom-with-posthog-events with an rc_live_ client token.

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

Serial Intercom and PostHog calls slow React pages

Each extra Intercom and PostHog 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

Add vault secrets for this pipeline

Add INTERCOM_ACCESS_TOKEN, POSTHOG_PERSONAL_API_KEY to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.

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

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-posthog-events', {
  headers: { Authorization: 'Bearer rc_live_your_token' }
});
const data = await res.json();
                  
Payload Slimming Comparison
57% Bandwidth Reduction
Raw Upstream Response255 B
              {
  "requestId": "req_combine-",
  "upstreamLatencyMs": 142,
  "audit": {
    "region": "edge",
    "trace": "combine-intercom-with-posthog-events"
  },
  "payload": {
    "id": "sample_id",
    "status": "active",
    "nested": {
      "tags": [
        "demo"
      ],
      "internal": true
    },
    "unused_blob": {
      "foo": "bar",
      "bar": "baz"
    }
  }
}
            
RealComposer Slimmed Edge Payload110 B
              {
  "intercom_contactId": "sample",
  "intercom_email": "sample",
  "posthog_flagKey": "sample",
  "posthog_active": "sample"
}
            

Recipe Specs

HTTP method
GET
Upstream calls
2
Edge cache TTL
No caching
Client auth
Restricted client token
Mapped output fields
4
Payload
255 B to 110 B (-57%)
Call from Terminal or Client
curl -X GET "https://realcomposer.com/v1/workspace/combine-intercom-with-posthog-events" \
  -H "Authorization: Bearer rc_live_client_token"
Frequently Asked Questions

Developer Questions & Troubleshooting

What should React store instead of Intercom secrets?

Use scoped tokens where the vendor allows them on combine-intercom-with-posthog-events. Admin keys stay {{secrets.*}} references only.

How do I forward JSON bodies to POST upstreams?

Cache key for combine-intercom-with-posthog-events: internal edge-cache path plus sorted query. Identical params hit; vary userId per user.

Can I restrict which domains call this pipeline?

Rotate vault secrets for combine-intercom-with-posthog-events anytime; clients keep the same rc_live_ token.

Sources & Definitions Used in This Answer

Instant Deployment

Deploy this React + Intercom, PostHog 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