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

# n8n integration

> Connect Databar to n8n workflows for enrichments, waterfalls, and table operations.

Connect the full power of Databar to n8n. Run enrichments, execute waterfalls, and manage table data directly inside your n8n workflows to enrich leads, sync data, and monitor your account without writing API calls by hand.

## Prerequisites

* An active [Databar](https://databar.ai) account
* An n8n instance (Cloud or self-hosted, version 1.0+)
* A Databar API key (found in your workspace under **Integrations**)

## Installation

<Tabs>
  <Tab title="n8n Cloud">
    The Databar node is available on the official n8n marketplace. In your n8n instance:

    1. Go to **Settings > Community Nodes**
    2. Click **Install**
    3. Enter `n8n-nodes-databar`
    4. Confirm the installation

    The Databar node will appear in your node panel. If the node doesn't appear, you may need to restart your n8n instance.
  </Tab>

  <Tab title="Self-hosted">
    Install via npm in your n8n installation directory:

    ```bash theme={null}
    npm install n8n-nodes-databar
    ```

    Then restart n8n.
  </Tab>
</Tabs>

## Setting up credentials

<Steps>
  <Step title="Add a Databar node">
    Open any workflow and add a Databar node.
  </Step>

  <Step title="Create credentials">
    Click the **Credential** dropdown and select **Create New**. Enter your Databar API key.
  </Step>

  <Step title="Save">
    Click **Save**. The connection gets tested automatically. When successfully tested, n8n should display that you have been successfully authorized.
  </Step>
</Steps>

<Info>
  The API key gives access to all resources in that workspace. If you have multiple workspaces, create separate credentials for each. Your API key is found in your Databar workspace under **Integrations**.
</Info>

## Resources and operations

The Databar node organizes functionality into four resources:

| Resource       | Operations                 | Description                                               |
| -------------- | -------------------------- | --------------------------------------------------------- |
| **Enrichment** | Run                        | Enrich a single record using any Databar enrichment       |
| **Table**      | Insert Rows, Upsert Rows   | Add or update rows in your Databar tables                 |
| **Waterfall**  | Run                        | Run a waterfall across multiple data providers            |
| **Other**      | Get Account Info, Get Task | Check your account balance or retrieve async task results |

<Tabs>
  <Tab title="Enrichment: Run">
    Use this to enrich a single record: look up a person by email, verify a phone number, get company data from a domain, and more. There are over 450 enrichments currently available.

    ### How to configure

    1. Set **Resource** to Enrichment
    2. Set **Operation** to Run
    3. Select an **Enrichment** from the dropdown. Browse all available enrichments with descriptions and credit costs.
    4. Fill in the **Parameters**. The form is generated dynamically based on the enrichment you selected. Required fields are marked.
    5. Choose whether to **Wait for Completion** (enabled by default). This mode is highly preferred to avoid complexity in the integration.

    ### Parameters

    | Parameter               | Description                                                                                                                                                                              |
    | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Enrichment**          | The enrichment to run. The dropdown is searchable; type to filter. Each option shows the name, data source, and credit cost.                                                             |
    | **Parameters**          | Input fields specific to the selected enrichment. These are generated dynamically. For example, an email verifier shows an "Email" field, while a company lookup shows a "Domain" field. |
    | **Wait for Completion** | When enabled (default), the node waits for the enrichment to finish and returns the results directly. When disabled, it returns a `task_id` immediately that you can check later.        |

    **Additional options** (when Wait for Completion is enabled):

    | Option        | Default     | Description                                        |
    | ------------- | ----------- | -------------------------------------------------- |
    | Poll Interval | 3 seconds   | How often to check if the enrichment has completed |
    | Timeout       | 300 seconds | Maximum time to wait before the node gives up      |

    ### Example: Enrich a contact by email

    1. Add a Databar node to your workflow
    2. Resource: **Enrichment**, Operation: **Run**
    3. Select "Get people data from email" from the enrichment dropdown
    4. Enter the email address in the Email field (or map it from a previous node)
    5. Execute the node

    The output will contain the enriched contact data: name, company, social profiles, and more, depending on the enrichment.

    ### Tips

    * You can map values from previous nodes into any parameter field using n8n expressions
    * Each enrichment costs a certain number of credits, shown in the dropdown
    * If you need to enrich many records, connect a loop or use n8n's built-in batching. The node processes one item per execution.
  </Tab>

  <Tab title="Table: Insert Rows">
    Use this to add new rows to a Databar table. Each input item in your workflow creates one row.

    ### How to configure

    1. Set **Resource** to Table
    2. Set **Operation** to Insert Rows
    3. Select a **Table** from the dropdown
    4. Fill in the **Fields**. The form shows all columns in your table with their types (e.g., name (text), revenue (number)).

    ### Parameters

    | Parameter  | Description                                                                                                                                                                   |
    | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Table**  | Select the target table. The dropdown is searchable and shows all tables in your workspace.                                                                                   |
    | **Fields** | One input field per column in the table. Each field label shows the column name and type. Only user-created columns are shown; enrichment-generated columns are filtered out. |

    **Options** (click Add Option to configure):

    | Option            | Default | Description                                                                                                                                 |
    | ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
    | Allow New Columns | false   | When enabled, if your data includes column names that don't exist in the table yet, Databar will create them automatically as text columns. |
    | Dedupe            | false   | When enabled, rows that match existing rows on specified keys will be skipped instead of creating duplicates.                               |
    | Dedupe Keys       | -       | Comma-separated list of column names to use for duplicate detection (e.g., `domain, email`). Only shown when Dedupe is enabled.             |

    ### Example: Insert leads from a webhook

    1. Set up a **Webhook** node to receive lead data
    2. Add a Databar node: Resource **Table**, Operation **Insert Rows**
    3. Select your leads table
    4. Map the webhook fields to table columns (e.g., `{{ $json.name }}` into the Name field)
    5. Execute. Each incoming webhook creates a new row.
  </Tab>

  <Tab title="Table: Upsert Rows">
    Use this to update an existing row if it matches a key, or insert a new row if no match is found. This is useful for keeping your table in sync with external data.

    ### How to configure

    1. Set **Resource** to Table
    2. Set **Operation** to Upsert Rows
    3. Select a **Table** from the dropdown
    4. Choose a **Column to Match On**. This is the column Databar will use to find existing rows.
    5. Enter the **Value to Search**. The specific value to look for in that column.
    6. Fill in the **Fields**. The column values to set on the matched or newly created row.

    ### Parameters

    | Parameter              | Description                                                                                                                                                                           |
    | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Table**              | The target table.                                                                                                                                                                     |
    | **Column to Match On** | The column used to find an existing row. The dropdown shows all user-created columns in the table.                                                                                    |
    | **Value to Search**    | The value to look for in the match column. Databar searches for a row where the column matches this value exactly. If found, that row is updated. If not found, a new row is created. |
    | **Fields**             | The column values to set. Works the same as Insert Rows: one field per column, with types shown.                                                                                      |

    ### Example: Sync CRM data

    1. Use a **Schedule Trigger** to run daily
    2. Fetch contacts from your CRM
    3. Add a Databar node: Resource **Table**, Operation **Upsert Rows**
    4. Select your contacts table
    5. Set **Column to Match On** to `email`
    6. Map the email from the CRM data into **Value to Search**
    7. Map the other CRM fields into the column fields
    8. Execute. Existing contacts are updated, new ones are inserted.
  </Tab>

  <Tab title="Waterfall: Run">
    A waterfall tries multiple data providers in sequence until one returns a successful result. This is useful when you need high coverage: if one provider doesn't have the data, the next one is tried automatically.

    ### How to configure

    1. Set **Resource** to Waterfall
    2. Set **Operation** to Run
    3. Select a **Waterfall** from the dropdown
    4. Fill in the **Parameters**. The form is generated dynamically based on the waterfall's input requirements.
    5. Select **Data Providers**. Choose which providers to include in the waterfall (required).
    6. Choose whether to **Wait for Completion** (enabled by default).

    ### Parameters

    | Parameter               | Description                                                                                                                                                                                                                             |
    | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Waterfall**           | The waterfall to run. The dropdown shows all waterfalls in your workspace.                                                                                                                                                              |
    | **Parameters**          | Input fields specific to the selected waterfall. For example, a "Find email by name and company" waterfall shows fields for First Name, Last Name, and Domain.                                                                          |
    | **Data Providers**      | Multi-select dropdown showing all available providers for this waterfall. You must select at least one. Providers are tried in order; the waterfall stops at the first successful result. Each provider shows its name and credit cost. |
    | **Wait for Completion** | When enabled (default), the node waits for the waterfall to finish. When disabled, returns a `task_id` immediately.                                                                                                                     |

    **Additional options** (when Wait for Completion is enabled):

    | Option        | Default     | Description                                       |
    | ------------- | ----------- | ------------------------------------------------- |
    | Poll Interval | 3 seconds   | How often to check if the waterfall has completed |
    | Timeout       | 300 seconds | Maximum time to wait                              |

    ### Example: Find someone's email

    1. Add a Databar node
    2. Resource: **Waterfall**, Operation: **Run**
    3. Select a "Find email" waterfall
    4. Fill in the person's name and company domain
    5. Select the data providers you want to try
    6. Execute. Returns the email from the first provider that finds it.
  </Tab>

  <Tab title="Get Account Info">
    A simple utility operation to check your account status.

    ### How to configure

    1. Set **Resource** to Other
    2. Set **Operation** to Get Account Info
    3. Execute

    ### Output

    Returns your account details including:

    * Account name and email
    * Current credit balance
    * Plan information
    * Workspace details

    This is useful for monitoring your credit usage in automated workflows.
  </Tab>

  <Tab title="Get Task">
    Retrieve the status and results of an async task. This is useful when you run enrichments or waterfalls with **Wait for Completion** disabled and need to check results later.

    ### How to configure

    1. Set **Resource** to Other
    2. Set **Operation** to Get Task
    3. Enter the **Task ID** returned by a previous enrichment or waterfall run
    4. Execute

    ### Parameters

    | Parameter   | Description                                                                                                      |
    | ----------- | ---------------------------------------------------------------------------------------------------------------- |
    | **Task ID** | The ID of the task to check, returned when running an enrichment or waterfall with Wait for Completion disabled. |

    ### Output

    Returns the task status and results. If the task has completed, the response includes the enrichment or waterfall output data.

    <Warning>
      Task results are stored for **1 hour** after completion. Retrieve your results before they expire.
    </Warning>
  </Tab>
</Tabs>

## Working with expressions

Most fields in the Databar node support n8n expressions, letting you dynamically pass data from previous nodes. Individual parameter fields within enrichments, waterfalls, and table operations can be mapped to values from earlier nodes.

### Mapping data from a previous node

In any field, click the Expression toggle and use standard n8n syntax:

```
{{ $json.email }}                          // value from the previous node
{{ $('Webhook').item.json.domain }}        // value from a specific node
{{ $json.name.split(' ')[0] }}             // JavaScript transformations
```

### Using dynamic table or enrichment IDs

If you need to select a table or enrichment dynamically (e.g., based on input data), switch the dropdown to Expression mode by clicking the three-dot menu next to the field, then enter an expression that resolves to the ID.

## Error handling

| Error                  | Cause                                                | Solution                                                                                           |
| ---------------------- | ---------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| Authentication failed  | Invalid or expired API key                           | Check your API key in credentials. Generate a new one in Databar under **Integrations** if needed. |
| Task timed out         | Enrichment or waterfall took longer than the timeout | Increase the timeout in Additional Options, or disable Wait for Completion and poll separately.    |
| No enrichments loading | API connectivity issue                               | Check your internet connection and verify your API key has the correct permissions.                |
| Fields not appearing   | No table selected                                    | Select a table first. Column fields load dynamically after table selection.                        |

<Tip>
  To handle failures gracefully, enable **Continue On Fail** in the node settings. When enabled, failed executions output an `error` field on the main output instead of stopping the workflow, letting you log errors or retry with different parameters.
</Tip>

## Workflow examples

### Lead enrichment pipeline

**Webhook > Databar (Enrichment: Run) > IF (qualified?) > Slack Notification**

Enrich incoming leads with company data, filter by criteria, and notify your team.

### Data sync with deduplication

**Schedule > Google Sheets (Read) > Databar (Table: Insert Rows, Dedupe on email)**

Periodically sync data from a spreadsheet into a Databar table, skipping duplicates.

### Multi-provider email finder

**Manual Trigger > Databar (Waterfall: Run) > Databar (Table: Upsert Rows)**

Find emails using a waterfall of providers, then store results in a table, updating existing rows if the person is already there.

### Credit monitoring

**Schedule (daily) > Databar (Other: Get Account Info) > IF (credits \< 100) > Email Alert**

Check your credit balance daily and get notified when it's running low.

## FAQ

<AccordionGroup>
  <Accordion title="How many credits does each operation cost?">
    Credit costs depend on the specific enrichment or data provider. Costs are shown in the enrichment and provider dropdowns when configuring the node.
  </Accordion>

  <Accordion title="Can I process multiple records in one execution?">
    Yes. Connect a node that outputs multiple items (like a spreadsheet read or database query) before the Databar node. The node processes each item individually.
  </Accordion>

  <Accordion title="What happens if an enrichment returns no data?">
    The node returns the task response with empty or null result fields. Your workflow can check for this and handle it accordingly.
  </Accordion>

  <Accordion title="Does this work on n8n Cloud and self-hosted?">
    Yes. The Databar node is available on the official n8n marketplace and works on both n8n Cloud and self-hosted instances running v1.0 or later.
  </Accordion>

  <Accordion title="Where do I find my API key?">
    In your Databar workspace, go to **Integrations**. Each workspace has its own API key.
  </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="bars-staggered" href="/product-guide/waterfalls">
    Chain providers for maximum data coverage
  </Card>

  <Card title="Tables overview" icon="table" href="/product-guide/tables-overview">
    Understand how Databar tables store and organize data
  </Card>
</CardGroup>
