# Workflows & Automation

At its core, workflows in OneLens are designed to automate tasks triggered by specific conditions. These workflows help you improve governance and operational efficiency by organizing tasks in a structured sequence.

For example, workflows can automatically handle cost anomalies, policy violations, and ticket related alerts, ensuring that engineering and FinOps teams can actions taken at the right time.

### Components of Workflows

A workflow in OneLens has two main parts: Trigger and Actions.

#### [**Triggers**](#triggers)

Triggers are the events that start a workflow. They define the specific conditions under which a workflow will be activated.

#### [**Actions**](#actions)

Once a workflow is triggered, actions are carried out. These actions are the responses set up to address the issue.

### Types of Workflow Execution

#### **Series Workflow**

In a series workflow, actions are performed one after the other. The next action only begins once the previous one is complete. For instance:

* Step 1: Log the anomaly in the tracking system.
* Step 2: Notify the finance team via Slack.
* Step 3: Create a Jira ticket for investigation.

This setup ensures that each action is completed in order before the next begins.

#### **Parallel Workflow**

A parallel workflow allows multiple actions to run at the same time after the trigger is activated. For example:

* Step 1: Send a Slack notification to the finance team.
* Step 2: Email the engineering team.
* Step 3: Log the issue in the internal system.

All these actions happen simultaneously, ensuring you can notify multiple teams concurrently without waiting for each action to complete.

#### **Hybrid Workflow**

The hybrid workflow combines both series and parallel execution. For example:

* Step 1: Check if an unresolved Jira ticket exists (sequential).
* Step 2: If no ticket exists, create a new Jira ticket (sequential).
* Step 3: Simultaneously, notify the engineering team on Slack and the finance team by email (parallel).

This approach allows you to leverage both sequential and parallel actions to work together, making it suitable for more complex workflows.


---

# 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.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.
