# Modify Message Labels

> Perform Modify Message Labels through GMail.

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

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

- Handler: `gmail_modify_message_labels`

## Inputs

- `message_id` — Message Id (expression, required)
  Required literal value or workflow expression.
- `add_labels` — Add Labels (text)
  Optional text value.
- `remove_labels` — Remove Labels (text)
  Optional text value.
- `create_missing_labels` — Create Missing Labels (boolean)
  Optional true-or-false value.
  Default: `false`
- `dry_run` — Dry Run (boolean)
  Optional true-or-false value.
  Default: `false`

## Outputs

- `success` — Success
- `message_id` — Message Id
- `added_labels` — Added Labels
- `removed_labels` — Removed Labels
- `created_labels` — Created Labels
- `skipped_labels` — Skipped Labels
- `dry_run` — Dry Run
- `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: yes

## Schemas

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

### Input schema

```json
{
  "type": "object",
  "required": [
    "message_id"
  ],
  "properties": {
    "dry_run": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    },
    "add_labels": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "message_id": {
      "description": "Required literal value or workflow expression.",
      "x-workflow-field-type": "expression"
    },
    "remove_labels": {
      "type": "string",
      "description": "Optional text value.",
      "x-workflow-field-type": "text"
    },
    "create_missing_labels": {
      "type": "boolean",
      "default": false,
      "description": "Optional true-or-false value.",
      "x-workflow-field-type": "boolean"
    }
  },
  "additionalProperties": false
}
```

### Output schema

```json
{
  "type": "object",
  "properties": {
    "error": {},
    "dry_run": {},
    "success": {},
    "error_code": {},
    "message_id": {},
    "added_labels": {},
    "error_message": {},
    "created_labels": {},
    "removed_labels": {},
    "skipped_labels": {}
  },
  "additionalProperties": true
}
```
