# Triggers

### **Event-Based Trigger**

A trigger event can be passed to advancedUserOperation, in this, a contract address, event signature, and an evaluation statement can be specified.

#### Contract Address

The address of the contract to listen to the events

**Event Signature**

The ABI of the event which you wanna trigger the event on

**Evaluation Statement**

An evaluation statement can be a small mathematical operation, you can use +, -, \*, /, <=, >=, and == to calculate or evaluate something from an event. For example in the below snippet event emits reserve0 and reserve1, for this, we can write an evaluation statement like

```javascript
const evaluationStatement = `:reserve1: / :reserve0: <= ${somerationumber}`;
```

```javascript

{
  ...signedUserOp,
  advancedUserOperation: {
    triggerEvent: {
      contractAddress: "0x123",
      eventSignature: "event Sync(uint112 reserve0, uint112 reserve1);",
      evaluationStatement
    }
  }
}
```

Check full example [here](/use-epoch-sdk/intent-automation-module/examples/schedule-eth-transfer-on-event-trigger.md)

### **Time-Based Trigger**

Transactions can also be sent based on specific time, executionStartWindow and executionEndWindow need to be specified which is compared with the block-time of a chain.

```javascript
{
    ...signedUserOp,
    executionTimeWindow : {
        executionWindowStart: 12341234,
        executionWindowEnd: 12312123
    }
}
```

Check full example [here](/use-epoch-sdk/intent-automation-module/examples/schedule-token-payment.md)

### **Every Block Trigger**

```
Coming Soon...
```

### Off-Chain Webooks Trigger

```
Coming Soon...
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.epochprotocol.xyz/use-epoch-sdk/intent-automation-module/triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
