# Check Message Labels

> Perform Check Message Labels through GMail.

Source: [https://genhealth.ai/docs/workflows/integrations/gmail/gmail_check_message_labels](https://genhealth.ai/docs/workflows/integrations/gmail/gmail_check_message_labels)

Integration: [GMail](https://genhealth.ai/docs/workflows/integrations/gmail.md)

- Handler: `gmail_check_message_labels`

## Inputs

- `message_id` — Message Id (expression, required)
  Required literal value or workflow expression.
- `labels` — Labels (text, required)
  Required text value.
- `match_mode` — Match Mode (select)
  Optional selected identifier or value.
  Default: `"all"`
  Options: Has ALL labels ("all"), Has ANY label ("any")

## Outputs

- `success` — Success
- `message_id` — Message Id
- `has_labels` — Has Labels
- `matched_labels` — Matched Labels
- `missing_labels` — Missing Labels
- `message_labels` — Message Labels
- `error` — Error
- `error_message` — Error Message
- `error_code` — Error Code

Output schema completeness: `best_effort_declared`

## Safety

- External effect: `write`
- Confirmation recommended: no
- Retry safe: no
- Dry run supported: no

## Schemas

These schemas are first-pass authoring guidance. Runtime validation remains authoritative.

### Input schema

```json
{
  "type": "object",
  "required": [
    "message_id",
    "labels"
  ],
  "properties": {
    "labels": {
      "type": "string",
      "description": "Required text value.",
      "x-workflow-field-type": "text"
    },
    "match_mode": {
      "enum": [
        "all",
        "any"
      ],
      "type": "string",
      "default": "all",
      "description": "Optional selected identifier or value.",
      "x-workflow-field-type": "select"
    },
    "message_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "success": {},
    "error_code": {},
    "has_labels": {},
    "message_id": {},
    "error_message": {},
    "matched_labels": {},
    "message_labels": {},
    "missing_labels": {}
  },
  "additionalProperties": true
}
```
