Evolution API icon

Evolution API

Complete WhatsApp automation with Evolution API

Overview

This node integrates with the Evolution API to manage WhatsApp instances and perform various WhatsApp-related operations. Specifically, for the Instance resource and the Get Connection State operation, it retrieves the current connection state of a specified WhatsApp instance.

Common scenarios where this node is beneficial include:

  • Monitoring the connection status of a WhatsApp instance to ensure it is online and ready to send/receive messages.
  • Automating workflows that depend on the instance being connected before proceeding.
  • Troubleshooting connectivity issues by programmatically checking the instance state.

Practical example:

  • Before sending messages in an automated campaign, use this node to verify the WhatsApp instance is connected. If not connected, trigger alerts or attempt reconnection.

Properties

Name Meaning
Additional Fields Optional extra parameters:
• Delay: Delay in milliseconds before sending (number)
• Link Preview: Enable link preview in messages (boolean)
• Quoted Message ID: ID of message to quote/reply to (string)
• Mentions: Comma-separated list of numbers to mention (string)

Note: For the Get Connection State operation under the Instance resource, no additional required input properties are needed beyond the instance configuration (which is set via credentials).

Output

The output JSON contains the response from the Evolution API about the connection state of the WhatsApp instance. This typically includes details such as whether the instance is connected, connecting, disconnected, or any relevant status information provided by the API.

The output structure is:

{
  "connectionState": "connected" | "connecting" | "disconnected" | "...",
  // other possible fields depending on API response
}

No binary data is output by this operation.

Dependencies

  • Requires an active Evolution API credential with:

    • Base URL of the Evolution API service.
    • API key for authentication.
    • Instance name identifier.
  • Optionally uses a secondary API key credential for validation via the n8n Tools API.

  • The node makes HTTP requests to the Evolution API endpoints and requires network access to these services.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API keys configured in the credentials are correct and have the necessary permissions.

  • Unknown resource or operation error: Ensure that the Resource is set to "Instance" and Operation to "Get Connection State". Other combinations may cause errors if unsupported.

  • Network or timeout errors: Check network connectivity to the Evolution API endpoint and confirm the base URL is reachable.

  • Unexpected API responses: If the output does not contain expected connection state information, verify the instance name is correct and the instance is properly registered in the Evolution API system.

Links and References

Discussion