Maytapi icon

Maytapi

Integrate with Maytapi WhatsApp Unofficial API

Chat → Mute Chat

AI-generated

Overview

This node integrates with the Maytapi WhatsApp Unofficial API to manage WhatsApp chats and perform various chat-related operations. Specifically, the "Mute Chat" operation allows users to mute or unmute a WhatsApp conversation for a specified duration or indefinitely. This is useful in scenarios where you want to silence notifications from specific chats temporarily or permanently without leaving or blocking the conversation.

Practical examples:

  • Automatically mute group chats during work hours to avoid distractions.
  • Unmute important conversations when expecting critical messages.
  • Mute promotional or spammy chats forever to keep your notification feed clean.

Properties

Name Meaning
Phone ID Source Select how to provide the Phone ID: either use the Phone ID stored in credentials or enter a custom Phone ID manually.
Phone ID The WhatsApp instance Phone ID to use (required if "Custom" Phone ID Source is selected).
Conversation ID The unique identifier of the conversation to mute/unmute. Format examples: 905301234567@c.us (user) or 905301234567-1234567890@g.us (group).
Action Choose whether to "Mute" or "Unmute" the conversation.
Duration When muting, select the duration: "8 Hours", "1 Week", or "Forever". Only shown if Action is "Mute".

Output

The node outputs a JSON object representing the response from the Maytapi API after performing the mute or unmute action on the specified conversation. The exact structure depends on the API response but generally includes success status and details about the updated mute state.

No binary data output is produced by this operation.

Example output JSON snippet:

{
  "success": true,
  "message": "Conversation muted successfully",
  "conversationId": "905301234567@c.us",
  "action": "mute",
  "duration": "1_week"
}

Dependencies

  • Requires an active Maytapi WhatsApp API account with valid API credentials including an API key and associated Phone ID.
  • The node expects the Phone ID either from credentials or as a custom input.
  • Network access to https://api.maytapi.com/api is required.
  • Proper configuration of credentials in n8n with the necessary API authentication token.

Troubleshooting

  • Missing Phone ID: If neither credentials nor custom Phone ID is provided, the node will throw an error stating that Phone ID is required. Ensure you have set the Phone ID correctly.
  • Invalid Conversation ID: Using an incorrect or malformed conversation ID may cause API errors. Verify the format matches user (phone@c.us) or group (groupid@g.us) conventions.
  • API Errors: If the Maytapi API returns errors (e.g., invalid token, rate limits), check your API key validity and usage limits.
  • Duration Required for Mute: When muting, the duration must be specified; omitting it or providing an unsupported value will cause errors.
  • Network Issues: Ensure your server can reach the Maytapi API endpoint without firewall restrictions.

Links and References


This summary covers the "Mute Chat" operation under the "Chat" resource based on the provided source code and property definitions.

Discussion