Skip to main content

Sending Polls To WhatsApp Groups

Sending Polls to WhatsApp Group Collections.

5 minutes readLevel: BeginnerLast Updated: December 2025

Glific platform can be used to create polls. Send or scheudule the polls in advance to multiple groups.

Pre-requisites

  1. WhatsApp Groups Integration should be enabled. Read here

Create the poll in Glific platform

  1. Go to the WhatsApp Polls under the WhatsApp Groups section

  2. Click on Create and provide the title, the question of the poll in content and the options. Ensure you make the right choice for allowing multiple responses.

  3. Poll questions are limited to 255 characters.

  4. Under Options enter up to 12 poll options.

  5. Poll options are limited to 100 characters.

  6. To allow users voting for more than one option, turn on Allow multiple answers

Screenshot 2025-02-14 at 2 51 54 PM
  1. Click on Save. This creates the poll.
  2. Copy the UUID
Screenshot 2025-02-14 at 2 51 07 PM

Create a flow to send the poll

  1. Create a new flow
  2. Add a call a webhook node.
  • By default, FUNCTION would be selected. Leave this as it is.
Screenshot 2025-12-03 at 12 45 20 PM
  • In the FUNCTION field, select the pre-defined function send_wa_group_poll from the dropdown and give the result name.
Screenshot 2025-12-03 at 12 46 01 PM Screenshot 2025-12-03 at 12 46 54 PM
  1. Add the parameters in the FUNCTION Body.
  • Go to FUNCTION Body on top right corner. You would see the following.
Screenshot 2025-12-03 at 12 48 56 PM
  • Pass the following parameters.

{ "wa_group": "@wa_group", "poll_uuid": "" }

Screenshot 2025-02-14 at 2 50 43 PM
  • “poll_uuid”: "" from the polls list paging by selecting on Copy UUID.
  • “wa_group”: “@wa_group” will remain as is.
  1. This completes the flow
Screenshot 2025-02-14 at 4 08 36 PM

5. Please note: No further send message node is needed to send the poll to WhatsApp group. The webhook success response sends the poll with the given poll uuid to the groups.

Here is a SAMPLE FLOW. To use this flow, go to the link, download the csv, and upload this flow using import a flow in your Glific instance. Change the poll_uuid in the webhook function body to match the poll_uuid of the poll you have created in your Glific instace.

Sending the poll to required WhatsApp Group or Collection.

  1. This can be done by setting a trigger to a WhatsApp Group Collection
  2. Or the particular flow can be started for the WhatsApp Group by starting a flow for the group like shown below.
Screenshot 2025-02-14 at 4 15 51 PM

Polls can also be used from Google sheet, to send different polls based on the date or any other incremental counter logic.

  1. Link a readable Google Sheet in the Glific, which has the Key and poll uuids
Screenshot 2025-02-14 at 4 17 07 PM
  1. Use Link a google sheet node to read the poll uuid from the sheet based on your choice of variables (could be date wise etc). Please note that above is just one example of how it can be used.
  2. Call the webhook function send_wa_group_poll and use the sheet result to populate the poll_uuid in the function body of the webhook call.
Screenshot 2025-02-14 at 4 17 46 PM
  1. This flow picture is only to illustrate how google sheet can be used to send polls.

Getting the data of responses

  1. Responses to the polls are stored in the wa_messages tables
  2. The type field stores the type of message being sent or received. Filtering for poll under this field gives all the poll type text messages sent from the number to the groups
  3. poll_content field contains the json structure for the poll. This contains the entire poll body, options and the vote count.
  4. At present it is possible to get only the no of responses to a particular option, and not which phone number has responded what.
  5. Following query creates a view to get the aggregated output of all the polls and its responses. This can be further manipulated to get the responses for a particular poll across the various groups or drill down to responses from a particular group. (replace the xxxxxxxxxx with the table dataset from your chatbot. It is usually the phone number of your chatbot)
   WITH distinct_data AS (
SELECT
id,
wa_group_id,
wa_group_name,
MAX(body) AS body,
MAX(poll_content) AS poll_content,
MAX(inserted_at) as inserted_at
FROM
`tides-saas-309509.917834811114.wa_messages`
GROUP BY id, wa_group_id, wa_group_name
),
parsed_data AS (
SELECT
id,
body,
wa_group_id,
wa_group_name,
JSON_EXTRACT_ARRAY(poll_content, '$.options') AS options,
inserted_at
FROM
distinct_data
)

SELECT
wa_group_id,
wa_group_name,
body,
JSON_EXTRACT_SCALAR(option, '$.name') AS option_name,
SUM(CAST(JSON_EXTRACT_SCALAR(option, '$.votes') AS INT64)) AS votes,
MAX(inserted_at) as inserted_at
FROM
parsed_data,
UNNEST(options) AS option
GROUP BY body, option_name, wa_group_id, wa_group_name

**Points to note: **

  1. While creating the poll, please populate the options you want to them to appear in when being read on WhatsApp
  2. Poll once created cannot be edited, please review and test thoroughly before using it in actual groups.