WhatGHL icon

WhatGHL

Send actions to WhatGHL API

Actions42

💬 **CHATTING** · Send File

AI-generated

Summary

Send a file message to a specified WhatsApp chat using a selected WhatGHL session, optionally including a caption.

Inputs

  • Session Mode (required) — Choose how the sender session is selected: 'Auto', 'By Session Name' (requires sessionName), or 'Select Session' (requires sessionId).
  • Session — Select the session to use for sending the message when Session Mode is 'Select Session'.
  • Session Name — Specify the WAHA session name to use as sender when Session Mode is 'By Session Name'.
  • Chat ID (required) — The ID of the destination WhatsApp chat to which the file will be sent.
  • Media URL (required) — Public URL of the file to send (e.g., a PDF or other document).
  • Content — Optional text content or caption associated with the file message.
  • Caption — Optional caption text shown with the file message.

Output shape

a single JSON response object from the WhatGHL API indicating the result of the send file action

Requires valid WhatGHL API credentials (baseUrl and apiKey). Throws an error if required inputs are missing. The response includes details of the message sent and any errors encountered.

Examples

Example 1: Sending a file to a chat

Set Session Mode to appropriate selection ('Auto' by default), provide the Chat ID, specify the Media URL of the file to send, and optionally add a caption or content text for context. The node will send a file message using the selected WhatGHL session to the given chat.

Links

Discussion