Automations are now on v2. For documentation on the legacy v1 syntax, see Automations (Legacy).
Entity properties
Access built-in properties onself with dot notation. All are read-only except self.title and self.status_tag.
| Property | Description |
|---|---|
self.title | Entity title (writable) |
self.status_tag | Status tag (writable) — set as (label, style) tuple |
self.id | Entity UUID |
self.index | Global creation index (integer) |
self.type_index | Index within its type (instances only) |
self.template_index | Index within its template (instances only) |
self.kind | "type", "template", "variant", or "instance" |
self.is_instance / self.is_template | Kind checks |
self.status | "EDITABLE", "IN_REVIEW", or "FINISHED" |
self.version | Published version string, None if draft |
self.created_at / self.updated_at | Timestamps |
self.created_by | User who created the entity |
self.type / self.template | Parent type or template entity |
self.referenced_by | Entities that reference this one (list) |
Field access
Access fields using bracket notation with the field name exactly as it appears in the UI:self.fields["Name"] to get the field object with .value and .config:
self["Name"] is shorthand for self.fields["Name"].value.
Reference fields
Reference fields link to other entities. When a reference field is configured to allow multiple references,.value is a list of entities. When configured for a single reference, .value is a single entity (or None).
Backlinks (referenced_by)
Access entities that reference the current entity viaself.referenced_by:
self.referenced_by returns a read-only list of entities that have this entity in any of their reference fields (up to 100 most recent).
Status tags
Set the entity’s status tag with a tuple of(label, style):
Title
Set the entity’s title directly:self.title on an instance, the title becomes read-only on that instance.
Controlled fields
When you save an automation, Seal analyses the code to determine which fields it writes to and marks them as controlled. Controlled fields cannot be manually edited — they only accept updates from the automation. This ensures that calculated values, IDs, and other derived data stay consistent and aren’t accidentally overwritten. For example, if your automation writes toself["Record ID"], that field becomes controlled and users will see it as read-only. If you remove the write from the automation and re-save, the field becomes editable again.
Some properties like title are only controlled on instances, not on templates. Other field values are controlled wherever the automation runs.
Available globals
Automations have access to a limited set of globals:| Global | Description |
|---|---|
self | The current entity — read and write fields, status tag, and title |
skip() | Exit the automation early without making changes |
datetime | Python’s datetime module for date/time operations |
timedelta | Python’s timedelta for duration calculations |