Plug Chat icon

Plug Chat

Create and edit data in PlugChat

Overview

The Plug Chat node for n8n enables sending audio messages via WhatsApp using the "Send Audio" operation under the "Message" resource. This node is useful for automating communication workflows where you need to deliver audio content (such as voice notes, announcements, or alerts) directly to users' WhatsApp numbers. Typical scenarios include customer support bots, notification systems, and marketing campaigns that require sending pre-recorded audio files.

Example use cases:

  • Sending appointment reminders as audio messages.
  • Delivering personalized voice greetings to customers.
  • Broadcasting important updates in audio format to a list of recipients.

Properties

Name Type Meaning
Phone String Phone number with country code. The recipient's WhatsApp phone number.
Media URL String URL or Base64 of the media to send. The audio file to be sent.
Caption String Caption for media. Optional text to accompany the audio message.
Message ID String Message ID to reply to. If set, the audio will be sent as a reply.
Delay Number Delay in seconds. Wait time before sending the message.

Output

The node outputs a JSON object containing the response from the PlugChat API after attempting to send the audio message. The structure typically includes:

{
  // ...fields returned by the PlugChat API, such as:
  "status": "success",
  "messageId": "abc123",
  "to": "+1234567890",
  // etc.
}

If an error occurs and "Continue On Fail" is enabled, the output will contain:

{
  "error": "Error message describing what went wrong"
}

Dependencies

  • External Service: Requires access to the PlugChat API.
  • API Credentials: You must configure the plugChatApi credential in n8n.
  • Environment: No additional environment variables are required beyond standard n8n setup.

Troubleshooting

Common Issues:

  • Invalid Phone Number: Ensure the phone number includes the correct country code and contains only digits.
  • Media URL Problems: The provided Media URL must point to a valid audio file or be a valid Base64 string. Invalid URLs or unsupported formats may cause errors.
  • Missing Credentials: If the plugChatApi credential is not configured, the node will fail to authenticate.
  • API Errors: Any issues with the PlugChat API (e.g., rate limits, downtime) will result in error messages passed through the node.

Common Error Messages:

  • "Invalid phone number": Check the formatting and ensure only digits and country code are used.
  • "Media not found" or "Invalid media format": Verify the Media URL or Base64 data.
  • "Authentication failed": Make sure your PlugChat API credentials are correctly set up in n8n.

Links and References

Discussion