WhatsApp Sender icon

WhatsApp Sender

Send messages via WhatsApp API

WhatsApp Sender

AI-generated

Summary

Execute a WhatsApp API action based on the selected parameter.

Inputs

  • action (required) — The WhatsApp API action to perform. Defaults to 'sendMessage'. Options include sendMessage, getStatus, getSystemHealth, createSession, startSession, pauseSession, resumeSession, deleteSession, listSessions, getQrCode, getProfilePic.
  • session (required) — The session ID of the WhatsApp instance. Defaults to 'Genisys'. Required for all actions.
  • phone (required) — The destination phone number with DDI and DDD. Defaults to empty string. Required for sendMessage and getProfilePic actions.

Output shape

Array of items; each item contains a json field with the API response data. For sendMessage, the response comes from POST /api/send. For other actions, responses come from their respective endpoints (e.g., GET /api/sessions/{session}/status, GET /api/contacts/{phone}/profile-pic). Errors are returned as { json: { error: error.message } } when continueOnFail is enabled.

The node's execute() method reads the 'action' parameter and routes to the corresponding API endpoint. All parameters are read per item via this.getNodeParameter. The response is wrapped in { json: ... } and returned as an array.

Examples

Example 1: Send a text message

action=sendMessage, session=Genisys, phone=5511999999999, message=Hello

Example 2: Get QR code

action=getQrCode, session=Genisys

Links

Discussion