Green API icon

Green API

Send WhatsApp messages via Green API

Message → Send Poll

AI-generated

Overview

This node operation sends a poll message to a specified WhatsApp chat using the Green API. It allows users to create interactive polls with multiple options and optionally enable multiple answers. This is useful for gathering opinions or votes from chat participants in a structured way.

Use Case Examples

  1. Sending a poll to a group chat to decide on a meeting time with options like 'Morning', 'Afternoon', 'Evening'.
  2. Creating a poll in a customer support chat to get feedback on service quality with options like 'Excellent', 'Good', 'Fair', 'Poor'.

Properties

Name Meaning
Chat ID The identifier of the chat where the poll will be sent. For private chats, use phone@c.us format; for group chats, use chatId@g.us.
Message The text message that accompanies the poll, providing context or instructions to the recipients.
Poll Options Comma-separated list of poll options (between 2 and 12) that participants can choose from.
Multiple Answers Boolean flag indicating whether the poll allows multiple answers from participants.
Quoted Message ID Optional ID of a message to quote in the poll message, providing reference to a previous message.

Output

JSON

  • chatId - The chat identifier where the poll was sent.
  • message - The text message content of the poll.
  • options - Array of poll options sent in the poll.
  • multipleAnswers - Indicates if multiple answers are allowed in the poll.
  • quotedMessageId - ID of the quoted message if provided.
  • idMessage - The unique identifier of the sent poll message returned by the API.

Dependencies

  • Green API service with instance ID and API token credentials

Troubleshooting

  • Ensure the chat ID is correctly formatted for private or group chats.
  • Poll options must be between 2 and 12 and properly comma-separated.
  • If multiple answers are enabled, verify that the receiving client supports this feature.
  • Check API credentials (instance ID and API token) are valid and not expired.
  • Common errors include network issues or invalid parameters; error messages include details and the data sent for easier debugging.

Discussion