# Get Scheduled Events

> List scheduled events for a server.

- ID: `get_scheduled_events`
- Type: Loop
- Category: [Scheduled Event](https://inventor.bot/docs/reference/blocks/scheduled-event.md)

- Loop block: write `for item := range get_scheduled_events(Args{...}) { ... }` and read the current item's outputs from `item`. See loops.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `server_id` | yes | Server to list events for. |  |
| `body` |  | Blocks to run for each event. | blocks: `func() { ... }` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `iteration_number` | Current iteration (1-based). | e.g. `"1"` |
| `total_iterations` | Total number of iterations. | e.g. `"3"` |
| `event_id` | ID of the scheduled event. |  |
| `server_id` | ID of the server for the event. |  |
| `channel_id` | Channel ID for Stage/Voice events. |  |
| `creator_user_id` | User ID of the event creator. |  |
| `name` | Name of the scheduled event. |  |
| `description` | Description of the scheduled event. |  |
| `start_time_unix` | Start time as Unix timestamp. |  |
| `end_time_unix` | End time as Unix timestamp. |  |
| `status` | Status of the scheduled event. |  |
| `type_` | Event type. |  |
| `subscribed_user_count` | Number of users subscribed to the event. |  |

**Example**

```go
for scheduledEvent := range get_scheduled_events(Args{server_id: trigger.server_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Event ID: " + scheduledEvent.event_id,
	})
}
```