# Pick a time

*Someone wants to meet. Your agent found the times that work. Tap one and it's sent.*

**Type: [Choose](types/choose.md).** Your agent did the research. Pick one of two or three options. This is one good use of it; the same widget serves which way to fix a bug, meeting time that works, which reply to send, which draft to publish and more. Switch the subject when something else matters more.

Template id `pick-a-time` · Asks you · uses Calendar · for: Agents with email and calendar access.

## Goal

Scheduling takes one tap instead of five emails.

## When to offer it

Someone asks to meet, by email or message.

## What the user gets

- Catches scheduling requests in your email
- Checks your calendar for times that really work
- Replies and sends the invite when you tap

## What each size shows

- **Small**: metric: Free slots = 3.
- **Medium**: metric: Free slots = 3; text (body): "Sam asked for 30 min about the contract."; buttons: Tue 2:00 (`t1`), Wed 10:30 (`t2`), Thu 4:00 (`t3`).
- **Large**: metric: Free slots = 3; text (body): "Sam asked for 30 min about the contract."; buttons: Tue 2:00 (`t1`), Wed 10:30 (`t2`), Thu 4:00 (`t3`); list: Why these (3 rows).
- **Lock Screen**: inline "Pick a time with Sam".

## Make it theirs

**Look.** Send `look` instead of `theme` and `accent`; every combination is designed to read well:

- `style`: `glass` (default: see-through, adapts to dark mode), `soft` (a calm pale tint) or `bold` (a vivid gradient with dark buttons).
- `accent`: blue, indigo, purple, pink, red, orange, green, teal, graphite, or a hex.
- `font`: default, rounded, serif or mono.

This template's own accent is **blue**. To restyle a widget you already saved, send only the look:

```json
{"slug": "pick-a-time", "look": {"style": "bold", "accent": "blue", "font": "rounded"}}
```

Preview a look without saving: `droplet_preview_widget` with the slug and `look`. When the user says "make it greener", "calmer" or "bolder", change the look; keep the content.

**Their choices.** Ask once (droplet_ask) or use what you know:

- Working hours
- Focus time to protect
- Meeting length

**Search words:** schedule, meeting, time, availability, calendar, invite, email, book.


## Before you build

- Check `droplet_get_phone_context`: the phone must share calendar. If something is off, ask the user to turn it on in Droplet.ai, Settings, Phone access.
- You need: Agents with email and calendar access.
- Ask once: The tap is the approval, because the widget names who and when. Ask first if it's someone the user has never written to.

## Fill it with real data

Start from the template (`droplet_library` with `id: "pick-a-time"`), keep the design, and replace each sample value:

| Block | Real value |
|---|---|
| 0 · metric | How many times work. |
| 1 · text | Who and what it's about. |
| 2 · buttons | Up to three times, no symbols, about 10 characters each. |
| 3 · list | Why each time works. |

Sources:
- The scheduling email (email connector).
- Free times on the user's calendar that respect their hours and focus time.

## The widget

Sample values; send it with `droplet_set_widget` on your widget's slug (or a new slug with `new_widget: true` if the user asked for a separate widget). Preview it and fix every warning first.

```json
{
  "slug": "pick-a-time",
  "title": "Time with Sam?",
  "subtitle": "30 min this week",
  "symbol": "calendar",
  "accent": "#0A84FF",
  "blocks": [
    {"type": "metric", "label": "Free slots", "value": "3"},
    {"type": "text", "text": "Sam asked for 30 min about the contract.", "style": "body"},
    {"type": "buttons", "items": [{"id": "t1", "label": "Tue 2:00"}, {"id": "t2", "label": "Wed 10:30"}, {"id": "t3", "label": "Thu 4:00"}]},
    {"type": "list", "title": "Why these", "items": [{"title": "Tue 2:00", "detail": "after lunch"}, {"title": "Wed 10:30", "detail": "no back-to-back"}, {"title": "Thu 4:00", "detail": "end of day"}]}
  ],
  "sizes": {"small": [0], "medium": [0, 1, 2], "large": [0, 1, 2, 3]},
  "lock": {"inline": "Pick a time with Sam", "circular": 0}
}
```

## Keep it fresh

When a scheduling request arrives. Clear it after the invite goes out.

## Handle the taps

Each tap reaches you once on `droplet_get_events` (keep a waker running, SKILL.md Process C). Answer within seconds by updating the widget.

**Tue 2:00** (`t1`)

```json
{"widget": "pick-a-time", "kind": "button", "target": "t1", "value": {"label": "Tue 2:00"}}
```

Reply with this time and send the invite, then show 'Sent. Sam has the invite'.

**Wed 10:30** (`t2`)

```json
{"widget": "pick-a-time", "kind": "button", "target": "t2", "value": {"label": "Wed 10:30"}}
```

Same for the second time.

**Thu 4:00** (`t3`)

```json
{"widget": "pick-a-time", "kind": "button", "target": "t3", "value": {"label": "Thu 4:00"}}
```

Same for the third time.

## Ask first

The tap is the approval, because the widget names who and when. Ask first if it's someone the user has never written to.

For example:

```json
{"question": "Send this time to someone you haven't written to before?", "kind": "decision", "options": ["Send", "Not now"], "risk": "medium"}
```

## Phone actions

Add the event with a phone action only if you have no calendar connector.

```json
{"kind": "event", "params": {"title": "Sam: contract", "start": "2026-11-03T14:00:00+03:00", "end": "2026-11-03T14:30:00+03:00"}}
```

Send it with `droplet_phone_action` and tell the user what you set.

## Edge cases

- No time works: say so and offer next week.
- The other person changed their mind: clear it and go back to your normal widget.

## Never

Never offer a time you haven't checked against the calendar.

## Done when

- [ ] Every sample value is replaced with real data (no "Dr. Lee" on a real widget).
- [ ] `droplet_preview_widget` shows no warnings at the sizes the user placed (`placed` in `droplet_whoami`).
- [ ] Every button has a handler and a waker is running.
- [ ] Refresh is set up as above.
- [ ] You told the user in one line what it does on its own and what it asks first.

## Same widget, other uses

- [Your call](your-call.md): Your agent reached a fork. It did the thinking, and you pick the direction from your phone.
