# Send Poll

> Send a poll message in a channel.

- ID: `send_poll`
- Type: Block
- Category: [Messages](https://inventor.bot/docs/reference/blocks/messages.md)

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `channel_id` | yes | ID of the channel to send the poll in. |  |
| `question` | yes | The poll question (max 300 characters). | e.g. `"What is your favorite color?"` |
| `answers` | yes | Poll answer options (1–10). | blocks: `func() { ... }` with only `poll_answer*` blocks |
| `duration` |  | How long the poll lasts in hours (1–768). Defaults to 24. | e.g. `"24"` |
| `allow_multiselect` |  | Whether users can pick multiple answers. | `"false"`, `"true"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `message_id` | ID of the sent poll message. |  |

**Example**

```go
poll := send_poll(Args{
	channel_id: trigger.channel_id,
	question:   "What is your favorite color?",
	answers: func() {
		poll_answer(Args{text: "Option A"})
	},
})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Message ID: " + poll.message_id,
})
```

## Blocks inside

These blocks can only be placed inside this one:

- [Poll Answer](https://inventor.bot/docs/reference/blocks/messages/poll-answer.md) (`poll_answer`), in `answers`