Mirra Messaging Events
Handle messages sent and received in Mirra chats
Mirra messaging events fire when messages are sent or received in Mirra's internal chat system. These events include automation tracking metadata, making it possible to build flows that react to both user messages and automated messages from other flows or the SDK.
Event Types
mirra.message
The mirra.message event fires when a message is sent in a Mirra chat (direct or group). This event captures message content, chat context, media attachments, and automation metadata for tracking whether the message was sent by a user, a flow, or the SDK.
Event Type:
Fields:
content.text(string)Message text content. Empty string if the message is media-only.
content.contentType(ContentType)Always
'message'for Mirra messages.actor.id(string)User ID of the message sender.
actor.name(string)Display name of the sender.
actor.actorType(ActorType)'user'for regular messages,'agent'for AI-generated messages.mirra.messageId(string)Unique message identifier.
mirra.chatInstanceId(string)Chat instance where the message was sent.
mirra.scope(ChatScope)Chat scope:
'direct'for 1-on-1,'group'for group chats.mirra.groupId(string | null)Group ID if this is a group chat message. Null for direct messages.
mirra.isGroupChat(boolean)True if the message is in a group chat.
mirra.hasMedia(boolean)True if the message contains media.
mirra.mediaType('image' | 'gif' | null)Type of media attachment if present.
mirra.replyTo(object | null)Reply context if this message is a reply to another message. Null if not a reply.
Field Type Description messageIdstring ID of the message being replied to senderIdstring User ID of the original message sender automationMirraAutomationMetadata | null Automation metadata of the original message mirra.automation(MirraAutomationMetadata)Tracks whether this message was sent by a user, a flow, or the SDK.
Field Type Description isAutomatedboolean True if the message was sent programmatically source'sdk' | 'flow' | 'user' How the message was sent flowIdstring | null Flow ID if sent by a flow flowTitlestring | null Flow title if sent by a flow enrichment(EventEnrichment | null)Content enrichment including detected tickers, companies, and sentiment. Null until processing completes.
Example - Group Chat Monitor:
Example - Reply Tracker:
Example - Keyword Alert:
Subscription Examples:
See Also
- Events Overview - Event system architecture
- Telegram Events - Telegram automation
- Resources - Mirra messaging adapter API