# Triggers

By leveraging triggers, you can automate responses to cost anomalies, ticket updates, and scheduled reports, ensuring timely and effective decision-making.

## **Core Triggers**

Core triggers detect critical events within OneLens, allowing you to automate workflows based on fundamental cost monitoring and anomaly detection mechanisms.

### **Anomaly Detection**

#### **1. Anomaly is Detected**

Activate workflows when an anomaly is identified. You can refine the trigger with conditions such as:

* **Anomaly Impact**: Cost Impact ($), Cost Impact (%)
* **Resource**: Account, Region, Service
* **Cost Center**: Cost Center, Category

  <figure><img src="/files/IrQxdko6IVoDsf64xUMp" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="success" %}

## **Example**

Automatically notify FinOps teams when unexpected cloud cost spikes are detected for critical services.
{% endhint %}

### **Tickets**

#### **1. Tickets**

* **Ticket is Created/Updated**

  These allow you to trigger workflows when tickets are generated or modified. Conditions can be based on:

  * **Ticket**: Status, Category
    * **Recommendation**: Potential Savings, Effort Required
    * **Resource**: Name, Account, Region, Service, Tags
    * **Cost Center**: Cost Center, Category
    * **Policy**: Name, Category

#### **2. New Ticket Digest**

* **Daily**, **Weekly**, or **Monthly**\
  Use this to receive a digest report of all newly created tickets that meet your specified conditions.

#### **3. All Tickets Digest**

* **Daily**, **Weekly**, or **Monthly**\
  Generate a periodic report for all tickets — not just the new ones — filtered by your chosen parameters.

  <figure><img src="/files/L1HfYGp7tqTeAMLlIjHg" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="success" %}

## **Example**

* Trigger Slack alerts to engineering managers when high-effort, high-savings tickets are generated for their services.
* Auto-update Jira issues when the status of cost optimization tickets changes in OneLens.
* Send summarized reports of newly raised cost-saving opportunities to finance leads on a weekly basis.
* Share a complete digest of all ongoing optimization tickets with cross-functional teams for better visibility.
  {% endhint %}

### **Cost Alerts**

Automatically trigger workflows when account-level, service-level, or cost center-level cost reports are generated. These are not real-time alerts but scheduled **Cost Reports** that summarize key changes.

* **Account Wise**
  * Daily, Weekly, Monthly
* **Service Wise**
  * Daily, Weekly, Monthly
* **Cost Centre Wise**

  * Daily, Weekly, Monthly

  <figure><img src="/files/mjb46AQPbFL7iDOLcCK2" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="success" %}

## **Example**

Route cost center-level reports to business unit heads for performance and variance analysis.
{% endhint %}

### **Resource**

**New Resource Digest**

* **Daily**, **Weekly**, or **Monthly**\
  Start workflows based on discovery of newly created resources. Ideal for governance or security-related automation.

  <figure><img src="/files/Xl4A09YrIsZq9cSDDMrB" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="success" %}

## **Example**

Inform platform teams about newly launched resources to ensure tagging compliance and governance.
{% endhint %}


---

# 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.onelens.cloud/automate/workflows-and-automation/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.
