Expertos en IA icon

Expertos en IA

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

Overview

This node allows sending interactive polls (surveys) via a messaging API to specified chat IDs. It is useful for gathering quick feedback or opinions from chat participants in an automated workflow. For example, you can send a poll asking "Which programming language do you prefer?" with options like JavaScript, Python, and TypeScript, and optionally allow multiple answers.

Typical use cases include:

  • Conducting customer satisfaction surveys in chat groups.
  • Collecting votes or preferences during live events or discussions.
  • Automating feedback collection in support or community chats.

Properties

Name Meaning
ID del Chat The unique identifier of the chat where the poll will be sent (e.g., 12345@c.us).
Título de la Encuesta The question or title of the poll to be presented to chat participants.
Opciones de la Encuesta Comma-separated list of options that users can choose from in the poll.
Múltiples Respuestas Boolean flag to allow selecting multiple options instead of just one.
Responder a Mensaje Optional message ID to which this poll will reply, creating a threaded conversation.

Output

The node outputs an array of JSON objects, each representing the response from the API after sending the poll. The JSON structure typically contains details about the sent poll message, such as confirmation data or message identifiers.

Example output JSON snippet:

{
  "json": {
    "messageId": "abc123",
    "status": "sent",
    "poll": {
      "name": "¿Cuál es tu lenguaje favorito?",
      "options": ["JavaScript", "Python", "TypeScript"],
      "multipleAnswers": false
    }
  },
  "pairedItem": {
    "item": 0
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for authentication with the external "Expertos en IA" API service.
  • The node sends HTTP requests to https://api.expertosenia.com/api/sendPoll.
  • Proper configuration of the API key credential in n8n is necessary.
  • The node uses session management; a session name defaults to "default" but can be customized.

Troubleshooting

  • Common issues:

    • Invalid or missing chat ID format may cause the API to reject the request.
    • Incorrect API key or expired credentials will result in authentication errors.
    • Providing empty poll options or titles will likely cause validation errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • "Operación no válida." — This indicates an unsupported or incorrectly specified operation.
    • API error responses are returned in the JSON under an error field if the node is set to continue on failure.
    • Authentication failures usually mention invalid API keys or unauthorized access.
  • Resolutions:

    • Verify the chat ID format matches the expected pattern (e.g., number followed by @c.us).
    • Ensure the API key credential is correctly configured and active.
    • Provide non-empty poll titles and at least one option separated by commas.
    • Check network settings and firewall rules allowing outbound HTTPS requests.

Links and References

Discussion