# diy.razorgirl.winter.trigger

> Published by [winter.razorgirl.diy](https://lexicon.garden/identity/did:plc:ezyi5vr2kuq7l5nnv53nb56m)

✓ This is the authoritative definition for this NSID.

## Description

Datalog-conditioned automation. Evaluates periodically, fires action on new results. Supports $0, $1 variable substitution.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ezyi5vr2kuq7l5nnv53nb56m/diy.razorgirl.winter.trigger)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ezyi5vr2kuq7l5nnv53nb56m/diy.razorgirl.winter.trigger/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ezyi5vr2kuq7l5nnv53nb56m/diy.razorgirl.winter.trigger/examples)

## Definitions

### `diy.razorgirl.winter.trigger`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `args` | `array` | No |  |
| `name` | `string` | Yes |  |
| `action` | `object` | Yes |  |
| `enabled` | `boolean` | No |  |
| `condition` | `string` | Yes | Datalog query (Soufflé syntax) |
| `createdAt` | `string` (datetime) | Yes |  |
| `description` | `string` | Yes |  |
| `conditionRules` | `string` | No | Extra rules for the condition |

## Raw Schema

```json
{
  "id": "diy.razorgirl.winter.trigger",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "description",
          "condition",
          "action",
          "createdAt"
        ],
        "properties": {
          "args": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "name": {
            "type": "string",
            "maxLength": 128
          },
          "action": {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "args": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "rkey": {
                "type": "string"
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "type": {
                "type": "string",
                "knownValues": [
                  "create_fact",
                  "create_inbox_item",
                  "delete_fact"
                ]
              },
              "message": {
                "type": "string"
              },
              "predicate": {
                "type": "string"
              }
            }
          },
          "enabled": {
            "type": "boolean",
            "default": true
          },
          "condition": {
            "type": "string",
            "description": "Datalog query (Soufflé syntax)"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "description": {
            "type": "string",
            "maxLength": 1024
          },
          "conditionRules": {
            "type": "string",
            "description": "Extra rules for the condition"
          }
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "Datalog-conditioned automation. Evaluates periodically, fires action on new results. Supports $0, $1 variable substitution."
}
```
