> ## Documentation Index
> Fetch the complete documentation index at: https://hoopdev-fix-add-missing-mechanic-for-session-download-button.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Runbooks

> Automate operational tasks with reusable, auditable templates

<Frame>
  <img src="https://mintcdn.com/hoopdev-fix-add-missing-mechanic-for-session-download-button/sFiCJBagbVJ6Ho5V/images/learn/features/runbooks.png?fit=max&auto=format&n=sFiCJBagbVJ6Ho5V&q=85&s=a18e73d3c7942b5b4cb627c39f3c9883" alt="Runbooks" width="1408" height="768" data-path="images/learn/features/runbooks.png" />
</Frame>

Hoop.dev's Runbooks enable your organization to automate operational tasks using reusable, version-controlled templates. By leveraging templates sourced from your own git repositories, teams can execute complex workflows with consistency, auditability, and minimal manual intervention.

## Key Features

### Template-Driven Automation

* Create and manage runbook templates in your own git repositories
* Standardize operational tasks across teams and environments
* Version control for all automation logic

### Dynamic Input Handling

* Define required and optional parameters for each runbook
* Input validation and descriptions for guided execution
* Support for default values and type enforcement

### Secure, Auditable Execution

* Runbooks execute against secure connection runtimes
* Full audit trail of every runbook execution
* Integrates with access controls and session recording for compliance

## Benefits

* **Reduced Manual Effort**: Automate repetitive or complex tasks, freeing up valuable engineering time
* **Consistency**: Ensure tasks are performed the same way every time, reducing human error
* **Compliance**: Maintain a clear record of what was run, by whom, and with what parameters
* **Visibility**: Gain insights into runbook usage and execution history

## Integration with Other Features

Runbooks work seamlessly with other Hoop.dev features:

* **Session Recording**: Every runbook execution can be recorded for full auditability
* **Access Control**: Restrict who can run or modify runbooks based on roles and permissions
* **Guardrails**: Enforce policies and prevent risky operations within runbook executions

## Example

```sql theme={null}
SELECT customerid, firstname, lastname, gender, country, phone, email, income
FROM customers
WHERE customerid = {{ .customer_id
                    | description "the id of the customer"
                    | required "customer_id is required"
                    | type "number"
                    | squote }}
AND country = {{ .country
                | type "text"
                | description "the country code US; BR, etc"
                | default "US"
                | squote }}
```

The runbook above generates two inputs:

* customer\_id
  * input-type: number
  * required: true
  * description: the id of the customer
* country
  * input-type: text
  * required: false
  * default-value: US
  * description: the country code US; BR, etc

## Configuration

For detailed configuration instructions see [Runbooks Configuration](/setup/configuration/runbooks-configuration) page.
