z-api by @jaimeflneto icon

z-api by @jaimeflneto

Interact with Z-API to send WhatsApp messages

Overview

This node operation sends a document message via WhatsApp using the Z-API service. It is useful for automating the sending of documents such as PDFs, images, or other files to specified phone numbers. Practical applications include sending invoices, reports, brochures, or any document directly to a user's WhatsApp.

Use Case Examples

  1. Sending a PDF invoice to a customer after a purchase.
  2. Distributing a product brochure to a list of contacts.
  3. Sharing a report or presentation document with team members.

Properties

Name Meaning
Phone Number The recipient's phone number including country code, formatted as digits only without any special characters or spaces.
Document URL The URL where the document to be sent is hosted. The document will be fetched from this URL and sent to the recipient.
File Name The name to assign to the document file when sending it. This is optional and can be used to specify a custom file name.
Options Additional optional settings for sending the document, including delays for typing status and message sending, and the ID of a message to reply to.

Output

JSON

  • phone - The phone number to which the document was sent.
  • documentUrl - The URL of the document that was sent.
  • fileName - The name of the document file sent.
  • messageId - The ID of the sent message, useful for tracking or replying.

Dependencies

  • Z-API service for WhatsApp messaging

Troubleshooting

  • Ensure the phone number is correctly formatted with country code and contains only digits; otherwise, the message may fail to send.
  • Verify that the document URL is accessible and points to a valid document file; inaccessible URLs will cause errors.
  • Check that the API credentials for Z-API are correctly configured and valid to avoid authentication errors.
  • Delays for typing and message sending should be within the allowed range (0-15 seconds); values outside this range may be ignored or cause errors.

Links

Discussion