Polls Tools
You can simply mention @Hana and describe your request. If the intent is clear, she will automatically run the relevant poll tool for you.
Introduction
Hana can create interactive polls directly in Google Chat. Use polls to gather opinions, make decisions quickly, and view results in real time.
Poll Lifecycle
Create – Hana posts the poll card in the current space or thread.
Vote / Un-vote – Users choose an option; selecting the same option again removes their vote.
Real-time Results – Vote counts and progress bars update after every interaction. If the poll is anonymous, voter names remain hidden.
Closing – When the end time passes, the poll locks. Attempting to vote shows a friendly “poll expired” message.
Editing & Deletion – Poll creators and organization admins can edit or delete a poll while it is active. Closed polls remain visible but cannot be changed.
Available Tools
Tool | Invocation Keywords | Description | Parameters |
---|---|---|---|
CREATE_POLL | poll | Use this function to create a new poll in the system. Specify a topic/question, a description, and a list of choices. The poll will be made available in Google Chat Space for users to see and vote on. | poll_topic (string, required)poll_description (string, required)poll_choices (array of strings, required)is_anonymous (boolean, required)voting_end_at (string, required) – the end timestamp for the voting to be closed; use the same timezone as the current time zoneallow_multiple_selection (boolean, required)max_selection_count (number, required) – max number of choices a voter can select if multiple selection is enabled |
Tool Reference
CREATE_POLL
Creates a new poll in the current Google Chat space.
Parameter | Type | Required | Description | Default* |
---|---|---|---|---|
poll_topic | string | ✅ | The poll’s main question or topic. | – |
poll_description | string | ✅ | Additional context or instructions for voters. | – |
poll_choices | array of strings | ✅ | List of selectable options. Keep each option short. | – |
is_anonymous | boolean | ✅ | true hides voter identities. | false |
voting_end_at | string (ISO 8601) | ✅ | Exact timestamp when voting closes. Must be in the user’s timezone and later than the creation time. | 24 hours from creation |
allow_multiple_selection | boolean | ✅ | true lets voters pick more than one option. | false |
max_selection_count | number | ✅ | Maximum selections allowed per voter. Use 1 if multiple selection is disabled. | 3 (when multi‑select is enabled) |
*Hana still provides all parameters when invoking the tool; defaults are used when the user does not specify a value.
Behavior Details
- Progress Bars – Each option shows a bar scaled to the percentage of voters selecting it.
- Voter Names – When the poll is not anonymous, each choice can display the names of users who selected it. Anonymous polls omit these names.
- Un-voting – Clicking VOTE/UN-VOTE on an option already chosen removes the vote, letting users change their mind before the poll closes.
- Error Messages
- Voting after the end time shows a “poll expired” message.
- Selecting multiple options in a single-choice poll returns a notice that multiple selections are not allowed.
- Exceeding the maximum selection count informs the voter they have already reached the limit.
How To Use
create a poll "What day works best for our sync?" options: Monday, Wednesday, Friday
@Hana create a poll "What day works best for our sync?" options: Monday, Wednesday, Friday
Hana shares the poll in the current Google Chat space, where members can vote and see the results.
Invocation Examples
Basic Single-Choice Poll
User request:
Ask the team if we should move the meeting to tomorrow.
@Hana ask the team if we should move the meeting to tomorrow. Create a yes/no poll
Tool call:
{
"tool": "CREATE_POLL",
"arguments": {
"poll_topic": "Move the meeting to tomorrow?",
"poll_description": "Vote yes or no.",
"poll_choices": ["Yes", "No"],
"is_anonymous": false,
"voting_end_at": "2024-05-08T18:00:00-04:00",
"allow_multiple_selection": false,
"max_selection_count": 1
}
}
Multi-Select Anonymous Poll
User request:
Set up an anonymous poll for our next team-building activity—bowling, escape room or cooking class. Let everyone pick two options and close it on March 1 at 5 PM PST.
@Hana create an anonymous poll: "Next team-building activity" options: Bowling, Escape room, Cooking class allow up to 2 choices; close on 2025-03-01 5 PM PST
Tool call:
{
"tool": "CREATE_POLL",
"arguments": {
"poll_topic": "Next team-building activity",
"poll_description": "Choose up to two options.",
"poll_choices": ["Bowling", "Escape room", "Cooking class"],
"is_anonymous": true,
"voting_end_at": "2025-03-01T17:00:00-08:00",
"allow_multiple_selection": true,
"max_selection_count": 2
}
}
Quick Poll with Defaults
User request:
Run a quick poll: Which logo color do people prefer—red, blue, or green?
@Hana run a quick poll: "Preferred logo color" options: Red, Blue, Green
Tool call:
{
"tool": "CREATE_POLL",
"arguments": {
"poll_topic": "Preferred logo color",
"poll_description": "Pick one color.",
"poll_choices": ["Red", "Blue", "Green"],
"is_anonymous": false,
"voting_end_at": "2024-05-09T09:00:00Z",
"allow_multiple_selection": false,
"max_selection_count": 1
}
}
Example
@Hana poll "What day works best for our sync?" options: Monday, Wednesday, Friday