Ably Chat messages can be extracted into external systems for storage, processing, or analysis. This enables you to implement features like AI assistants, long-term storage and compliance systems.
Chat rooms are built on Ably Pub/Sub channels, allowing you to leverage the full range of Ably's platform integrations to forward messages to external systems.
Process messages with external systems
Extract and process messages through external systems, then respond back to the chat in realtime.
- AI-powered assistance: Process commands through language models and respond with helpful information or perform actions on behalf of users.
- Notifications: Detect mentions or keywords and trigger custom notification systems.
- Command processing: Handle slash commands that invoke server-side logic.
- Data analysis: Perform sentiment analysis or topic detection on chat messages.
Store messages in your database
Export chat messages to your own database for long-term storage and additional capabilities.
- Compliance and legal requirements: Meet data retention policies and regulatory requirements.
- Analytics and business intelligence: Build dashboards, train ML models, and analyze sentiment.
- Enhanced functionality: Implement features that need chat history, such as full-text search.
- Single source of truth: Maintain your database as the canonical source.
- Long-term storage: Store data for longer than Ably Chat's maximum retention period (365 days).
How it works
When using Ably's platform integrations to extract messages from chat rooms:
- Configure an integration to match specific chat rooms using channel name filters.
- Ably forwards matching messages to your external system via webhook, queue, or streaming.
- Your system decodes and processes the messages based on your business logic.
Integration types
Choose the integration type that fits your architecture and scale requirements:
| Type | Best for | Delivery guarantee |
|---|---|---|
| Webhooks | Serverless functions, simple endpoints | At-least-once with limited retry |
| Streaming | High-throughput, existing infrastructure | Depends on target system |
| Ably Queues | Ordered processing, fault-tolerant delivery | At-least-once with dead letter queue |
See the extraction guide to learn how to set up integrations for use with chat rooms.
Related documentation
- Chat integrations - Technical reference for message structure mapping.
- Platform integrations - Complete integration setup guides.
- Message structure - Chat message format details.
- Chat history - Retrieve historical messages via API.