> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Is starred

> Check whether a Gmail message is currently starred.

`isStarred` checks whether one Gmail message has the `STARRED` system label. Use the boolean result to route starred mail or avoid applying the same state twice.

## Example

Remove the star from newly received messages that are already starred:

```ts theme={null}
import { automation, branch } from "automate.ax"
import { isStarred, onNewEmail, unstar } from "automate.ax/gmail"

export default automation("Clear stars from new Gmail messages", () => {
  const email = onNewEmail()
  const starred = isStarred({ messageId: email.messageId })

  branch(starred, () => {
    unstar({ messageIds: email.messageId })
  })
})
```

## Inputs

| Name        | Type                                 | Required | Description                                                                      |
| ----------- | ------------------------------------ | -------- | -------------------------------------------------------------------------------- |
| `messageId` | `string`                             | Yes      | Immutable Gmail message ID to inspect.                                           |
| `account`   | `string \| Google account reference` | No       | Google account binding to use. Defaults to the project's default Google account. |

Every input field also accepts a compatible `Signal`; the example passes `email.messageId` directly.

## Output

The action returns a `Signal<boolean>` indicating whether the message has Gmail's `STARRED` label when the action runs.

This checks Gmail's `STARRED` state but does not distinguish the visual star styles configured in Gmail.
