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

# Google Sheets extension

> Run Databar enrichments and waterfalls directly inside Google Sheets.

The Databar Google Sheets Extension brings enrichment functionality directly into your spreadsheets. Use custom formulas and an interactive sidebar to enrich data, run waterfalls, and check your credit balance, all without leaving Google Sheets.

## Installation

Install the extension from the [Google Workspace Marketplace](https://workspace.google.com/marketplace). Once installed, open any Google Sheet and the **Databar.ai** menu appears in the menu bar.

## Configuration

<Steps>
  <Step title="Set your API key">
    Go to **Databar.ai > Configure API Key** in the menu bar. Paste your Databar API key and save. You can also set the key from the sidebar.
  </Step>

  <Step title="Test the connection">
    Click **Databar.ai > Test Connection** to verify your key is valid and the extension can reach the Databar API.
  </Step>
</Steps>

To edit or remove your API key later, open the sidebar and use the key management controls.

## Sidebar

Open the sidebar via **Databar.ai > Open Sidebar**. The sidebar lets you:

* Browse and search available enrichments and waterfalls
* Configure parameters and generate formulas with the correct syntax
* Track enrichment executions in the Jobs panel
* Check your current credit balance

## Formulas

<AccordionGroup>
  <Accordion title="DATABAR_ENRICH">
    Run a single enrichment and return the full JSON result in one cell.

    ```
    =DATABAR_ENRICH(enrichmentId, "paramName1", paramValue1, "paramName2", paramValue2, ...)
    ```

    **Example**: verify an email address:

    ```
    =DATABAR_ENRICH(10, "email", A2)
    ```

    To bypass the cache and force a fresh API call, add `"BYPASS_CACHE"` as the last parameter:

    ```
    =DATABAR_ENRICH(10, "email", A2, "BYPASS_CACHE")
    ```
  </Accordion>

  <Accordion title="DATABAR_ENRICH_EXPAND">
    Run an enrichment and expand the result across multiple cells. Row 1 contains the headers, Row 2 contains the values.

    ```
    =DATABAR_ENRICH_EXPAND(enrichmentId, "paramName1", paramValue1, ...)
    ```

    Optionally filter which fields are returned by adding a comma-separated list of field names:

    ```
    =DATABAR_ENRICH_EXPAND(10, "email", A2, "status,score,domain")
    ```
  </Accordion>

  <Accordion title="DATABAR_WATERFALL">
    Run a waterfall across multiple providers and return the result. Cell 1 contains the concatenated result, cell 2 contains the full JSON.

    ```
    =DATABAR_WATERFALL("waterfallId", "paramName1", paramValue1, ..., "enrichmentIds")
    ```

    **Example**: find an email using three providers:

    ```
    =DATABAR_WATERFALL("email_getter", "first_name", A2, "last_name", B2, "company", C2, "612,833,87")
    ```

    Provider order matters. Place your cheapest or highest-coverage providers first to minimize cost.
  </Accordion>

  <Accordion title="DATABAR_WATERFALL_EXPAND">
    Same as `DATABAR_WATERFALL`, but expands the result across multiple cells (Row 1: headers, Row 2: values) instead of returning JSON.

    ```
    =DATABAR_WATERFALL_EXPAND("waterfallId", "paramName1", paramValue1, ..., "enrichmentIds")
    ```
  </Accordion>

  <Accordion title="DATABAR_JSON_EXTRACT">
    Extract a specific value from a JSON result using dot notation.

    ```
    =DATABAR_JSON_EXTRACT(jsonCell, "path")
    ```

    **Example**: extract an email from an enrichment result:

    ```
    =DATABAR_JSON_EXTRACT(A2, "result.email")
    ```
  </Accordion>

  <Accordion title="DATABAR_STATUS">
    Check the status of a long-running enrichment task.

    ```
    =DATABAR_STATUS(taskId)
    ```

    Use this when a formula returns `"PROCESSING"` to monitor progress.
  </Accordion>
</AccordionGroup>

## Batch processing

For datasets with 100+ rows, use the Batch Enrich tool instead of individual formulas.

<Steps>
  <Step title="Open the batch tool">
    Go to **Databar.ai > Tools > Batch Enrich**.
  </Step>

  <Step title="Configure the batch">
    Select your input range, enter the enrichment ID, and specify the parameter name.
  </Step>

  <Step title="Review the cost estimate">
    The tool displays an estimated credit cost before you run. Confirm to proceed.
  </Step>

  <Step title="Run">
    Results are written as static values (they never recalculate). Progress updates appear every 10 rows.
  </Step>
</Steps>

## Caching

The extension caches results for **24 hours** at three levels: user, document, and script. If the same input is sent again within that window, the cached result is returned instantly. No API call is made and no credits are consumed.

Cache is shared across collaborators working on the same sheet. To force a fresh request, add `"BYPASS_CACHE"` as the last parameter in any formula.

## Rate limiting

The extension enforces the following rate limits to ensure reliable performance:

* **20 concurrent requests** maximum
* **300 requests per minute** maximum

Requests that exceed these limits are automatically queued and processed in order.

## Common workflows

* **Verify an email list**: use `DATABAR_ENRICH` with an email verification enrichment on a column of email addresses.
* **Find emails with a waterfall**: use `DATABAR_WATERFALL` to chain multiple email finder providers for maximum coverage.
* **Enrich company data**: use `DATABAR_ENRICH_EXPAND` to pull firmographic details from a column of domains.
* **Batch process large datasets**: use the Batch Enrich tool for 100+ rows to avoid formula overhead.

## Troubleshooting

<AccordionGroup>
  <Accordion title="API key not configured">
    Configure your API key via **Databar.ai > Configure API Key** in the menu bar. Your key is available in your Databar workspace under **Integrations**.
  </Accordion>

  <Accordion title="#REF! error">
    Check that all cell references in the formula are valid. Ensure the referenced cells exist and contain the expected data.
  </Accordion>

  <Accordion title="Cannot pass a range/array">
    Databar formulas accept single cell references, not ranges. Enter the formula in one cell and drag it down to process multiple rows.
  </Accordion>

  <Accordion title="Cell shows PROCESSING">
    The enrichment is still running. Wait for it to complete, or use `=DATABAR_STATUS(taskId)` to check progress.
  </Accordion>

  <Accordion title="No data returned">
    Verify that the input value is correct and that the selected provider supports the input type. Try running the same enrichment in the Databar UI to confirm the provider returns results for that input.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Enrichments" icon="wand-magic-sparkles" href="/product-guide/enrichments">
    Learn how enrichments work in Databar.
  </Card>

  <Card title="Waterfalls" icon="layer-group" href="/product-guide/waterfalls">
    Chain providers for maximum data coverage.
  </Card>

  <Card title="Credits & billing" icon="coins" href="/product-guide/credits-and-billing">
    Understand how credits are consumed.
  </Card>
</CardGroup>
