Automation
Automation allows users to define Jobs that are triggered by specific events, such as recurring schedules or webhook events. When a Job is triggered, its action defines how the task is executed.
Scopes
Everyone in the org can define personal automations with Jobs. Jobs created by org admins usually serve to automate tasks at the org level, especially those triggered by webhook events.
Since Webhooks are org-level resources fully managed by org admins, their access control policy must be explicitly configured to allow non-admins to define Jobs triggered by them.
Filtering and Transform
For complex triggering events, such as webhook events, additional filtering logic can be defined both in the webhook itself and in the individual Jobs triggered by it:
- Filtering in the webhook is the most efficient way to exclude undesired events globally.
- Filtering in a Job is suited to personal customizations.
Most fields in the action definition are Go templates that take the triggering event as the context (the .event object). Custom transform logic can be defined to prepare the context so that the Go templates used in the action are simpler. For example, in a Job:
spec:
transform:
language: cel
script: |
{ "data": {"appId": event.headers["x-my-app-id"]} }
action:
llm_session:
prompt: |
...{{.data.appId}}...
See Event Schema for the fields available in the event.
Executions
When a Job is triggered, its action is executed and recorded as an Execution of the Job. An Execution record only indicates whether the action has been started; it does not reflect the result of the action, nor the lifetime of the resources involved in the action. A limited number of the most recent executions can be queried for a Job.
See Also
- Job — triggers and actions
- Webhook — org-level callback URLs, filtering, and access control
- Agentic Sessions — sessions that can be started by a Job action