Need help with setup? Join Autoplay on Slack and post in #just-integrated.
Final result

Prerequisites
Complete the Quickstart. You should have:- PostHog in the browser — snippet, API key,
product_idonidentify(and email after login if you use it) - Connector credentials — URL, API token, stream URL (e.g.
https://your-connector.onrender.com/stream/plus your product id from the dashboard) autoplay-sdkinstalled — and a successful test stream from the Quickstart
Step 1 — Register webhooks (Intercom Developer Hub)
The connector must know when a user starts or replies to a conversation so it can link the PostHog session to that conversation. Intercom: Settings → Integrations → Developer Hub → Your app → WebhooksWalkthrough (Arcade)
Follow this interactive guide to configure webhooks in Intercom Developer Hub.| Field | Value |
|---|---|
| Endpoint URL | Use intercom_chatbot_webhook_url in the snippet below (HTTPS URL, no trailing slash issues). |
| Topics | Every topic in INTERCOM_WEBHOOK_TOPICS (see snippet below) |
CONNECTOR_HOST→your-connector.onrender.com(or fullhttps://…; the helper accepts both)PRODUCT_ID→ last path segment
conversation.user.created— new conversationconversation.user.replied— reply in an existing thread
X-Hub-Signature-256; invalid or missing signatures → 403.
More helpers: Intercom integration.
Step 2 — Consume the stream and write to Intercom
UseBaseChatbotWriter and AsyncAgentContextWriter from autoplay-sdk. The SDK handles buffering, debouncing, and summarisation; you implement two Intercom calls:
_post_note— post an internal admin note; returnpart_idfor redaction_redact_part— blank an old note when a summary replaces it
write_actions and overwrite_with_summary because your code receives ActionsPayload from the stream. Autoplay’s default connector posts raw notes via forward_batch and passes write_actions=None into IntercomChatbot.make_agent_writer — see Chatbot writer.
Implement IntercomWriter
- Access token — Developer Hub → Your app → Authentication
- Admin ID — Teammates, or Admins API
Wire AsyncAgentContextWriter
Connect to the stream
conv_map when your service learns each session_id → conversation_id (for example from the same Intercom webhooks as Step 1). Call await writer.on_session_linked(session_id, conversation_id) so BaseChatbotWriter can flush its pre-link buffer before you rely on live write_actions traffic.