> ## Documentation Index
> Fetch the complete documentation index at: https://helpdocs.gavel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Clio Integration

> Link your Clio Manage account to Gavel to pull contact and matter data into workflows, tag documents with Clio fields, and send output to Clio matters.

Gavel's Clio integration lets you run a document automation workflow with a single click by pulling client and matter data directly from Clio Manage. Instead of re-typing contact names, addresses, matter details, and custom field values, you select a matter and/or multiple contacts in the Gavel questionnaire, and Gavel fills in every tagged field automatically. You can also send the generated documents back to the Clio matter using Clio's maildrop address feature.

<Note>
  Workflows that contain Clio Contact or Clio Matter questions are only accessible by Builder users who are logged into your Gavel subdomain. End-users cannot access these workflows directly, which protects the sensitive data stored in Clio.
</Note>

***

## Link your Clio account to Gavel

<Steps>
  <Step title="Go to the Integrations page">
    From your Gavel dashboard, click **Integrations** in the left navigation sidebar.
  </Step>

  <Step title="Select your Clio server region (if applicable)">
    If your Clio account is hosted in Canada, the European Union, or Australia, choose the appropriate region from the dropdown. Leave the dropdown blank if you are on the default US servers.
  </Step>

  <Step title="Click Link Account">
    Click the **Link Account** button in the Clio integration module.
  </Step>

  <Step title="Authorize Gavel in Clio">
    You will be redirected to a Clio login page. Sign in to your Clio account and click **Allow Access**. You will then be returned to the Gavel integrations page.
  </Step>
</Steps>

<Info>
  Clio connections are global for your Gavel instance. Linking Clio from one Builder seat also links all other Builder seats on the same account. All new contacts, matters, and custom fields sync automatically.
</Info>

***

## Add Clio Contact and Clio Matter questions

Once your accounts are linked, you can add Clio data to any workflow by inserting a **Clio Matter** and/or multiple **Clio Contact** question types. You will only select one matter to connect but you can have multiple contacts added to the workflow.

When a user runs the workflow, the Clio question appears as a searchable list of all contact or matter records from Clio. The user selects the relevant record, and Gavel automatically maps all of its fields to your document template.

***

## Tag your documents with Clio field syntax

Clio fields appear in the [Word Gavel Document Tagger](https://helpdocs.gavel.io/workflows/word-documents#install-the-gavel-word-add-in) and use the following syntax structure:

```text theme={null}
GavelVariableName['ClioFieldSet'].ClioFieldName
```

For example, if you created a Clio Contact question with the variable name `ClioContact`, a contact's first name would be referenced as:

```text theme={null}
ClioContact['client'].firstname
```

### Common Clio field sets

| Field set       | Description                                           |
| --------------- | ----------------------------------------------------- |
| `client`        | Standard contact fields (name, address, phone, email) |
| `date`          | Date fields on the contact or matter                  |
| `custom_fields` | Any custom fields you have configured in Clio         |

### Using Clio variables in document templates

Insert Clio variable syntax using double curly braces in your document template:

```text theme={null}
{{ ClioContact['client'].firstname }} {{ ClioContact['client'].lastname }}
```

***

## Advanced Clio variable syntax

Clio passes all data to Gavel as text strings, not typed values. Use the following syntax patterns to perform calculations, format dates, and add conditional logic.

<Note>
  You can also use this syntax for [CSV questions!](https://helpdocs.gavel.io/workflows/question-types#integration-questions)
</Note>

<AccordionGroup>
  <Accordion title="Currency formatting">
    Wrap the Clio field in the `currency()` function:

    ```text theme={null}
    {{ currency(ClioContact["client"].salary) }}
    ```
  </Accordion>

  <Accordion title="Calculations with numeric fields">
    Clio numeric fields arrive as strings. Cast them to integers with `|int` before performing math:

    ```text theme={null}
    {{ (ClioContact["client"].salary|int) / 40 }}
    ```

    This example divides the salary field by 40.
  </Accordion>

  <Accordion title="Date formatting">
    Clio date fields arrive as text strings. Use `as_datetime()` and `strftime()` to format them:

    ```text theme={null}
    {{ as_datetime(ClioContact["date"].open_date).strftime("%B %d, %Y") }}
    ```

    To write the date as "the 5th day of March, 2025":

    ```text theme={null}
    the {{ ordinal_number(as_datetime(ClioContact["date"].open_date).strftime("%d"), use_word=False) }}{{ as_datetime(ClioContact["date"].open_date).strftime(" day of %B, %Y") }}
    ```
  </Accordion>

  <Accordion title="Conditional logic based on a Clio field value">
    Use standard Gavel `if` logic with Clio field references:

    ```text theme={null}
    {% if ClioContact["custom_fields"].maritalstatus == "Married" %}The client is married.{% endif %}
    ```
  </Accordion>

  <Accordion title="Conditional logic to check if a Clio field is not blank">
    ```text theme={null}
    {% if ClioContact["client"].firstname %}Conditional text if the field is not blank.{% endif %}
    ```
  </Accordion>
</AccordionGroup>

<Tip>
  To see all available Clio fields and variable names for your account, create a short "mini workflow" in Gavel with a single Clio Contact or Clio Matter question and preview it. The Word add-in will show you the complete list of field paths available.
</Tip>

<iframe src="https://www.loom.com/embed/daebbe18b03240c8b5311c35489d9920" title="Loom video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

***

##
