> For the complete documentation index, see [llms.txt](https://missiveapp.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://missiveapp.com/docs/guides/es/advanced-features/rules/examples/complex-rules.md). Agents can also search and read this documentation through its [MCP server](https://missiveapp.com/docs/~gitbook/mcp).

# Reglas complejas

Ejemplos avanzados de reglas: múltiples condiciones y acciones encadenadas.

Estos ejemplos muestran cómo combinar múltiples condiciones usando grupos anidados. Use el **>** botón para crear subgrupos con distinta lógica de coincidencia (todas vs. cualquiera).

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-3b714d92b9551daba18ecd2e95e9b38441f8d635%2Fguides-buttons.png?alt=media" alt="Rules editor showing condition groups" width="563"><figcaption></figcaption></figure></div>

## Capacitación de nuevos empleados

**Tipo de regla:** Mensaje entrante

Una empresa de logística quiere ayudar al nuevo personal de ruteo a aprender las siglas de la empresa y los requisitos de tiempo de respuesta.

**Condiciones (todas deben cumplirse):**

* Mensaje enviado a <routing@company.com> o el responsable es el nuevo empleado
* El mensaje contiene al menos una abreviatura (ETA, POD, BOL, etc.)
* La etiqueta “Driver” está presente
* El mensaje lleva en la bandeja de entrada 5 minutos o más

**Acciones:**

* Agregar nota con definiciones comunes de siglas
* Agregar nota recordando el SLA de 15 minutos

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-fd23d6308ac031d0c9d6305e7291ef1cb4e23112%2Fguides-complex-rule-1.png?alt=media" alt="Nested conditions for training rule" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-891c9e60d86ead1ec1fca75a2a8d80934a3b9b53%2Fguides-complex-rule-result.png?alt=media" alt="Result showing acronym help" width="563"><figcaption></figcaption></figure></div>

## Dar seguimiento a facturas y recordatorios de pago

**Tipo de regla:** Mensaje saliente

Un gerente de proyectos envía facturas a dos clientes y necesita dar seguimiento a los pagos.

**Condiciones (al menos una debe cumplirse):**

* El destinatario termina en @acme.com
* Los destinatarios incluyen tanto <lisa@company.com> como <arthur@company.com>
* El nombre del archivo adjunto termina en .pdf o .xls

**Acciones:**

* Agregar etiqueta “Project Beta Invoices”
* Definir el color de la conversación a amarillo
* Posponer por 15 días (recordatorio de pago)

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-3aafa9c2cab4e7c3ccc2d68bdab602c852f24865%2Fguides-complex-rule-2.png?alt=media" alt="Nested conditions for invoice tracking" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-7b3b37d044ad06c89ef7d1a83598cc02f143b412%2Fguides-complex-rule-result-2.png?alt=media" alt="Result showing label and snooze" width="563"><figcaption></figcaption></figure></div>

## Flujo rápido de tareas pendientes

**Tipo de regla:** Acciones de usuario → Nuevo comentario

Un vendedor usa un código abreviado (#td) para mover rápidamente las conversaciones a una lista de tareas pendientes.

**Condiciones (todas deben cumplirse):**

* El comentario es una tarea
* El texto del comentario termina con “#td”
* El usuario está asignado o el usuario inició la acción

**Acciones:**

* Agregar etiqueta “To-do”
* Archivar desde la bandeja de entrada

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-e5b2422da1af127d4023f220488bfaf8ba38a5ac%2Fguides-complex-rule-3.png?alt=media" alt="Nested conditions for to-do workflow" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://1728086408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1If7JwIQhfz5wGM9LiIU%2Fuploads%2Fgit-blob-06d838d81652df758b0f35a92799c5ef0a5bb24f%2Fguides-complex-rule-result-3.png?alt=media" alt="Result showing to-do label" width="563"><figcaption></figcaption></figure></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://missiveapp.com/docs/guides/es/advanced-features/rules/examples/complex-rules.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
