# Notetaker states and meeting states

Source: https://developer.nylas.com/docs/v3/notetaker/states/

A Notetaker has two status fields. `state` is the Notetaker's current phase, such as `scheduled`, `attending`, or `media_available`. `meeting_state` is the reason for that phase. For example, a bot that a participant removed has `state: disconnected` and `meeting_state: kicked`. A bot that stayed until the meeting ended has `meeting_state: meeting_ended`.

## How `state` and `meeting_state` work together

`meeting_state` is present only while the bot joins, attends, or leaves a meeting. The API omits it at other times, for example while `state` is `scheduled`.

Both fields appear in:

- The Notetaker object, returned by [`GET /v3/grants/<NYLAS_GRANT_ID>/notetakers/<NOTETAKER_ID>`](/docs/reference/api/notetaker/get-notetaker/), the list endpoints, and the standalone equivalents.
- [`notetaker.meeting_state` webhook notifications](/docs/reference/notifications/notetaker/notetaker-meeting_state/), sent each time the bot's state changes while it joins, attends, or leaves a meeting.
- The [history endpoint](/docs/v3/notetaker/troubleshooting/#get-the-history-of-a-notetaker), which returns every `notetaker.meeting_state` event for one Notetaker, in order.

The [Notetaker lifecycle diagram](/docs/v3/notetaker/#how-notetaker-works) shows how a Notetaker moves between states.

## Notetaker state values

`state` has 12 values. Webhook notifications and history events use different names for 3 of them: `processing` for `media_processing`, `available` for `media_available`, and `none` for `no_media`.

| `state`             | Name in webhooks and history | What it means                                                                                                                                   |
| ------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `scheduled`         | `scheduled`                  | The Notetaker is waiting for its `join_time`. You can still update or cancel it.                                                                |
| `connecting`        | `connecting`                 | The bot is opening the meeting link and asking to join. `meeting_state` says whether it's still starting up or waiting to be admitted.          |
| `waiting_for_entry` | `waiting_for_entry`          | The bot is waiting to be admitted. Nylas now reports this phase as `connecting` with `meeting_state` set to `waiting_for_entry`, so check both. |
| `attending`         | `attending`                  | The bot is in the meeting and recording.                                                                                                        |
| `disconnected`      | `disconnected`               | The bot left the meeting. `meeting_state` gives the reason. Nylas still processes the media the bot recorded.                                   |
| `failed_entry`      | `failed_entry`               | The bot didn't join the meeting and recorded nothing. `meeting_state` gives the reason. This state is final.                                    |
| `worker_finished`   | `worker_finished`            | The bot left the meeting. Media processing starts next.                                                                                         |
| `media_processing`  | `processing`                 | Nylas is building the recording, transcript, and any summary or action items.                                                                   |
| `media_available`   | `available`                  | Media is ready to download from the [media endpoint](/docs/v3/notetaker/media-handling/).                                                       |
| `no_media`          | `none`                       | The bot joined the meeting but has nothing to process, for example because recording was off.                                                   |
| `media_error`       | `media_error`                | Media processing failed and no files are available.                                                                                             |
| `media_deleted`     | `media_deleted`              | The [retention window](/docs/v3/notetaker/retention-policies/) ended and Nylas deleted the media.                                               |

To filter the list endpoints by state, use the `state` query parameter. To match more than one state, repeat the parameter.

## `meeting_state` values while Notetaker joins and records

These 3 `meeting_state` values appear while the bot joins and records.

| `state`      | `meeting_state`     | What it means                                                                       |
| ------------ | ------------------- | ----------------------------------------------------------------------------------- |
| `connecting` | `dispatched`        | Nylas sent the bot to the meeting. The bot is starting to join.                     |
| `connecting` | `waiting_for_entry` | The bot asked to join and is in a lobby or waiting room. It waits about 10 minutes. |
| `attending`  | `recording_active`  | The bot is in the meeting and recording.                                            |

Notetaker joins as a guest. If the meeting has a waiting room, or only admits people in the host's organization, someone in the meeting must admit the bot.

## Why Notetaker left a meeting

When `state` is `disconnected`, `meeting_state` is one of these 8 values. The bot recorded until it left. Nylas processes that media and sends [`notetaker.media` notifications](/docs/reference/notifications/notetaker/notetaker-media/).

| `meeting_state`         | What it means                                                                                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `meeting_ended`         | The meeting ended.                                                                                                                                                        |
| `no_participants`       | Every other participant left the meeting.                                                                                                                                 |
| `no_activity`           | The bot left after a period of silence. The default is 300 seconds, set by `leave_after_silence_seconds`. See [silence detection](/docs/v3/notetaker/#silence-detection). |
| `kicked`                | A participant removed the bot from the meeting.                                                                                                                           |
| `api_request`           | Your app [removed the bot with a leave request](/docs/v3/notetaker/#remove-notetaker-from-a-meeting).                                                                     |
| `cancelled`             | The Notetaker was cancelled while it was in the meeting.                                                                                                                  |
| `webinar_not_supported` | The meeting is a Zoom webinar. Notetaker doesn't support webinars.                                                                                                        |
| `error`                 | The bot disconnected for another reason, for example a network problem.                                                                                                   |

`meeting_ended`, `no_participants`, and `no_activity` are normal endings.

## Why Notetaker couldn't join a meeting

When `state` is `failed_entry`, the bot didn't join and recorded nothing. `meeting_state` is one of these 17 values.

| `meeting_state`                 | What it means                                                                         | Who can fix it                      |
| ------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------- |
| `no_response`                   | Nobody admitted the bot within about 10 minutes.                                      | The host, by admitting the bot      |
| `entry_denied`                  | Someone in the meeting denied the bot's request to join.                              | The host                            |
| `meeting_capacity_reached`      | The meeting already has the maximum number of participants.                           | The host                            |
| `host_sign_in_required`         | The meeting only admits participants who are signed in.                               | The host, in meeting settings       |
| `meeting_passcode_required`     | The meeting needs a passcode that the link doesn't include.                           | Whoever scheduled it                |
| `meeting_email_required`        | The meeting asks participants for an email address before they join.                  | The host, in meeting settings       |
| `meeting_registration_required` | The meeting requires registration before joining.                                     | The host, in meeting settings       |
| `host_meeting_in_progress`      | The host has another meeting in progress.                                             | The host                            |
| `webinar_not_supported`         | The meeting is a Zoom webinar. Notetaker doesn't support webinars.                    | Not fixable                         |
| `bad_meeting_link`              | The meeting link is invalid, or the calendar event has no valid conferencing details. | Whoever scheduled it                |
| `bad_meeting_code`              | The meeting code is invalid or the meeting isn't active.                              | Whoever scheduled it                |
| `invalid_token`                 | The Zoom meeting link's token is invalid or expired.                                  | Whoever scheduled it                |
| `meeting_in_past`               | The calendar event had already ended.                                                 | Whoever scheduled it                |
| `no_participants`               | Every participant declined the calendar event.                                        | Nobody, the meeting isn't happening |
| `cancelled`                     | The Notetaker or its calendar event was cancelled before the bot joined.              | Nobody                              |
| `error`                         | The bot couldn't join, and there's no more specific reason.                           | Retry, then contact Nylas Support   |
| `internal_error`                | The bot couldn't join because of an error on the Nylas side.                          | Retry, then contact Nylas Support   |

Nylas doesn't retry a `failed_entry` Notetaker. To record the meeting after you fix the cause, create a new Notetaker. To get notified when a join fails, subscribe to [`notetaker.meeting_state`](/docs/reference/notifications/notetaker/notetaker-meeting_state/) and check for `state: failed_entry`.

## Requests you can make in each state

Some Notetaker requests work only in certain states. These rules apply to grant Notetakers and standalone Notetakers.

| Request                                                                                | Works when `state` is                             | Response in other states                                                                                                                   |
| -------------------------------------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [Update a Notetaker](/docs/reference/api/notetaker/update-notetaker/)                  | `scheduled`                                       | `400 Bad Request` with the message `notetaker is not in scheduled state`                                                                   |
| [Cancel a Notetaker](/docs/v3/notetaker/#cancel-a-notetaker-before-it-joins)           | `scheduled`, `connecting`, or `waiting_for_entry` | `409 Conflict`                                                                                                                             |
| [Remove Notetaker from a meeting](/docs/v3/notetaker/#remove-notetaker-from-a-meeting) | `attending`                                       | After the bot leaves, `200 OK` with a message that the bot already left                                                                    |
| [Delete a Notetaker](/docs/v3/notetaker/#delete-a-notetaker)                           | Any state                                         | None                                                                                                                                       |
| [Download media](/docs/v3/notetaker/media-handling/)                                   | `media_available`                                 | `404` in earlier states, including `media_processing` and `media_error`, and for `no_media`. `410` for `media_deleted` and `failed_entry`. |

Before the bot joins, use cancel instead of the leave request.

## Track state changes with webhooks

These webhook notifications carry `state`:

- [`notetaker.created`](/docs/reference/notifications/notetaker/notetaker-created/) carries `scheduled`. If the join time is less than 5 minutes away, it carries `connecting`.
- [`notetaker.updated`](/docs/reference/notifications/notetaker/notetaker-updated/) carries `scheduled`.
- [`notetaker.meeting_state`](/docs/reference/notifications/notetaker/notetaker-meeting_state/) carries `connecting`, `attending`, `disconnected`, or `failed_entry`, plus `meeting_state`.
- [`notetaker.media`](/docs/reference/notifications/notetaker/notetaker-media/) carries `processing`, `available`, `none`, `media_error`, or `media_deleted`.

Notifications can arrive out of order. Each payload's `time` field is the Unix timestamp, in seconds, of the state change. Sort events by `time`, not by arrival order. To get a Notetaker's current state, make a [`GET /v3/grants/<NYLAS_GRANT_ID>/notetakers/<NOTETAKER_ID>`](/docs/reference/api/notetaker/get-notetaker/) request. To get every past `notetaker.meeting_state` event for one Notetaker, use the [history endpoint](/docs/v3/notetaker/troubleshooting/#get-the-history-of-a-notetaker).

## What's next

- [Troubleshoot Notetaker](/docs/v3/notetaker/troubleshooting/) to read a bot's history and diagnose common problems.
- [`notetaker.meeting_state` notification reference](/docs/reference/notifications/notetaker/notetaker-meeting_state/) for the full webhook payload.
- [Handling Notetaker media files](/docs/v3/notetaker/media-handling/) for what happens after the bot leaves.
- [Notetaker API reference](/docs/reference/api/notetaker/) for every endpoint that returns `state` and `meeting_state`.