# SFTP Connector

Automatically import leads from a CSV file hosted on your SFTP server. Leadbay connects to the server, reads the file, and keeps your data in sync.

{% hint style="info" %}
The SFTP connector is only available to **admin** users. See [Team & Organization](/doc/product-guides/team-management.md) for role details.
{% endhint %}

***

## When to Use SFTP

Use the SFTP connector when your CRM or internal system exports lead data as a CSV file to an SFTP server. Instead of downloading and re-uploading the file manually each time, Leadbay connects directly and syncs automatically.

***

## Set Up a Connection

1. From the side menu, navigate to **Data Sources**
2. Click **Add new integration**
3. Select **SFTP** from the list

<figure><img src="/files/yvIutcca2Ns7HDGfquce" alt="SFTP connector form"><figcaption><p>The SFTP connection form</p></figcaption></figure>

Fill in the connection form:

| Field         | Description                                                         |
| ------------- | ------------------------------------------------------------------- |
| **Host**      | SFTP server address (e.g. `sftp.yourcompany.com`)                   |
| **Port**      | Server port (default: `22`)                                         |
| **Username**  | Your SFTP login                                                     |
| **Password**  | Your SFTP password                                                  |
| **File Path** | Full path to the CSV file on the server (e.g. `/exports/leads.csv`) |

### Test Before Connecting

Click **Test connection** to verify that Leadbay can reach the server and find the file. A green checkmark confirms the connection is working.

Once the test passes, click **Connect** to create the connector. Leadbay immediately queues a first sync.

***

## How Sync Works

* Leadbay checks the SFTP file periodically
* The file is only re-imported when its content changes (detected via checksum)
* Each sync parses the CSV and imports leads using your field and status mappings — the same mappings used for manual CSV imports

{% hint style="info" %}
Your CSV file must follow the same format as a regular Leadbay CSV import — at minimum a company name column. See [Data Sources](/doc/product-guides/data-sources.md) for column requirements and mapping details.
{% endhint %}

***

## Editing or Removing a Connector

To update connection details, open the connector from your integrations list and modify the fields. To remove it, delete the connector from the same screen.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.leadbay.app/doc/product-guides/sftp-connector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
