Expertos en IA icon

Expertos en IA

Nodo oficial para interactuar con la API segura de Expertos en IA

Overview

This node allows sending files through a messaging API provided by "Expertos en IA". It is designed to send various types of media and messages to specific chat IDs within a session. The "Enviar Archivo" (Send File) operation specifically enables users to send a file located at a given URL to a designated chat, optionally including a caption, filename, and replying to a specific message.

Common scenarios where this node is beneficial include:

  • Automating the distribution of documents or reports to clients or team members via chat.
  • Sending invoices, PDFs, or other important files directly through messaging platforms.
  • Integrating file sharing into workflows that require notifications or confirmations with attachments.

Practical example:

  • A business automatically sends a PDF contract to a customer’s chat after an order is confirmed.
  • A support bot shares user manuals or troubleshooting guides as files in response to user queries.

Properties

Name Meaning
ID del Chat The unique identifier of the chat where the file will be sent (e.g., phone_number@c.us).
URL del Archivo The direct URL link to the file that should be sent.
Nombre del Archivo The name to assign to the file when sending it (e.g., documento.pdf).
Título del Archivo Caption or description text that accompanies the file in the chat message.
Responder a Mensaje Optional ID of a message to which this file message will reply.

Output

The node outputs a JSON object for each input item processed. The JSON contains the response from the Expertos en IA API after attempting to send the file. This typically includes confirmation details such as message IDs, status, or error information if the request failed.

No binary data output is produced by this node; all responses are JSON-formatted metadata about the sent message.

Example output structure (simplified):

{
  "json": {
    "messageId": "string",
    "status": "sent",
    "chatId": "NUMERO@c.us",
    "file": {
      "url": "https://ejemplo.com/archivo.pdf",
      "filename": "documento.pdf",
      "caption": "Descripción del archivo"
    }
  },
  "pairedItem": {
    "item": 0
  }
}

Dependencies

  • Requires an API key credential for the Expertos en IA service.
  • Needs network access to the Expertos en IA API endpoint (https://api.expertosenia.com).
  • The node uses HTTP POST requests to send files and related data.
  • Proper session management is required, with a session name defaulting to "default" unless specified otherwise.

Troubleshooting

  • Invalid Chat ID: If the chat ID format is incorrect or the chat does not exist, the API may return an error. Verify the chat ID matches the expected pattern (e.g., number@c.us).
  • File URL Issues: Ensure the file URL is accessible and points directly to the file. URLs requiring authentication or redirects might cause failures.
  • Missing Required Fields: The node requires chatId and fileUrl. Omitting these will cause errors.
  • API Key Problems: Invalid or missing API keys will result in authentication errors. Confirm the API key credential is correctly configured.
  • Reply To Message ID: If specified, ensure the message ID exists in the chat; otherwise, the reply may fail silently or cause an error.
  • Empty Optional Fields: Empty strings for optional fields like caption, reply_to, or filename are handled by removing those properties before sending the request.

If the node throws errors, enabling "Continue On Fail" can help process subsequent items while logging errors for review.

Links and References

Discussion