OpenClawSkills
GitHub
Automation • TutorialHeader.readTime

Polls

Send polls via the Gateway + CLI.

Tutorial.step

Supported Channels

- WhatsApp (web channel)

- Discord

- MS Teams (adaptive cards)

Tutorial.step

Command Line Interface

Bash
openclaw message poll --target +15555550123   --poll-question "Lunch today?" --poll-option "Yes" --poll-option "No" --poll-option "Maybe"
openclaw message poll --target [email protected]   --poll-question "Meeting time?" --poll-option "10am" --poll-option "2pm" --poll-option "4pm" --poll-multi


openclaw message poll --channel discord --target channel:123456789   --poll-question "Snack?" --poll-option "Pizza" --poll-option "Sushi"
openclaw message poll --channel discord --target channel:123456789   --poll-question "Plan?" --poll-option "A" --poll-option "B" --poll-duration-hours 48


openclaw message poll --channel msteams --target conversation:19:[email protected]   --poll-question "Lunch?" --poll-option "Pizza" --poll-option "Sushi"

Options:

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'--channel'</code>': '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'whatsapp'</code>' (default), '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'discord'</code>', or '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'msteams'</code>'

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'--poll-multi'</code>': Allow multiple selections

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'--poll-duration-hours'</code>': Discord only (defaults to 24 if omitted)

Tutorial.step

Gateway RPC

Method: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'poll'</code>'

Parameters:

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'to'</code>' (string, required)

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'question'</code>' (string, required)

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'options'</code>' (string[], required)

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'maxSelections'</code>' (number, optional)

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>' (number, optional)

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'channel'</code>' (string, optional, default: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'whatsapp'</code>')

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'idempotencyKey'</code>' (string, required)

Tutorial.step

Channel Differences

- WhatsApp: 2-12 options, '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'maxSelections'</code>' must be within option count, ignores '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>'.

- Discord: 2-10 options, '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>' limited to 1-768 hours (default 24). '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'maxSelections &gt; 1'</code>' enables multi-select; Discord does not support strict selection counts.

- MS Teams: Adaptive card polls (OpenClaw-managed). No native poll API; '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>' ignored.

Tutorial.step

Agent Tool (Message)

Combine the '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'message'</code>' tool with the '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'poll'</code>' action ('<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'to'</code>', '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollQuestion'</code>', '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollOption'</code>', optional '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollMulti'</code>', '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollDurationHours'</code>', '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'channel'</code>').

Note: Discord has no "exact N" mode; '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollMulti'</code>' maps to multi-select.

Teams polls are presented as adaptive cards and require the gateway to stay online

Record votes in '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'~/.openclaw/msteams-polls.json'</code>'.