Actions55
- Message Actions
- Contact Actions
- Chat Actions
- Group Actions
- Queue Actions
- Account Actions
- Session Actions
- Session Control Actions
- Call Actions
Chat → Get Conversation
AI-generatedOverview
The node integrates with the Maytapi WhatsApp Unofficial API to interact with WhatsApp chats and messages. Specifically, the Chat - Get Conversation operation retrieves detailed information about a specific WhatsApp conversation by its ID. This includes fetching recent messages, filtering by author, and optionally limiting results to messages sent by the user.
This node is beneficial for scenarios where you want to analyze or process chat history from WhatsApp conversations within an automation workflow. For example, you could use it to:
- Retrieve the latest messages from a customer support chat to trigger follow-up actions.
- Filter messages in a group chat by a particular participant.
- Extract only your own sent messages for auditing or reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Phone ID Source | Select how to provide the Phone ID: either "From Credentials" (uses stored credentials) or "Custom" (enter manually). |
| Phone ID | The WhatsApp instance Phone ID, required if "Custom" Phone ID Source is selected. |
| Conversation ID | The unique identifier of the conversation to retrieve. Format examples: 905301234567@c.us (user), 905301234567-1234567890@g.us (group). |
| Page | (Optional) Zero-based page number for pagination of messages. Defaults to 0. |
| Count | (Optional) Number of most recent messages to retrieve from the conversation. Defaults to 20. |
| Author | (Optional) Filter messages to those sent by a specific person in the conversation (use full WhatsApp ID format). |
| From Me Only | (Optional) If true, only messages sent by the authenticated user are returned. Defaults to false. |
Output
The output is a JSON object containing the response from the Maytapi API for the requested conversation. It typically includes:
- Conversation metadata.
- An array of messages matching the query parameters (pagination, count, author filter, fromMe filter).
- Each message contains details such as sender, timestamp, message content, and message type.
No binary data is output for this operation.
Example output structure (simplified):
{
"conversationId": "905301234567@c.us",
"messages": [
{
"id": "message-id-1",
"author": "905301234567@c.us",
"timestamp": 1680000000,
"type": "text",
"text": "Hello!"
},
{
"id": "message-id-2",
"author": "otheruser@c.us",
"timestamp": 1680000100,
"type": "image",
"imageUrl": "https://..."
}
],
"page": 0,
"count": 20
}
Dependencies
- Requires an active Maytapi WhatsApp API account with valid API credentials.
- The node expects an API key credential configured in n8n to authenticate requests.
- The Phone ID must be provided either via credentials or custom input.
- Network access to
https://api.maytapi.com/apiis required.
Troubleshooting
Error: "Phone ID is required."
Ensure that the Phone ID is correctly set either in the credentials or entered manually when using the custom option.Invalid Conversation ID
Make sure the conversation ID follows the correct format (phone@c.usfor individual chats orgroupid@g.usfor groups).Pagination issues
If no messages are returned, verify thePageandCountparameters; try resettingPageto 0 and increasingCount.API errors or timeouts
Check your Maytapi API key validity and network connectivity. Also, ensure your account has sufficient permissions and quota.Filtering by Author or From Me Only returns no messages
Confirm the author ID is correct and matches the format used in the conversation. Also, check if there are messages sent by the user if using the "From Me Only" filter.
Links and References
- Maytapi Official Website
- Maytapi WhatsApp API Documentation
- WhatsApp Conversation ID Format Explanation
If you need summaries for other operations or resources, feel free to ask!