OpenClawSkills
GitHub
Automatización • 5 min de lectura

Encuestas

Enviar encuestas vía Gateway + CLI.

Tutorial.step

Canales Soportados

- WhatsApp (canal web)

- Discord

- MS Teams (tarjetas adaptativas)

Tutorial.step

Interfaz de Línea de Comandos

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"

Opciones:

- '<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>' (predeterminado), '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'discord'</code>', o '<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>': Permitir selecciones múltiples

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'--poll-duration-hours'</code>': Solo Discord (predeterminado 24 si se omite)

Tutorial.step

RPC del Gateway

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

Parámetros:

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

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

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

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

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

- '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'channel'</code>' (string, opcional, predeterminado: '<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, requerido)

Tutorial.step

Diferencias por Canal

- WhatsApp: 2-12 opciones, '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'maxSelections'</code>' debe estar dentro del conteo de opciones, ignora '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>'.

- Discord: 2-10 opciones, '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>' limitado a 1-768 horas (predeterminado 24). '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'maxSelections &gt; 1'</code>' habilita multi-selección; Discord no soporta conteos de selección estrictos.

- MS Teams: Encuestas de tarjetas adaptativas (gestionadas por OpenClaw). Sin API de encuesta nativa; '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'durationHours'</code>' ignorado.

Tutorial.step

Herramienta de Agente (Mensaje)

Combina la herramienta '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'message'</code>' con la acción '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'poll'</code>' ('<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>', opcional '<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>').

Nota: Discord no tiene modo "exactamente N"; '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'pollMulti'</code>' mapea a multi-selección.

Las encuestas de Teams se presentan como tarjetas adaptativas y requieren que el gateway permanezca en línea

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