Actions66
- Account Actions
- API Key Actions
- Chat Actions
- Contact Actions
- Group Actions
- Media Actions
- Message Actions
- Queue Actions
- Sync Actions
- System Actions
- Webhook Actions
Message → Get AI Context
AI-generatedSummary
Retrieves recent WhatsApp conversation history for a chat as role-mapped messages, a transcript, or both, trimmed to a message limit and approximate token budget. Use it to give an AI agent conversation context before it replies; it requires SocialMate Pro.
Inputs
- Account Name or ID — Select the WhatsApp account. It can be left empty when the API key is bound to one account; with access to multiple accounts, choose one.
- Chat ID / Phone Number (required) — The chat to read: a phone number in international format with country code, or a group JID ending in @g.us.
- Options — Optional context controls: Before Timestamp (Unix Ms) excludes messages at or after that time; Format selects both (default), messages only, or transcript only; Include Timestamps adds ISO timestamps to transcript lines; Max Messages sets the recent-message limit (default 50); Max Tokens sets the approximate context budget (default 4000); Order chooses chronological (default) or newest first.
Output shape
A single object with account, chat, transcript, messages, and meta fields by default.
Format can restrict the response to messages or transcript. Each message is a conversation turn with role, name, content, timestamp, and type, with reactions, poll tallies, and cached media descriptions when available. These are conversation context turns, not delivery records; use Message: Search / List to inspect delivery status.