# n8n Integration

Connect Databar to your n8n workflows to enrich data, run waterfalls, and manage tables.

***

## Getting Started

### Prerequisites

Before you begin, make sure you have:

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

### Installation

#### n8n Cloud

{% stepper %}
{% step %}
In your n8n instance, go to **Settings > Community Nodes**
{% endstep %}

{% step %}
Click **Install**
{% endstep %}

{% step %}
Enter `n8n-nodes-databar`
{% endstep %}

{% step %}
Confirm the installation
{% endstep %}

{% step %}
The Databar node will appear in your node panel. If the node doesn't appear, you may need to restart your n8n instance.
{% endstep %}
{% endstepper %}

Alternatively, install via npm:

{% code title="Install via npm" %}

```bash
npm install n8n-nodes-databar
```

{% endcode %}

Then restart n8n.

### Setting Up Credentials

{% stepper %}
{% step %}
Open any workflow and add a **Databar** node
{% endstep %}

{% step %}
Click the **Credential** dropdown and select **Create New**
{% endstep %}

{% step %}
Enter your Databar API key
{% endstep %}

{% step %}
Click **Save** - the connection gets tested automatically. When successfully tested, n8n should display that you have been successfully authorized.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The API key gives access to all resources in that workspace. If you have multiple workspaces, create separate credentials for each.
{% endhint %}

Your API key is found in your Databar workspace under **Integrations**. Each workspace has its own API key. Please ensure you have the necessary access levels for the n8n integration to work properly.

***

## Resources and Operations

The Databar node organizes functionality into four resources:

<table><thead><tr><th>Resource</th><th width="170.22265625">Operations</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enrichment</strong></td><td>Run</td><td>Enrich a single record using any Databar enrichment</td></tr><tr><td><strong>Table</strong></td><td>Insert Rows, Upsert Rows</td><td>Add or update rows in your Databar tables</td></tr><tr><td><strong>Waterfall</strong></td><td>Run</td><td>Run a waterfall across multiple data providers</td></tr><tr><td><strong>Other</strong></td><td>Get Account Info</td><td>Check your account balance and plan details</td></tr></tbody></table>

***

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

{% stepper %}
{% step %}
Set **Resource** to **Enrichment**
{% endstep %}

{% step %}
Set **Operation** to **Run**
{% endstep %}

{% step %}
Select an **Enrichment** from the dropdown - browse all available enrichments with descriptions and credit costs
{% endstep %}

{% step %}
Fill in the **Parameters** - the form is generated dynamically based on the enrichment you selected. Required fields are marked.
{% endstep %}

{% step %}
Choose whether to **Wait for Completion** (enabled by default). This mode is highly preferred to avoid complexity in the integration.
{% endstep %}
{% endstepper %}

### Parameters

<table><thead><tr><th width="210.15625">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Enrichment</strong></td><td>The enrichment to run. The dropdown is searchable - type to filter. Each option shows the name, data source, and credit cost.</td></tr><tr><td><strong>Parameters</strong></td><td>Input fields specific to the selected enrichment. These are generated dynamically - for example, an email verifier will show an "Email" field, while a company lookup will show a "Domain" field.</td></tr><tr><td><strong>Wait for Completion</strong></td><td>When enabled (default), the node waits for the enrichment to finish and returns the results directly. When disabled, it returns a <code>task_id</code> immediately that you can check later.</td></tr></tbody></table>

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

{% stepper %}
{% step %}
Add a Databar node to your workflow
{% endstep %}

{% step %}
Resource: **Enrichment**, Operation: **Run**
{% endstep %}

{% step %}
Select "Get people data from email" from the enrichment dropdown
{% endstep %}

{% step %}
Enter the email address in the **Email** field (or map it from a previous node)
{% endstep %}

{% step %}
Execute the node
{% endstep %}
{% endstepper %}

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

***

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

{% stepper %}
{% step %}
Set **Resource** to **Table**
{% endstep %}

{% step %}
Set **Operation** to **Insert Rows**
{% endstep %}

{% step %}
Select a **Table** from the dropdown
{% endstep %}

{% step %}
Fill in the **Fields** - the form shows all columns in your table with their types (e.g., `name (text)`, `revenue (number)`)
{% endstep %}
{% endstepper %}

### Parameters

| Field      | 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 additional behavior:

| 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

```
Webhook > Databar (Insert Rows) > Respond to Webhook
```

{% stepper %}
{% step %}
Set up a Webhook node to receive lead data
{% endstep %}

{% step %}
Add a Databar node: Resource **Table**, Operation **Insert Rows**
{% endstep %}

{% step %}
Select your leads table
{% endstep %}

{% step %}
Map the webhook fields to table columns (e.g., `{{ $json.name }}` into the Name field)
{% endstep %}

{% step %}
Execute - each incoming webhook creates a new row
{% endstep %}
{% endstepper %}

***

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

{% stepper %}
{% step %}
Set **Resource** to **Table**
{% endstep %}

{% step %}
Set **Operation** to **Upsert Rows**
{% endstep %}

{% step %}
Select a **Table** from the dropdown
{% endstep %}

{% step %}
Choose a **Column to Match On** - this is the column Databar will use to find existing rows
{% endstep %}

{% step %}
Enter the **Value to Search** - the specific value to look for in that column
{% endstep %}

{% step %}
Fill in the **Fields** - the column values to set on the matched or newly created row
{% endstep %}
{% endstepper %}

### Parameters

| Field                  | 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

```
Schedule Trigger > CRM Node (Get Contacts) > Databar (Upsert Rows)
```

{% stepper %}
{% step %}
Use a Schedule Trigger to run daily
{% endstep %}

{% step %}
Fetch contacts from your CRM
{% endstep %}

{% step %}
Add a Databar node: Resource **Table**, Operation **Upsert Rows**
{% endstep %}

{% step %}
Select your contacts table
{% endstep %}

{% step %}
Set **Column to Match On** to `email`
{% endstep %}

{% step %}
Map the email from the CRM data into **Value to Search**
{% endstep %}

{% step %}
Map the other CRM fields into the column fields
{% endstep %}

{% step %}
Execute - existing contacts are updated, new ones are inserted
{% endstep %}
{% endstepper %}

***

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

{% stepper %}
{% step %}
Set **Resource** to **Waterfall**
{% endstep %}

{% step %}
Set **Operation** to **Run**
{% endstep %}

{% step %}
Select a **Waterfall** from the dropdown
{% endstep %}

{% step %}
Fill in the **Parameters** - the form is generated dynamically based on the waterfall's input requirements
{% endstep %}

{% step %}
Select **Data Providers** - choose which providers to include in the waterfall (required)
{% endstep %}

{% step %}
Choose whether to **Wait for Completion** (enabled by default)
{% endstep %}
{% endstepper %}

### Parameters

| Field                   | 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 might show 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

{% stepper %}
{% step %}
Add a Databar node
{% endstep %}

{% step %}
Resource: **Waterfall**, Operation: **Run**
{% endstep %}

{% step %}
Select a "Find email" waterfall
{% endstep %}

{% step %}
Fill in the person's name and company domain
{% endstep %}

{% step %}
Select the data providers you want to try
{% endstep %}

{% step %}
Execute - returns the email from the first provider that finds it
{% endstep %}
{% endstepper %}

***

## Other: Get Account Info

A simple utility operation to check your account status.

### How to configure

{% stepper %}
{% step %}
Set **Resource** to **Other**
{% endstep %}

{% step %}
Set **Operation** to **Get Account Info**
{% endstep %}

{% step %}
Execute
{% endstep %}
{% endstepper %}

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

***

## Working with Expressions

All fields in the Databar node support n8n expressions. This lets you dynamically pass data from previous 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's output
* `{{ $('Webhook').item.json.domain }}` - value from a specific node named "Webhook"
* `{{ $json.name.split(' ')[0] }}` - JavaScript expressions for 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

### Common errors and solutions

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

### Using the error output

You can connect the Databar node's error output (the red dot) to a separate branch to handle failures gracefully - for example, logging errors or retrying with different parameters.

***

## 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 in your table.

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

<details>

<summary>How many credits does each operation cost?</summary>

Credit costs depend on the specific enrichment or data provider. Costs are shown in the enrichment and provider dropdowns when configuring the node.

</details>

<details>

<summary>Can I process multiple records in one execution?</summary>

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.

</details>

<details>

<summary>What happens if an enrichment returns no data?</summary>

The node will return the task response with empty or null result fields. Your workflow can check for this and handle it accordingly.

</details>

<details>

<summary>Can I use this with n8n Cloud?</summary>

Yes. The node is available as a community node on both n8n Cloud and self-hosted instances.

</details>

<details>

<summary>Where do I find my API key?</summary>

In your Databar workspace, go to **Integrations**. Each workspace has its own API key.

</details>
