---
sidebar:
  hidden: true
title: roboto.domain.triggers.operations
---
## Module Contents

### CreateTriggerRequest

```python
class roboto.domain.triggers.operations.CreateTriggerRequest(/, **data: Any)
```

`from roboto.domain.triggers import CreateTriggerRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/operations.py#L23-L47)

Bases: `pydantic.BaseModel`

Request payload to create a trigger.

The server assigns identity and audit fields, and runs [`TriggerValidator`](/reference/python-sdk/roboto/domain/triggers/validation#roboto.domain.triggers.validation.TriggerValidator) over the cross-field rules (exposed roots, `once_per` legality, target placeholders) before persisting.

Triggered work runs as the organization's actions service user; a trigger cannot run its targets as anyone else.

**Parameters**

- **data** (`Any`)

**Attributes**

- **CreateTriggerRequest.condition** (`roboto.query.ConditionType | None`) = `None`: Optional predicate over the firing's namespace.
- **CreateTriggerRequest.enabled** (`bool`) = `True`: Whether the trigger should be active immediately after creation.
- **CreateTriggerRequest.fires_on** (`roboto.domain.triggers.sources.TriggerSource`): What makes the trigger fire: an event subscription or a schedule.
- **CreateTriggerRequest.name** (`str`) = `None`: Trigger name. Unique within the caller's organization.
- **CreateTriggerRequest.targets** (`list[roboto.domain.triggers.targets.TriggerTargetSpec]`): What the trigger dispatches when it fires. At least one.

### MAX_TRIGGER_NAME_LENGTH

```python
roboto.domain.triggers.operations.MAX_TRIGGER_NAME_LENGTH = 256
```

`from roboto.domain.triggers import MAX_TRIGGER_NAME_LENGTH`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/operations.py#L19-L19)

Maximum trigger name length.

### TRIGGER_NAME_PATTERN

```python
roboto.domain.triggers.operations.TRIGGER_NAME_PATTERN = '[\\w\\-]+'
```

`from roboto.domain.triggers import TRIGGER_NAME_PATTERN`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/operations.py#L16-L16)

Legal trigger names: word characters and hyphens.

### UpdateTriggerRequest

```python
class roboto.domain.triggers.operations.UpdateTriggerRequest(/, **data: Any)
```

`from roboto.domain.triggers import UpdateTriggerRequest`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/triggers/operations.py#L50-L74)

Bases: `pydantic.BaseModel`

Request payload to update a trigger.

Only fields explicitly provided are changed; the [`NotSetType`](/reference/python-sdk/roboto/sentinels#roboto.sentinels.NotSetType) sentinel distinguishes "field omitted" from "field set to `None`". The updated record must still satisfy every [`TriggerValidator`](/reference/python-sdk/roboto/domain/triggers/validation#roboto.domain.triggers.validation.TriggerValidator) rule.

**Parameters**

- **data** (`Any`)

**Attributes**

- **UpdateTriggerRequest.condition** (`roboto.query.ConditionType | roboto.sentinels.NotSetType | None`): New condition; explicit `None` clears it.
- **UpdateTriggerRequest.enabled** (`bool | roboto.sentinels.NotSetType`): New enabled status.
- **UpdateTriggerRequest.fires_on** (`roboto.domain.triggers.sources.TriggerSource | roboto.sentinels.NotSetType`): New firing source. Replaces the whole source: an event subscription's events and `once_per` change together, and a trigger may switch between events and a schedule.
- **UpdateTriggerRequest.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **UpdateTriggerRequest.targets** (`list[roboto.domain.triggers.targets.TriggerTargetSpec] | roboto.sentinels.NotSetType`): New target list. A target whose `target_id` is referenced by existing dispatches must keep that id.
