> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilebox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations

> Trigger workflow jobs automatically in response to external events such as schedules or file changes, enabling near-real-time data processing pipelines.

<Note>
  This feature is only available in the Python SDK.
</Note>

## Introduction

Tilebox Workflows can execute jobs in two ways: a one-time execution triggered by a user, typically a batch processing, and near-real-time execution based on specific external events.
By defining trigger conditions, you can automatically submit jobs based on external events.

Tilebox Workflows currently supports the following trigger conditions:

<Columns cols={1}>
  <Card title="Cron Triggers" icon="clock" href="/workflows/near-real-time/cron" horizontal>
    Trigger jobs based on a Cron schedule.
  </Card>

  <Card title="Storage Event Triggers" icon="right-to-line" href="/workflows/near-real-time/storage-events" horizontal>
    Trigger jobs after objects are created or modified in a storage location such as a cloud bucket.
  </Card>
</Columns>

<Info>
  Dataset Event Triggers, which will trigger jobs when new data points are ingested into a Tilebox dataset, are on the roadmap. Stay tuned for updates.
</Info>

## Automations

To create a trigger, define a special task that serves as a prototype. In response to a trigger condition met, this task will be submitted as a new job. Such tasks are referred to as automations.

Each automation has a [task identifier](/workflows/concepts/tasks#task-identifiers), a [version](/workflows/concepts/tasks#semantic-versioning), and [input parameters](/workflows/concepts/tasks#input-parameters), just like regular tasks.
Automations also automatically provide a special `trigger` attribute that contains information about the event that initiated the task's execution.

<Note>
  Go doesn't support registering automations yet, please use python or the console instead.
</Note>

## Automation Client

The Tilebox Workflows client includes a sub-client for managing automations. You can create this sub-client by calling the `automations` method on the main client instance.

### Listing Registered Automations

To list all registered automations, use the `all` method on the automation client.

```python Python theme={"system"}
from tilebox.workflows import Client

client = Client()
automations = client.automations()

automations = automations.all()
print(automations)
```

```plaintext Output theme={"system"}
[
    AutomationPrototype(
        name='Run MyCronTask every hour at 15 minutes past the hour',
        prototype=TaskSubmission(
            cluster_slug='dev-cluster',
            identifier=TaskIdentifier(name='MyCronTask', version='v0.0'),
            input=b'{"message": "Hello"},
            dependencies=[],
            display='MyCronTask',
            max_retries=0), 
        storage_event_triggers=[],
        cron_triggers=[CronTrigger(schedule='15 * * * *')],
    )
]
```

### Registering Automations

To register an automation, use the `create_*_automation` methods specific to each trigger type provided by the automation client. Refer to the documentation for each trigger type for more details.

<Columns>
  <Card title="Cron Triggers" icon="clock" href="/workflows/near-real-time/cron" horizontal />

  <Card title="Storage Event Triggers" icon="right-to-line" href="/workflows/near-real-time/storage-events" horizontal />
</Columns>

## Overview in the Tilebox Console

You can also use the Tilebox Console to manage automations. Visit [the automations section](https://console.tilebox.com/workflows/automations) to check it out.

<Frame>
  <img src="https://mintcdn.com/tilebox/TYquvc9froFIydg1/assets/console/automations-light.png?fit=max&auto=format&n=TYquvc9froFIydg1&q=85&s=b3c6aaed057c8b36d27cf3ba14f1687a" alt="Tilebox Workflows automations in the Tilebox Console" className="dark:hidden" width="1536" height="970" data-path="assets/console/automations-light.png" />

  <img src="https://mintcdn.com/tilebox/TYquvc9froFIydg1/assets/console/automations-dark.png?fit=max&auto=format&n=TYquvc9froFIydg1&q=85&s=adc6ad8af3aa81ae3ec3af701eadb6e0" alt="Tilebox Workflows automations in the Tilebox Console" className="hidden dark:block" width="1536" height="970" data-path="assets/console/automations-dark.png" />
</Frame>

You can also register new automations or edit and delete existing ones directly from the console.

<Frame>
  <img src="https://mintcdn.com/tilebox/TYquvc9froFIydg1/assets/console/automation-edit-light.png?fit=max&auto=format&n=TYquvc9froFIydg1&q=85&s=849f480abc99cd4c1dd5a598b9509c4a" alt="Tilebox Workflows automations in the Tilebox Console" className="dark:hidden" width="1536" height="970" data-path="assets/console/automation-edit-light.png" />

  <img src="https://mintcdn.com/tilebox/TYquvc9froFIydg1/assets/console/automation-edit-dark.png?fit=max&auto=format&n=TYquvc9froFIydg1&q=85&s=ef76cdfa14c3b96a5ed32564cef95366" alt="Tilebox Workflows automations in the Tilebox Console" className="hidden dark:block" width="1536" height="970" data-path="assets/console/automation-edit-dark.png" />
</Frame>
