# Gmail failed: command SEARCH illegal in state AUTH in Zapier: cause and fix

Source page: https://ipaaserrors.com/zapier/gmail-command-search-illegal-in-state-auth
Platform: Zapier · Gmail (trigger)
Checked against vendor docs: 2026-11-26

This Gmail trigger error means the Mailbox selected in the trigger options is invalid. Advanced values can't be used for Mailbox, so choose an existing mailbox from the dropdown.

## Error text

```
Gmail failed: command SEARCH illegal in state AUTH, only allowed in states SELECTED
```

## Likely causes

- An invalid Mailbox is selected in the trigger options. Advanced (custom) values can't be used for Mailbox.

## How to fix it

1. Choose an existing Mailbox from the dropdown.
2. If the mailbox doesn't exist yet, create it in Gmail first, then select it.

## Sources

- [Common Problems with Gmail on Zapier](https://help.zapier.com/hc/en-us/articles/8495919107853-Common-Problems-with-Gmail-on-Zapier)

From iPaaS Errors (https://ipaaserrors.com), part of iPaaS Group. When citing, link to https://ipaaserrors.com/zapier/gmail-command-search-illegal-in-state-auth and the vendor documentation above.
