Source: https://cli.nylas.com/guides/meeting-poll-cli

# Run a Meeting Time Poll from the CLI

A meeting time poll proposes a few options, lets people vote, and books the winner. This guide runs that loop from the terminal: propose slots, screen each one against participants' calendars so dead options never reach the vote, email a shortlist, then create the event for the winner.

Written by [Nick Barraclough](https://cli.nylas.com/authors/nick-barraclough) Product Manager

Reviewed by [Qasim Muhammad](https://cli.nylas.com/authors/qasim-muhammad)

Updated June 9, 2026

> **TL;DR:** Propose 4 or 5 time options, run each through `nylas calendar availability check` to drop ones with conflicts, email the survivors with `nylas email send` so people vote, then book the winner with `events create`. The screening step is what makes this beat a plain Doodle — the script is at the bottom.

## How do I propose the time options for a meeting poll?

A meeting poll starts with a small set of candidate slots — usually 4 or 5 options, since response rates fall once a poll runs past about 6 choices. You define each option as a start and end timestamp in a plain list, then iterate over it. No external service holds the options; the terminal does.

The list below is the input every later step reads from. Each entry is a start/end pair the script will screen for conflicts and then offer for a vote. Keeping options in one array means a single edit changes every downstream command, and 4 options keep the eventual email short enough to scan on a phone.

```bash
# Four proposed slots for a 30-minute meeting
OPTIONS=(
  "2026-06-15 10:00|2026-06-15 10:30"
  "2026-06-15 14:00|2026-06-15 14:30"
  "2026-06-16 11:00|2026-06-16 11:30"
  "2026-06-17 15:00|2026-06-17 15:30"
)
```

## Why screen each option against participants before voting?

Screening each option against participants' calendars removes the most common failure of a Doodle-style poll: the winning slot turns out to be one a key person was never free for. The `nylas calendar availability check` command reads free/busy for a list of emails over a time range, so a slot with any conflict drops before it ever reaches the vote.

The command takes `--emails` as a comma-separated list and `--start` and `--end` for the window. With `--json` it returns busy intervals you can test against. Run it once per option, and a slot that returns any busy interval overlapping its window is disqualified — checking 4 options across a team takes well under 2 seconds.

```bash
# Check one proposed slot against three participants
nylas calendar availability check \
  --emails alice@company.com,bob@company.com,carol@company.com \
  --start "2026-06-15 10:00" --end "2026-06-15 10:30" \
  --json
```

## How do I email the shortlist so people can vote?

You email the surviving slots with `nylas email send`, listing each option with a reply instruction so recipients vote by replying with a number. The send goes out across providers without SMTP config, and adding `--track-opens` tells you who has seen the poll before the deadline.

The command takes `--to` once per recipient, `--subject`, and `--body`. Passing `--yes` skips the confirmation prompt so the step runs unattended. Replies land in the organizer's inbox, where `nylas email list` surfaces the votes — a 3-person poll usually settles within an hour.

```bash
nylas email send \
  --to alice@company.com --to bob@company.com --to carol@company.com \
  --subject "Vote: pick a time for the planning sync" \
  --body "Reply with the number that works:
1) Mon Jun 15, 10:00
2) Tue Jun 16, 11:00
3) Wed Jun 17, 15:00" \
  --track-opens --yes
```

## How do I count the votes that come back?

You count votes by listing the replies that match the poll subject and reading the chosen number from each. The `nylas email search` command filters by subject and time, and `--json` gives a parseable result so a tally is one pipeline. The organizer breaks ties, since equal counts happen often with 3 or 4 options.

Use `nylas email search` with `--subject` to pull the reply thread and `--after` to bound it to since the poll went out. The example reads the first digit of each reply body to total votes per option, so a poll that drew 12 replies resolves in one command instead of manual inbox triage.

```bash
# Pull poll replies and tally the first digit of each reply
nylas email search "*" --subject "Vote: pick a time" --after "2026-06-12" --json \
  | jq -r '.[].snippet' \
  | grep -oE '^[1-4]' | sort | uniq -c | sort -rn
```

## How do I book the winning slot for everyone?

You book the winner with `nylas calendar events create`, repeating `--participant` once per voter. Every participant gets a real calendar invite they can accept, and the event lands on the organizer's primary calendar by default. One command closes the poll — no copy-paste into a separate invite.

```bash
nylas calendar events create \
  --title "Planning sync" \
  --start "2026-06-16 11:00" --end "2026-06-16 11:30" \
  --location "Google Meet" \
  --participant alice@company.com \
  --participant bob@company.com \
  --participant carol@company.com
```

The full poll chains every step: build the option list, screen each one with `availability check`, email the survivors, then book the winner after the vote. The script below runs the screen-and-email half and exits cleanly if every proposed slot has a conflict — the one case worth handling, since a busy team can rule out all 4 options in a tight week.

```bash
#!/usr/bin/env bash
set -euo pipefail
EMAILS="alice@company.com,bob@company.com,carol@company.com"
OPTIONS=(
  "2026-06-15 10:00|2026-06-15 10:30"
  "2026-06-16 11:00|2026-06-16 11:30"
  "2026-06-17 15:00|2026-06-17 15:30"
)

BODY="Reply with the number that works:"
N=0
for OPT in "${OPTIONS[@]}"; do
  START="${OPT%|*}"; END="${OPT#*|}"
  FREE=$(nylas calendar availability find --participants "$EMAILS" \
    --duration 30 --start "$START" --end "$END" --json | jq 'length')
  [ "$FREE" -gt 0 ] || continue
  N=$((N + 1))
  BODY="$BODY
$N) $START"
done

[ "$N" -eq 0 ] && { echo "every proposed slot has a conflict"; exit 0; }

nylas email send --to alice@company.com \
  --subject "Vote: pick a time for the planning sync" \
  --body "$BODY" --track-opens --yes
```

## Next steps

- [Google Calendar API Quotas and Limits](https://cli.nylas.com/guides/google-calendar-api-quotas) — Google Calendar API quota reference
- [Track Event RSVPs from the Terminal](https://cli.nylas.com/guides/event-rsvp-tracking-cli) — Send calendar invites, read RSVP status from the event JSON, and…
- [Find a meeting time across calendars](https://cli.nylas.com/guides/find-meeting-time-cli) — collapse a multi-person search to one shared-slot query
- [Check calendar availability](https://cli.nylas.com/guides/check-calendar-availability-cli) — read free/busy for any list of participants
- [Build a booking page](https://cli.nylas.com/guides/calendar-availability-booking-page) — let people self-book instead of voting on a shortlist
- [Automate interview scheduling](https://cli.nylas.com/guides/automate-interview-scheduling-cli) — find a panel slot, book it, and send a timed reminder
- [Relay poll replies to a webhook](https://cli.nylas.com/guides/email-to-webhook-relay) — push each vote to your own tally service as it arrives
- [Command reference](https://cli.nylas.com/docs/commands) — every flag, subcommand, and example
- [Google Calendar API: freebusy.query](https://developers.google.com/calendar/api/v3/reference/freebusy/query) — the free/busy endpoint behind the screening step on Google
- [Microsoft Graph: getSchedule](https://learn.microsoft.com/en-us/graph/api/calendar-getschedule) — the equivalent free/busy call for Outlook and Microsoft 365
- [RFC 5545 — iCalendar](https://datatracker.ietf.org/doc/html/rfc5545) — the spec behind the calendar invite voters receive
